LLM Gateway

Retrieve a usage receipt

Returns the receipt of a request sent with `x-llmgateway-usage-contract: 1`, by its receipt ID or the caller's operation ID.

GET
/v1/usage/receipts/{id}

Returns the receipt of a request sent with x-llmgateway-usage-contract: 1, by its receipt ID or the caller's operation ID. Receipts are kept for 30 days; an unknown receipt is not proof of zero usage.

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer token authentication using API keys

In: header

Path Parameters

id*string
Match^[A-Za-z0-9_.:-]{1,512}$

Response Body

application/json

curl -X GET "https://example.com/v1/usage/receipts/string"
{
  "v": 1,
  "receiptId": "string",
  "operationId": "string",
  "operation": "string",
  "model": "string",
  "state": "pending",
  "costUsd": "string",
  "usage": {
    "property1": 0,
    "property2": 0
  },
  "pricingVersion": "llmgateway-list-v1",
  "createdAt": "string",
  "expiresAt": "string",
  "resourceId": "string",
  "notDispatched": true
}

How is this guide?

Last updated on