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.

授权

ApiKeyAuth
headerAuthorization<token>

路径参数

id*string

Request ID.

响应主体

Generation detail.

application/json
  1. response
cost*
created_at*string
格式date-time
id*string

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

model*
object*"request_receipt"
值于"request_receipt"
receipt*
request*

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

request_id*string
status*string
值于"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.

示例请求
curl -X GET 'https://api.ohmygpt.com/v1/generations/string'
示例响应
{  "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"  }}