BazaarLinkBazaarLink
Sign in
DocsAPI ReferenceSDK ReferenceAgentic UsageAI Skills
Account

Get a generation

Use the opaque BazaarLink request id from the response id or x-request-id with GET /v1/generation; non-streaming responses also return it in x-generation-id. Stats may take a few seconds after completion; retry a 404 briefly.

GET/v1/generation

Authorizations

Authorizationrequired
string · header

API key as bearer token in the Authorization header.

Query parameters

idrequired
string

Use the opaque BazaarLink request id from the response id or x-request-id with GET /v1/generation; non-streaming responses also return it in x-generation-id. Stats may take a few seconds after completion; retry a 404 briefly.

GET /v1/generation
curl "https://api.bazaarlink.ai/v1/generation?id=BAZAARLINK_REQUEST_ID" \
  -H "Authorization: Bearer $BAZAARLINK_API_KEY"
Response examples

Success. usage uses the same token-field shape as the chat endpoints (prompt_tokens/completion_tokens/total_tokens); cost_breakdown additionally splits out the subtotal and the cache discount. Fixed BazaarLink value: bazaarlink. usage.cost: USD amount charged to the customer for this request.

{
  "data": {
    "id": "85e6f35c71a31f19-SJC",
    "model": "openai/gpt-4o",
    "provider": "bazaarlink",
    "created_at": "2026-07-27T02:00:00.000Z",
    "app_name": "my-app",
    "finish_reason": "stop",
    "status": 200,
    "duration_ms": 1840,
    "first_token_ms": 320,
    "throughput": 42.5,
    "usage": {
      "prompt_tokens": 128,
      "completion_tokens": 256,
      "total_tokens": 384,
      "prompt_tokens_details": {
        "cached_tokens": 0
      },
      "completion_tokens_details": {
        "reasoning_tokens": 0
      },
      "cost": 0.0034
    },
    "cost_breakdown": {
      "subtotal": 0.0034,
      "cache_discount": 0,
      "total": 0.0034
    }
  }
}
Support
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.
Get a generation — BazaarLink API