Commits included in this export:

- e6299b4ebfe5c2eed6c598771f0fd99f84555401
  - 24d3f0ee1c2aa19a62f7902836034080b9246813
  - 68922847c2969b773887310eb7aa9a814e199c5a
  - 729ee2338c39df22461526153e7f4ba868fd498e
  - e1074ff86fccf5e48406b7595298873106d3cc5a
  - 123bbdaf841d299162a82ee2573adfbb70a45b8f
  - ac457b8a8dad98fdf5ddcae8dd4711361cea3084
  - ea825199f4c59dd68fec01cf8d18a582963c9f25
  - 4d48e4f6bb936e785787314a965298da6b78fea0
  - 718729a573ee98893a4408d5a52ab4686661fe54
  - b867adcde6b64f3f2a11c4626254b39098e4b0b4
  - 21912c097b4066d109766c6b4492826595cd57c5
  - bc1ed85adc976a4634ca8a41b82e4fc2c39a864f
  - d145c89c941937a312ed1357590d2bfda9a3603d
  - 12f05b5dee397ead47cfcd545a7a2e3c7ff57524
  - dd28f75a19a015809797c7abf3f8758f7c37262e
  - c96e569781e07ab44172d9c69940ec17bafd81f4
  - c9d5a90e3c2b5077a2bdd49773f1a46d1a5a79c7
  - 58b08f87116ceab9076de2fdc0a4c74c919b44c4

GitOrigin-RevId: e6299b4ebfe5c2eed6c598771f0fd99f84555401
This commit is contained in:
OpenRouter Team
2026-02-05 17:57:55 +00:00
parent 0c791b04d1
commit faa7751056
114 changed files with 2635 additions and 3824 deletions
+36 -35
View File
@@ -5,38 +5,39 @@ Generation data
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | Unique identifier for the generation | gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG |
| `upstream_id` | *Nullable[str]* | :heavy_check_mark: | Upstream provider's identifier for this generation | chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946 |
| `total_cost` | *float* | :heavy_check_mark: | Total cost of the generation in USD | 0.0015 |
| `cache_discount` | *Nullable[float]* | :heavy_check_mark: | Discount applied due to caching | 0.0002 |
| `upstream_inference_cost` | *Nullable[float]* | :heavy_check_mark: | Cost charged by the upstream provider | 0.0012 |
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the generation was created | 2024-07-15T23:33:19.433273+00:00 |
| `model` | *str* | :heavy_check_mark: | Model used for the generation | sao10k/l3-stheno-8b |
| `app_id` | *Nullable[float]* | :heavy_check_mark: | ID of the app that made the request | 12345 |
| `streamed` | *Nullable[bool]* | :heavy_check_mark: | Whether the response was streamed | true |
| `cancelled` | *Nullable[bool]* | :heavy_check_mark: | Whether the generation was cancelled | false |
| `provider_name` | *Nullable[str]* | :heavy_check_mark: | Name of the provider that served the request | Infermatic |
| `latency` | *Nullable[float]* | :heavy_check_mark: | Total latency in milliseconds | 1250 |
| `moderation_latency` | *Nullable[float]* | :heavy_check_mark: | Moderation latency in milliseconds | 50 |
| `generation_time` | *Nullable[float]* | :heavy_check_mark: | Time taken for generation in milliseconds | 1200 |
| `finish_reason` | *Nullable[str]* | :heavy_check_mark: | Reason the generation finished | stop |
| `tokens_prompt` | *Nullable[float]* | :heavy_check_mark: | Number of tokens in the prompt | 10 |
| `tokens_completion` | *Nullable[float]* | :heavy_check_mark: | Number of tokens in the completion | 25 |
| `native_tokens_prompt` | *Nullable[float]* | :heavy_check_mark: | Native prompt tokens as reported by provider | 10 |
| `native_tokens_completion` | *Nullable[float]* | :heavy_check_mark: | Native completion tokens as reported by provider | 25 |
| `native_tokens_completion_images` | *Nullable[float]* | :heavy_check_mark: | Native completion image tokens as reported by provider | 0 |
| `native_tokens_reasoning` | *Nullable[float]* | :heavy_check_mark: | Native reasoning tokens as reported by provider | 5 |
| `native_tokens_cached` | *Nullable[float]* | :heavy_check_mark: | Native cached tokens as reported by provider | 3 |
| `num_media_prompt` | *Nullable[float]* | :heavy_check_mark: | Number of media items in the prompt | 1 |
| `num_input_audio_prompt` | *Nullable[float]* | :heavy_check_mark: | Number of audio inputs in the prompt | 0 |
| `num_media_completion` | *Nullable[float]* | :heavy_check_mark: | Number of media items in the completion | 0 |
| `num_search_results` | *Nullable[float]* | :heavy_check_mark: | Number of search results included | 5 |
| `origin` | *str* | :heavy_check_mark: | Origin URL of the request | https://openrouter.ai/ |
| `usage` | *float* | :heavy_check_mark: | Usage amount in USD | 0.0015 |
| `is_byok` | *bool* | :heavy_check_mark: | Whether this used bring-your-own-key | false |
| `native_finish_reason` | *Nullable[str]* | :heavy_check_mark: | Native finish reason as reported by provider | stop |
| `external_user` | *Nullable[str]* | :heavy_check_mark: | External user identifier | user-123 |
| `api_type` | [Nullable[operations.APIType]](../operations/apitype.md) | :heavy_check_mark: | Type of API used for the generation | |
| `router` | *Nullable[str]* | :heavy_check_mark: | Router used for the request (e.g., openrouter/auto) | openrouter/auto |
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | Unique identifier for the generation | gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG |
| `upstream_id` | *Nullable[str]* | :heavy_check_mark: | Upstream provider's identifier for this generation | chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946 |
| `total_cost` | *float* | :heavy_check_mark: | Total cost of the generation in USD | 0.0015 |
| `cache_discount` | *Nullable[float]* | :heavy_check_mark: | Discount applied due to caching | 0.0002 |
| `upstream_inference_cost` | *Nullable[float]* | :heavy_check_mark: | Cost charged by the upstream provider | 0.0012 |
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the generation was created | 2024-07-15T23:33:19.433273+00:00 |
| `model` | *str* | :heavy_check_mark: | Model used for the generation | sao10k/l3-stheno-8b |
| `app_id` | *Nullable[float]* | :heavy_check_mark: | ID of the app that made the request | 12345 |
| `streamed` | *Nullable[bool]* | :heavy_check_mark: | Whether the response was streamed | true |
| `cancelled` | *Nullable[bool]* | :heavy_check_mark: | Whether the generation was cancelled | false |
| `provider_name` | *Nullable[str]* | :heavy_check_mark: | Name of the provider that served the request | Infermatic |
| `latency` | *Nullable[float]* | :heavy_check_mark: | Total latency in milliseconds | 1250 |
| `moderation_latency` | *Nullable[float]* | :heavy_check_mark: | Moderation latency in milliseconds | 50 |
| `generation_time` | *Nullable[float]* | :heavy_check_mark: | Time taken for generation in milliseconds | 1200 |
| `finish_reason` | *Nullable[str]* | :heavy_check_mark: | Reason the generation finished | stop |
| `tokens_prompt` | *Nullable[float]* | :heavy_check_mark: | Number of tokens in the prompt | 10 |
| `tokens_completion` | *Nullable[float]* | :heavy_check_mark: | Number of tokens in the completion | 25 |
| `native_tokens_prompt` | *Nullable[float]* | :heavy_check_mark: | Native prompt tokens as reported by provider | 10 |
| `native_tokens_completion` | *Nullable[float]* | :heavy_check_mark: | Native completion tokens as reported by provider | 25 |
| `native_tokens_completion_images` | *Nullable[float]* | :heavy_check_mark: | Native completion image tokens as reported by provider | 0 |
| `native_tokens_reasoning` | *Nullable[float]* | :heavy_check_mark: | Native reasoning tokens as reported by provider | 5 |
| `native_tokens_cached` | *Nullable[float]* | :heavy_check_mark: | Native cached tokens as reported by provider | 3 |
| `num_media_prompt` | *Nullable[float]* | :heavy_check_mark: | Number of media items in the prompt | 1 |
| `num_input_audio_prompt` | *Nullable[float]* | :heavy_check_mark: | Number of audio inputs in the prompt | 0 |
| `num_media_completion` | *Nullable[float]* | :heavy_check_mark: | Number of media items in the completion | 0 |
| `num_search_results` | *Nullable[float]* | :heavy_check_mark: | Number of search results included | 5 |
| `origin` | *str* | :heavy_check_mark: | Origin URL of the request | https://openrouter.ai/ |
| `usage` | *float* | :heavy_check_mark: | Usage amount in USD | 0.0015 |
| `is_byok` | *bool* | :heavy_check_mark: | Whether this used bring-your-own-key | false |
| `native_finish_reason` | *Nullable[str]* | :heavy_check_mark: | Native finish reason as reported by provider | stop |
| `external_user` | *Nullable[str]* | :heavy_check_mark: | External user identifier | user-123 |
| `api_type` | [Nullable[operations.APIType]](../operations/apitype.md) | :heavy_check_mark: | Type of API used for the generation | |
| `router` | *Nullable[str]* | :heavy_check_mark: | Router used for the request (e.g., openrouter/auto) | openrouter/auto |
| `provider_responses` | List[[operations.ProviderResponse](../operations/providerresponse.md)] | :heavy_check_mark: | List of provider responses for this generation, including fallback attempts | |
+107
View File
@@ -0,0 +1,107 @@
# ProviderName
## Values
| Name | Value |
| ------------------- | ------------------- |
| `ANY_SCALE` | AnyScale |
| `ATOMA` | Atoma |
| `CENT_ML` | Cent-ML |
| `CROF_AI` | CrofAI |
| `ENFER` | Enfer |
| `GO_POMELO` | GoPomelo |
| `HUGGING_FACE` | HuggingFace |
| `HYPERBOLIC_2` | Hyperbolic 2 |
| `INO_CLOUD` | InoCloud |
| `KLUSTER` | Kluster |
| `LAMBDA` | Lambda |
| `LEPTON` | Lepton |
| `LYNN_2` | Lynn 2 |
| `LYNN` | Lynn |
| `MANCER` | Mancer |
| `META` | Meta |
| `MODAL` | Modal |
| `NINETEEN` | Nineteen |
| `OCTO_AI` | OctoAI |
| `RECURSAL` | Recursal |
| `REFLECTION` | Reflection |
| `REPLICATE` | Replicate |
| `SAMBA_NOVA_2` | SambaNova 2 |
| `SF_COMPUTE` | SF Compute |
| `TARGON` | Targon |
| `TOGETHER_2` | Together 2 |
| `UBICLOUD` | Ubicloud |
| `ONE_DOT_AI` | 01.AI |
| `AI21` | AI21 |
| `AION_LABS` | AionLabs |
| `ALIBABA` | Alibaba |
| `AMBIENT` | Ambient |
| `AMAZON_BEDROCK` | Amazon Bedrock |
| `AMAZON_NOVA` | Amazon Nova |
| `ANTHROPIC` | Anthropic |
| `ARCEE_AI` | Arcee AI |
| `ATLAS_CLOUD` | AtlasCloud |
| `AVIAN` | Avian |
| `AZURE` | Azure |
| `BASE_TEN` | BaseTen |
| `BYTE_PLUS` | BytePlus |
| `BLACK_FOREST_LABS` | Black Forest Labs |
| `CEREBRAS` | Cerebras |
| `CHUTES` | Chutes |
| `CIRRASCALE` | Cirrascale |
| `CLARIFAI` | Clarifai |
| `CLOUDFLARE` | Cloudflare |
| `COHERE` | Cohere |
| `CRUSOE` | Crusoe |
| `DEEP_INFRA` | DeepInfra |
| `DEEP_SEEK` | DeepSeek |
| `FEATHERLESS` | Featherless |
| `FIREWORKS` | Fireworks |
| `FRIENDLI` | Friendli |
| `GMI_CLOUD` | GMICloud |
| `GOOGLE` | Google |
| `GOOGLE_AI_STUDIO` | Google AI Studio |
| `GROQ` | Groq |
| `HYPERBOLIC` | Hyperbolic |
| `INCEPTION` | Inception |
| `INCEPTRON` | Inceptron |
| `INFERENCE_NET` | InferenceNet |
| `INFERMATIC` | Infermatic |
| `INFLECTION` | Inflection |
| `LIQUID` | Liquid |
| `MARA` | Mara |
| `MANCER_2` | Mancer 2 |
| `MINIMAX` | Minimax |
| `MODEL_RUN` | ModelRun |
| `MISTRAL` | Mistral |
| `MODULAR` | Modular |
| `MOONSHOT_AI` | Moonshot AI |
| `MORPH` | Morph |
| `N_COMPASS` | NCompass |
| `NEBIUS` | Nebius |
| `NEXT_BIT` | NextBit |
| `NOVITA` | Novita |
| `NVIDIA` | Nvidia |
| `OPEN_AI` | OpenAI |
| `OPEN_INFERENCE` | OpenInference |
| `PARASAIL` | Parasail |
| `PERPLEXITY` | Perplexity |
| `PHALA` | Phala |
| `RELACE` | Relace |
| `SAMBA_NOVA` | SambaNova |
| `SEED` | Seed |
| `SILICON_FLOW` | SiliconFlow |
| `SOURCEFUL` | Sourceful |
| `STEP_FUN` | StepFun |
| `STEALTH` | Stealth |
| `STREAM_LAKE` | StreamLake |
| `SWITCHPOINT` | Switchpoint |
| `TOGETHER` | Together |
| `UPSTAGE` | Upstage |
| `VENICE` | Venice |
| `WAND_B` | WandB |
| `XIAOMI` | Xiaomi |
| `X_AI` | xAI |
| `Z_AI` | Z.AI |
| `FAKE_PROVIDER` | FakeProvider |
+14
View File
@@ -0,0 +1,14 @@
# ProviderResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `endpoint_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `model_permaslug` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `provider_name` | [Optional[operations.ProviderName]](../operations/providername.md) | :heavy_minus_sign: | N/A |
| `status` | *Nullable[float]* | :heavy_check_mark: | N/A |
| `latency` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `is_byok` | *Optional[bool]* | :heavy_minus_sign: | N/A |