OhMyGPT
Usage

Retrieve generation detail

GET
/v1/generations/{id}

Returns one request generation lookup record owned by the authenticated user. The response contains public request facts and the user-visible charge in Credits.

Authorization

ApiKeyAuth
headerAuthorization<token>

Path Parameters

id*string

Request ID.

Response Body

Generation detail.

application/json
  1. response
cost*
created_at*string
Formatdate-time
id*string

Same value as request_id; kept as the canonical object id.

model*
object*"request_receipt"
Value in"request_receipt"
receipt*
request*

The request itself, as listed by GET /v1/usage.

request_id*string
status*string
Value in"succeeded""failed""partial""unknown"
timing*
usage*
verirelay?

The VeriRelay receipt returned in this request's X-VeriRelay-* response headers (on a stream that sent a keep-alive line first, in comment lines ahead of the first event, without the store key). Present only when the request succeeded through VeriRelay, whose signing key lives in an AMD SEV-SNP confidential VM: VeriRelay signs a receipt only for a forward that completed. Use these values to verify the request at https://verirelay.com/verify against relay. VeriRelay deletes the signed receipt and the raw capture when they expire, so verification fails after that.

Example Request
curl -X GET 'https://api.ohmygpt.com/v1/generations/string'
Example Response
{  "cost": {    "credits": 0,    "lines": [      {        "credits": 0,        "kind": "string",        "list_price_credits": 0,        "price_credits": 0,        "quantity": 0      }    ],    "list_credits": 0  },  "created_at": "2019-08-24T14:15:22Z",  "id": "string",  "model": {    "id": "string",    "provider": "string"  },  "object": "request_receipt",  "receipt": {    "available": true,    "warnings": [      {        "code": "string",        "field": "string",        "message": "string"      }    ]  },  "request": {    "error": "string",    "finish_reason": "stop",    "http_status": 0,    "input_api": "string",    "is_stream": true,    "key_hint": "string",    "native_finish_reason": "string"  },  "request_id": "string",  "status": "succeeded",  "timing": {    "duration_ms": 0,    "first_token_ms": 0  },  "usage": {    "cache_creation_tokens": 0,    "cache_read_tokens": 0,    "input_tokens": 0,    "output_tokens": 0,    "reasoning_tokens": 0  },  "verirelay": {    "receipt_expires_at": "2019-08-24T14:15:22Z",    "relay": "http://example.com",    "request_id": "string",    "store_expires_at": "2019-08-24T14:15:22Z",    "store_id": "string",    "store_key": "string"  }}

Was this page helpful?

Still stuck? Live chat · [email protected] · Telegram group