Get API key
InferenceGet a generation
Inference

Get a generation

One finished request's record and cost, by its generation ID: the X-Generation-Id an image or audio answer carries, or for any request gen- and the 32 hex digits of its x-request-id, which is request- and the same digits. It reads any finished request of your key's organization. total_cost and usage are what you were charged in US dollars; api_type is completions (Chat Completions, Responses and Messages), embeddings, image, stt or tts. Never cached.

GET/api/v1/generation
Request
curl https://api.llm.buzz/api/v1/generation \
  -H "Authorization: Bearer $LLM_BUZZ_KEY"
Response
{
  "data": {
    "id": "gen-...",
    "model": "hexgrad/kokoro-82m",
    "api_type": "tts",
    "provider_name": "DeepInfra",
    "total_cost": 0.00002277,
    "is_byok": false,
    "upstream_inference_cost": null
  }
}

Authorization

An inference key, as Authorization: Bearer KEY.

Keys and limits

Parameters

  • idstringqueryrequired

    The generation ID, such as gen- and 32 hex digits.

Response 200

OpenRouter's GenerationResponse, as {"data": ...}, with model, provider_name, latency and generation_time in milliseconds, and data_region (europe for a provider in the EU, else global).

Errors

  • 400

    No id (invalid_parameter on id).

  • 401

    No key, or the key is unknown, expired, revoked or disabled.

  • 404

    Another organization's ID, a malformed one, or one whose request has not finished.

Every error code

Docs