docs: Mintlify MDX docs + docs.json; bump Speakeasy to 1.787.0 (#382)

This commit is contained in:
Matt Apperson
2026-06-30 16:13:28 -04:00
committed by GitHub
parent 778e2e36fb
commit babeffc9aa
2100 changed files with 50407 additions and 16612 deletions
+23
View File
@@ -0,0 +1,23 @@
---
title: "Arena"
---
Design Arena only: arena to query. Defaults to `models` when source is `design-arena`.
## Example Usage
```python
from openrouter.operations import Arena
# Open enum: unrecognized values are captured as UnrecognizedStr
value: Arena = "models"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"models"`
- `"builders"`
- `"agents"`
@@ -0,0 +1,11 @@
---
title: "BulkAddWorkspaceMembersGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -0,0 +1,13 @@
---
title: "BulkAddWorkspaceMembersRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `id` | *str* | :heavy_check_mark: | The workspace ID (UUID) or slug | production |
| `bulk_add_workspace_members_request` | [components.BulkAddWorkspaceMembersRequest](../components/bulkaddworkspacemembersrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"user_ids": [<br/>"user_abc123",<br/>"user_def456"<br/>]<br/>} |
@@ -0,0 +1,11 @@
---
title: "BulkAssignKeysToGuardrailGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -1,5 +1,6 @@
# BulkAssignKeysToGuardrailRequest
---
title: "BulkAssignKeysToGuardrailRequest"
---
## Fields
@@ -9,4 +10,4 @@
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
| `bulk_assign_keys_request` | [components.BulkAssignKeysRequest](../components/bulkassignkeysrequest.md) | :heavy_check_mark: | N/A | {<br/>"key_hashes": [<br/>"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"<br/>]<br/>} |
| `bulk_assign_keys_request` | [components.BulkAssignKeysRequest](../components/bulkassignkeysrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"key_hashes": [<br/>"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"<br/>]<br/>} |
@@ -0,0 +1,11 @@
---
title: "BulkAssignMembersToGuardrailGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -1,5 +1,6 @@
# BulkAssignMembersToGuardrailRequest
---
title: "BulkAssignMembersToGuardrailRequest"
---
## Fields
@@ -9,4 +10,4 @@
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
| `bulk_assign_members_request` | [components.BulkAssignMembersRequest](../components/bulkassignmembersrequest.md) | :heavy_check_mark: | N/A | {<br/>"member_user_ids": [<br/>"user_abc123",<br/>"user_def456"<br/>]<br/>} |
| `bulk_assign_members_request` | [components.BulkAssignMembersRequest](../components/bulkassignmembersrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"member_user_ids": [<br/>"user_abc123",<br/>"user_def456"<br/>]<br/>} |
@@ -0,0 +1,11 @@
---
title: "BulkRemoveWorkspaceMembersGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -0,0 +1,13 @@
---
title: "BulkRemoveWorkspaceMembersRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `id` | *str* | :heavy_check_mark: | The workspace ID (UUID) or slug | production |
| `bulk_remove_workspace_members_request` | [components.BulkRemoveWorkspaceMembersRequest](../components/bulkremoveworkspacemembersrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"user_ids": [<br/>"user_abc123",<br/>"user_def456"<br/>]<br/>} |
@@ -0,0 +1,11 @@
---
title: "BulkUnassignKeysFromGuardrailGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -1,5 +1,6 @@
# BulkUnassignKeysFromGuardrailRequest
---
title: "BulkUnassignKeysFromGuardrailRequest"
---
## Fields
@@ -9,4 +10,4 @@
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
| `bulk_unassign_keys_request` | [components.BulkUnassignKeysRequest](../components/bulkunassignkeysrequest.md) | :heavy_check_mark: | N/A | {<br/>"key_hashes": [<br/>"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"<br/>]<br/>} |
| `bulk_unassign_keys_request` | [components.BulkUnassignKeysRequest](../components/bulkunassignkeysrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"key_hashes": [<br/>"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"<br/>]<br/>} |
@@ -0,0 +1,11 @@
---
title: "BulkUnassignMembersFromGuardrailGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -1,5 +1,6 @@
# BulkUnassignMembersFromGuardrailRequest
---
title: "BulkUnassignMembersFromGuardrailRequest"
---
## Fields
@@ -9,4 +10,4 @@
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
| `bulk_unassign_members_request` | [components.BulkUnassignMembersRequest](../components/bulkunassignmembersrequest.md) | :heavy_check_mark: | N/A | {<br/>"member_user_ids": [<br/>"user_abc123",<br/>"user_def456"<br/>]<br/>} |
| `bulk_unassign_members_request` | [components.BulkUnassignMembersRequest](../components/bulkunassignmembersrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"member_user_ids": [<br/>"user_abc123",<br/>"user_def456"<br/>]<br/>} |
@@ -1,5 +1,6 @@
# Content
---
title: "Content"
---
## Supported Types
@@ -1,9 +1,10 @@
# ContentImageURL
---
title: "ContentImageURL"
---
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
| `image_url` | [operations.ImageURL](../operations/imageurl.md) | :heavy_check_mark: | N/A |
| `type` | [operations.TypeImageURL](../operations/typeimageurl.md) | :heavy_check_mark: | N/A |
| `image_url` | [operations.ImageURL](../operations/imageurl.mdx) | :heavy_check_mark: | N/A |
| `type` | [operations.TypeImageURL](../operations/typeimageurl.mdx) | :heavy_check_mark: | N/A |
@@ -1,9 +1,10 @@
# ContentText
---
title: "ContentText"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `text` | *str* | :heavy_check_mark: | N/A |
| `type` | [operations.TypeText](../operations/typetext.md) | :heavy_check_mark: | N/A |
| `type` | [operations.TypeText](../operations/typetext.mdx) | :heavy_check_mark: | N/A |
+14
View File
@@ -0,0 +1,14 @@
---
title: "CostDetails"
---
Breakdown of upstream inference costs
## Fields
| Field | Type | Required | Description |
| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |
| `upstream_inference_completions_cost` | *float* | :heavy_check_mark: | N/A |
| `upstream_inference_cost` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `upstream_inference_prompt_cost` | *float* | :heavy_check_mark: | N/A |
@@ -0,0 +1,11 @@
---
title: "CreateAudioSpeechGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -0,0 +1,12 @@
---
title: "CreateAudioSpeechRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `speech_request` | [components.SpeechRequest](../components/speechrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"input": "Hello world",<br/>"model": "elevenlabs/eleven-turbo-v2",<br/>"response_format": "pcm",<br/>"speed": 1,<br/>"voice": "alloy"<br/>} |
@@ -0,0 +1,11 @@
---
title: "CreateAudioTranscriptionsGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -0,0 +1,12 @@
---
title: "CreateAudioTranscriptionsRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `stt_request` | [components.STTRequest](../components/sttrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"input_audio": \{<br/>"data": "UklGRiQA...",<br/>"format": "wav"<br/>},<br/>"language": "en",<br/>"model": "openai/whisper-large-v3"<br/>} |
@@ -1,11 +0,0 @@
# CreateAuthKeysCodeCodeChallengeMethod
The method used to generate the code challenge
## Values
| Name | Value |
| ------- | ------- |
| `S256` | S256 |
| `PLAIN` | plain |
@@ -0,0 +1,22 @@
---
title: "CreateAuthKeysCodeCodeChallengeMethod"
---
The method used to generate the code challenge
## Example Usage
```python
from openrouter.operations import CreateAuthKeysCodeCodeChallengeMethod
# Open enum: unrecognized values are captured as UnrecognizedStr
value: CreateAuthKeysCodeCodeChallengeMethod = "S256"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"S256"`
- `"plain"`
@@ -1,4 +1,6 @@
# CreateAuthKeysCodeData
---
title: "CreateAuthKeysCodeData"
---
Auth code data
@@ -1,5 +1,6 @@
# BulkUnassignMembersFromGuardrailGlobals
---
title: "CreateAuthKeysCodeGlobals"
---
## Fields
@@ -1,5 +1,6 @@
# CreateAuthKeysCodeRequest
---
title: "CreateAuthKeysCodeRequest"
---
## Fields
@@ -8,4 +9,4 @@
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `request_body` | [operations.CreateAuthKeysCodeRequestBody](../operations/createauthkeyscoderequestbody.md) | :heavy_check_mark: | N/A | {<br/>"callback_url": "https://myapp.com/auth/callback",<br/>"code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM",<br/>"code_challenge_method": "S256",<br/>"limit": 100<br/>} |
| `request_body` | [operations.CreateAuthKeysCodeRequestBody](../operations/createauthkeyscoderequestbody.mdx) | :heavy_check_mark: | N/A | \{<br/>"callback_url": "https://myapp.com/auth/callback",<br/>"code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM",<br/>"code_challenge_method": "S256",<br/>"limit": 100<br/>} |
@@ -1,5 +1,6 @@
# CreateAuthKeysCodeRequestBody
---
title: "CreateAuthKeysCodeRequestBody"
---
## Fields
@@ -7,9 +8,9 @@
| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `callback_url` | *str* | :heavy_check_mark: | The callback URL to redirect to after authorization. Supports https URLs and localhost/127.0.0.1 URLs on any port for local CLI tools. | https://myapp.com/auth/callback |
| `code_challenge` | *Optional[str]* | :heavy_minus_sign: | PKCE code challenge for enhanced security | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM |
| `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
| `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../operations/createauthkeyscodecodechallengemethod.mdx) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional expiration time for the API key to be created | 2027-12-31T23:59:59Z |
| `key_label` | *Optional[str]* | :heavy_minus_sign: | Optional custom label for the API key. Defaults to the app name if not provided. | My Custom Key |
| `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 |
| `usage_limit_type` | [Optional[operations.UsageLimitType]](../operations/usagelimittype.md) | :heavy_minus_sign: | Optional credit limit reset interval. When set, the credit limit resets on this interval. | monthly |
| `usage_limit_type` | [Optional[operations.UsageLimitType]](../operations/usagelimittype.mdx) | :heavy_minus_sign: | Optional credit limit reset interval. When set, the credit limit resets on this interval. | monthly |
| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Optional workspace ID to associate the API key with | |
@@ -1,4 +1,6 @@
# CreateAuthKeysCodeResponse
---
title: "CreateAuthKeysCodeResponse"
---
Successfully created authorization code
@@ -7,4 +9,4 @@ Successfully created authorization code
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `data` | [operations.CreateAuthKeysCodeData](../operations/createauthkeyscodedata.md) | :heavy_check_mark: | Auth code data | {<br/>"app_id": 12345,<br/>"created_at": "2025-08-24T10:30:00Z",<br/>"id": "auth_code_xyz789"<br/>} |
| `data` | [operations.CreateAuthKeysCodeData](../operations/createauthkeyscodedata.mdx) | :heavy_check_mark: | Auth code data | \{<br/>"app_id": 12345,<br/>"created_at": "2025-08-24T10:30:00Z",<br/>"id": "auth_code_xyz789"<br/>} |
+11
View File
@@ -0,0 +1,11 @@
---
title: "CreateBYOKKeyGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
+12
View File
@@ -0,0 +1,12 @@
---
title: "CreateBYOKKeyRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `create_byok_key_request` | [components.CreateBYOKKeyRequest](../components/createbyokkeyrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"key": "sk-proj-abc123...",<br/>"name": "Production OpenAI Key",<br/>"provider": "openai"<br/>} |
@@ -1,4 +1,6 @@
# CreateEmbeddingsData
---
title: "CreateEmbeddingsData"
---
A single embedding object
@@ -7,6 +9,6 @@ A single embedding object
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
| `embedding` | [operations.Embedding](../operations/embedding.md) | :heavy_check_mark: | Embedding vector as an array of floats or a base64 string | [<br/>0.0023064255,<br/>-0.009327292,<br/>0.015797347<br/>] |
| `embedding` | [operations.Embedding](../operations/embedding.mdx) | :heavy_check_mark: | Embedding vector as an array of floats or a base64 string | [<br/>0.0023064255,<br/>-0.009327292,<br/>0.015797347<br/>] |
| `index` | *Optional[int]* | :heavy_minus_sign: | Index of the embedding in the input list | 0 |
| `object` | [operations.ObjectEmbedding](../operations/objectembedding.md) | :heavy_check_mark: | N/A | |
| `object` | [operations.ObjectEmbedding](../operations/objectembedding.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,11 @@
---
title: "CreateEmbeddingsGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -1,5 +1,6 @@
# CreateEmbeddingsRequest
---
title: "CreateEmbeddingsRequest"
---
## Fields
@@ -8,4 +9,4 @@
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `request_body` | [operations.CreateEmbeddingsRequestBody](../operations/createembeddingsrequestbody.md) | :heavy_check_mark: | N/A | {<br/>"dimensions": 1536,<br/>"input": "The quick brown fox jumps over the lazy dog",<br/>"model": "openai/text-embedding-3-small"<br/>} |
| `request_body` | [operations.CreateEmbeddingsRequestBody](../operations/createembeddingsrequestbody.mdx) | :heavy_check_mark: | N/A | \{<br/>"dimensions": 1536,<br/>"input": "The quick brown fox jumps over the lazy dog",<br/>"model": "openai/text-embedding-3-small"<br/>} |
@@ -1,4 +1,6 @@
# CreateEmbeddingsRequestBody
---
title: "CreateEmbeddingsRequestBody"
---
Embeddings request input
@@ -8,9 +10,9 @@ Embeddings request input
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `dimensions` | *Optional[int]* | :heavy_minus_sign: | The number of dimensions for the output embeddings | 1536 |
| `encoding_format` | [Optional[operations.EncodingFormat]](../operations/encodingformat.md) | :heavy_minus_sign: | The format of the output embeddings | float |
| `input` | [operations.InputUnion](../operations/inputunion.md) | :heavy_check_mark: | Text, token, or multimodal input(s) to embed | The quick brown fox jumps over the lazy dog |
| `encoding_format` | [Optional[operations.EncodingFormat]](../operations/encodingformat.mdx) | :heavy_minus_sign: | The format of the output embeddings | float |
| `input` | [operations.InputUnion](../operations/inputunion.mdx) | :heavy_check_mark: | Text, token, or multimodal input(s) to embed | The quick brown fox jumps over the lazy dog |
| `input_type` | *Optional[str]* | :heavy_minus_sign: | The type of input (e.g. search_query, search_document) | search_query |
| `model` | *str* | :heavy_check_mark: | The model to use for embeddings | openai/text-embedding-3-small |
| `provider` | [OptionalNullable[components.ProviderPreferences]](../components/providerpreferences.md) | :heavy_minus_sign: | N/A | {<br/>"allow_fallbacks": true<br/>} |
| `provider` | [OptionalNullable[components.ProviderPreferences]](../components/providerpreferences.mdx) | :heavy_minus_sign: | N/A | \{<br/>"allow_fallbacks": true<br/>} |
| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for the end-user | user-1234 |
@@ -1,5 +1,6 @@
# CreateEmbeddingsResponse
---
title: "CreateEmbeddingsResponse"
---
## Supported Types
@@ -1,4 +1,6 @@
# CreateEmbeddingsResponseBody
---
title: "CreateEmbeddingsResponseBody"
---
Embeddings response containing embedding vectors
@@ -7,8 +9,8 @@ Embeddings response containing embedding vectors
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `data` | List[[operations.CreateEmbeddingsData](../operations/createembeddingsdata.md)] | :heavy_check_mark: | List of embedding objects | [<br/>{<br/>"embedding": [<br/>0.0023064255,<br/>-0.009327292,<br/>0.015797347<br/>],<br/>"index": 0,<br/>"object": "embedding"<br/>}<br/>] |
| `data` | List[[operations.CreateEmbeddingsData](../operations/createembeddingsdata.mdx)] | :heavy_check_mark: | List of embedding objects | [<br/>\{<br/>"embedding": [<br/>0.0023064255,<br/>-0.009327292,<br/>0.015797347<br/>],<br/>"index": 0,<br/>"object": "embedding"<br/>}<br/>] |
| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the embeddings response | embd-1234567890 |
| `model` | *str* | :heavy_check_mark: | The model used for embeddings | openai/text-embedding-3-small |
| `object` | [operations.Object](../operations/object.md) | :heavy_check_mark: | N/A | |
| `usage` | [Optional[operations.CreateEmbeddingsUsage]](../operations/createembeddingsusage.md) | :heavy_minus_sign: | Token usage statistics | {<br/>"prompt_tokens": 8,<br/>"total_tokens": 8<br/>} |
| `object` | [operations.Object](../operations/object.mdx) | :heavy_check_mark: | N/A | |
| `usage` | [Optional[operations.CreateEmbeddingsUsage]](../operations/createembeddingsusage.mdx) | :heavy_minus_sign: | Token usage statistics | \{<br/>"prompt_tokens": 8,<br/>"total_tokens": 8<br/>} |
+17
View File
@@ -0,0 +1,17 @@
---
title: "CreateEmbeddingsUsage"
---
Token usage statistics
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cost` | *Optional[float]* | :heavy_minus_sign: | Cost of the request in credits | 0.0001 |
| `cost_details` | [OptionalNullable[operations.CostDetails]](../operations/costdetails.mdx) | :heavy_minus_sign: | Breakdown of upstream inference costs | \{<br/>"upstream_inference_completions_cost": 0.0004,<br/>"upstream_inference_cost": null,<br/>"upstream_inference_prompt_cost": 0.0008<br/>} |
| `is_byok` | *Optional[bool]* | :heavy_minus_sign: | Whether a request was made using a Bring Your Own Key configuration | |
| `prompt_tokens` | *int* | :heavy_check_mark: | Number of tokens in the input | 8 |
| `prompt_tokens_details` | [Optional[operations.PromptTokensDetails]](../operations/prompttokensdetails.mdx) | :heavy_minus_sign: | Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included. | |
| `total_tokens` | *int* | :heavy_check_mark: | Total number of tokens used | 8 |
@@ -1,5 +1,6 @@
# BulkUnassignKeysFromGuardrailGlobals
---
title: "CreateGuardrailGlobals"
---
## Fields
@@ -1,5 +1,6 @@
# CreateGuardrailRequest
---
title: "CreateGuardrailRequest"
---
## Fields
@@ -8,4 +9,4 @@
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `create_guardrail_request` | [components.CreateGuardrailRequest](../components/createguardrailrequest.md) | :heavy_check_mark: | N/A | {<br/>"allowed_models": null,<br/>"allowed_providers": [<br/>"openai",<br/>"anthropic",<br/>"deepseek"<br/>],<br/>"content_filter_builtins": [<br/>{<br/>"action": "block",<br/>"slug": "regex-prompt-injection"<br/>}<br/>],<br/>"content_filters": null,<br/>"description": "A guardrail for limiting API usage",<br/>"enforce_zdr_anthropic": true,<br/>"enforce_zdr_google": false,<br/>"enforce_zdr_openai": true,<br/>"enforce_zdr_other": false,<br/>"ignored_models": null,<br/>"ignored_providers": null,<br/>"limit_usd": 50,<br/>"name": "My New Guardrail",<br/>"reset_interval": "monthly"<br/>} |
| `create_guardrail_request` | [components.CreateGuardrailRequest](../components/createguardrailrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"allowed_models": null,<br/>"allowed_providers": [<br/>"openai",<br/>"anthropic",<br/>"deepseek"<br/>],<br/>"content_filter_builtins": [<br/>\{<br/>"action": "block",<br/>"slug": "regex-prompt-injection"<br/>}<br/>],<br/>"content_filters": null,<br/>"description": "A guardrail for limiting API usage",<br/>"enforce_zdr_anthropic": true,<br/>"enforce_zdr_google": false,<br/>"enforce_zdr_openai": true,<br/>"enforce_zdr_other": false,<br/>"ignored_models": null,<br/>"ignored_providers": null,<br/>"limit_usd": 50,<br/>"name": "My New Guardrail",<br/>"reset_interval": "monthly"<br/>} |
+11
View File
@@ -0,0 +1,11 @@
---
title: "CreateImagesGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
+12
View File
@@ -0,0 +1,12 @@
---
title: "CreateImagesRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `image_generation_request` | [components.ImageGenerationRequest](../components/imagegenerationrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"model": "bytedance-seed/seedream-4.5",<br/>"prompt": "a red panda astronaut floating in space, studio lighting"<br/>} |
+18
View File
@@ -0,0 +1,18 @@
---
title: "CreateImagesResponse"
---
## Supported Types
### `components.ImageGenerationResponse`
```python
value: components.ImageGenerationResponse = /* values here */
```
### `Union[eventstreaming.EventStream[components.ImageStreamingResponseData], eventstreaming.EventStreamAsync[components.ImageStreamingResponseData]]`
```python
value: Union[eventstreaming.EventStream[components.ImageStreamingResponseData], eventstreaming.EventStreamAsync[components.ImageStreamingResponseData]] = /* values here */
```
@@ -1,4 +1,6 @@
# CreateKeysData
---
title: "CreateKeysData"
---
The created API key information
+11
View File
@@ -0,0 +1,11 @@
---
title: "CreateKeysGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
-12
View File
@@ -1,12 +0,0 @@
# CreateKeysLimitReset
Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
## Values
| Name | Value |
| --------- | --------- |
| `DAILY` | daily |
| `WEEKLY` | weekly |
| `MONTHLY` | monthly |
+23
View File
@@ -0,0 +1,23 @@
---
title: "CreateKeysLimitReset"
---
Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
## Example Usage
```python
from openrouter.operations import CreateKeysLimitReset
# Open enum: unrecognized values are captured as UnrecognizedStr
value: CreateKeysLimitReset = "daily"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"daily"`
- `"weekly"`
- `"monthly"`
@@ -1,5 +1,6 @@
# CreateKeysRequest
---
title: "CreateKeysRequest"
---
## Fields
@@ -8,4 +9,4 @@
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `request_body` | [operations.CreateKeysRequestBody](../operations/createkeysrequestbody.md) | :heavy_check_mark: | N/A | {<br/>"expires_at": "2027-12-31T23:59:59Z",<br/>"include_byok_in_limit": true,<br/>"limit": 50,<br/>"limit_reset": "monthly",<br/>"name": "My New API Key"<br/>} |
| `request_body` | [operations.CreateKeysRequestBody](../operations/createkeysrequestbody.mdx) | :heavy_check_mark: | N/A | \{<br/>"expires_at": "2027-12-31T23:59:59Z",<br/>"include_byok_in_limit": true,<br/>"limit": 50,<br/>"limit_reset": "monthly",<br/>"name": "My New API Key"<br/>} |
@@ -1,5 +1,6 @@
# CreateKeysRequestBody
---
title: "CreateKeysRequestBody"
---
## Fields
@@ -9,6 +10,6 @@
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected | 2027-12-31T23:59:59Z |
| `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true |
| `limit` | *OptionalNullable[float]* | :heavy_minus_sign: | Optional spending limit for the API key in USD | 50 |
| `limit_reset` | [OptionalNullable[operations.CreateKeysLimitReset]](../operations/createkeyslimitreset.md) | :heavy_minus_sign: | Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. | monthly |
| `limit_reset` | [OptionalNullable[operations.CreateKeysLimitReset]](../operations/createkeyslimitreset.mdx) | :heavy_minus_sign: | Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. | monthly |
| `name` | *str* | :heavy_check_mark: | Name for the new API key | My New API Key |
| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | The workspace to create the API key in. Defaults to the default workspace if not provided. | 0df9e665-d932-5740-b2c7-b52af166bc11 |
@@ -1,4 +1,6 @@
# CreateKeysResponse
---
title: "CreateKeysResponse"
---
API key created successfully
@@ -7,5 +9,5 @@ API key created successfully
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `data` | [operations.CreateKeysData](../operations/createkeysdata.md) | :heavy_check_mark: | The created API key information | {<br/>"byok_usage": 17.38,<br/>"byok_usage_daily": 17.38,<br/>"byok_usage_monthly": 17.38,<br/>"byok_usage_weekly": 17.38,<br/>"created_at": "2025-08-24T10:30:00Z",<br/>"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",<br/>"disabled": false,<br/>"expires_at": "2027-12-31T23:59:59Z",<br/>"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",<br/>"include_byok_in_limit": false,<br/>"label": "sk-or-v1-0e6...1c96",<br/>"limit": 100,<br/>"limit_remaining": 74.5,<br/>"limit_reset": "monthly",<br/>"name": "My Production Key",<br/>"updated_at": "2025-08-24T15:45:00Z",<br/>"usage": 25.5,<br/>"usage_daily": 25.5,<br/>"usage_monthly": 25.5,<br/>"usage_weekly": 25.5,<br/>"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"<br/>} |
| `data` | [operations.CreateKeysData](../operations/createkeysdata.mdx) | :heavy_check_mark: | The created API key information | \{<br/>"byok_usage": 17.38,<br/>"byok_usage_daily": 17.38,<br/>"byok_usage_monthly": 17.38,<br/>"byok_usage_weekly": 17.38,<br/>"created_at": "2025-08-24T10:30:00Z",<br/>"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",<br/>"disabled": false,<br/>"expires_at": "2027-12-31T23:59:59Z",<br/>"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",<br/>"include_byok_in_limit": false,<br/>"label": "sk-or-v1-0e6...1c96",<br/>"limit": 100,<br/>"limit_remaining": 74.5,<br/>"limit_reset": "monthly",<br/>"name": "My Production Key",<br/>"updated_at": "2025-08-24T15:45:00Z",<br/>"usage": 25.5,<br/>"usage_daily": 25.5,<br/>"usage_monthly": 25.5,<br/>"usage_weekly": 25.5,<br/>"workspace_id": "0df9e665-d932-5740-b2c7-b52af166bc11"<br/>} |
| `key` | *str* | :heavy_check_mark: | The actual API key string (only shown once) | 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 |
@@ -0,0 +1,11 @@
---
title: "CreateObservabilityDestinationGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -0,0 +1,12 @@
---
title: "CreateObservabilityDestinationRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `create_observability_destination_request` | [components.CreateObservabilityDestinationRequest](../components/createobservabilitydestinationrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"config": \{<br/>"baseUrl": "https://us.cloud.langfuse.com",<br/>"publicKey": "pk-l...EfGh",<br/>"secretKey": "sk-l...AbCd"<br/>},<br/>"name": "Production Langfuse",<br/>"type": "langfuse"<br/>} |
@@ -0,0 +1,11 @@
---
title: "CreatePresetsChatCompletionsGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -1,5 +1,6 @@
# SendChatCompletionRequestRequest
---
title: "CreatePresetsChatCompletionsRequest"
---
## Fields
@@ -8,5 +9,5 @@
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `x_open_router_metadata` | [Optional[components.MetadataLevel]](../components/metadatalevel.md) | :heavy_minus_sign: | Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility. | enabled |
| `chat_request` | [components.ChatRequest](../components/chatrequest.md) | :heavy_check_mark: | N/A | {<br/>"max_tokens": 150,<br/>"messages": [<br/>{<br/>"content": "You are a helpful assistant.",<br/>"role": "system"<br/>},<br/>{<br/>"content": "What is the capital of France?",<br/>"role": "user"<br/>}<br/>],<br/>"model": "openai/gpt-4",<br/>"temperature": 0.7<br/>} |
| `slug` | *str* | :heavy_check_mark: | URL-safe slug identifying the preset. Created if it does not exist. | my-preset |
| `chat_request` | [components.ChatRequest](../components/chatrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"max_tokens": 150,<br/>"messages": [<br/>\{<br/>"content": "You are a helpful assistant.",<br/>"role": "system"<br/>},<br/>\{<br/>"content": "What is the capital of France?",<br/>"role": "user"<br/>}<br/>],<br/>"model": "openai/gpt-4",<br/>"temperature": 0.7<br/>} |
@@ -0,0 +1,11 @@
---
title: "CreatePresetsMessagesGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -0,0 +1,13 @@
---
title: "CreatePresetsMessagesRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `slug` | *str* | :heavy_check_mark: | URL-safe slug identifying the preset. Created if it does not exist. | my-preset |
| `messages_request` | [components.MessagesRequest](../components/messagesrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"max_tokens": 1024,<br/>"messages": [<br/>\{<br/>"content": "Hello, how are you?",<br/>"role": "user"<br/>}<br/>],<br/>"model": "anthropic/claude-4.5-sonnet-20250929",<br/>"temperature": 0.7<br/>} |
@@ -0,0 +1,11 @@
---
title: "CreatePresetsResponsesGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -0,0 +1,13 @@
---
title: "CreatePresetsResponsesRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `slug` | *str* | :heavy_check_mark: | URL-safe slug identifying the preset. Created if it does not exist. | my-preset |
| `responses_request` | [components.ResponsesRequest](../components/responsesrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"input": [<br/>\{<br/>"content": "Hello, how are you?",<br/>"role": "user",<br/>"type": "message"<br/>}<br/>],<br/>"model": "anthropic/claude-4.5-sonnet-20250929",<br/>"temperature": 0.7,<br/>"tools": [<br/>\{<br/>"description": "Get the current weather in a given location",<br/>"name": "get_current_weather",<br/>"parameters": \{<br/>"properties": \{<br/>"location": \{<br/>"type": "string"<br/>}<br/>},<br/>"type": "object"<br/>},<br/>"type": "function"<br/>}<br/>],<br/>"top_p": 0.9<br/>} |
+11
View File
@@ -0,0 +1,11 @@
---
title: "CreateRerankGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
+12
View File
@@ -0,0 +1,12 @@
---
title: "CreateRerankRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `request_body` | [operations.CreateRerankRequestBody](../operations/creatererankrequestbody.mdx) | :heavy_check_mark: | N/A | \{<br/>"documents": [<br/>"Paris is the capital of France.",<br/>"Berlin is the capital of Germany."<br/>],<br/>"model": "cohere/rerank-v3.5",<br/>"query": "What is the capital of France?",<br/>"top_n": 3<br/>} |
@@ -0,0 +1,16 @@
---
title: "CreateRerankRequestBody"
---
Rerank request input
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `documents` | List[[operations.Document](../operations/document.mdx)] | :heavy_check_mark: | The list of documents to rerank. Documents may be plain strings, or structured objects with `text` and/or `image` for multimodal models. | [<br/>"Paris is the capital of France.",<br/>"Berlin is the capital of Germany."<br/>] |
| `model` | *str* | :heavy_check_mark: | The rerank model to use | cohere/rerank-v3.5 |
| `provider` | [OptionalNullable[components.ProviderPreferences]](../components/providerpreferences.mdx) | :heavy_minus_sign: | N/A | \{<br/>"allow_fallbacks": true<br/>} |
| `query` | *str* | :heavy_check_mark: | The search query to rerank documents against | What is the capital of France? |
| `top_n` | *Optional[int]* | :heavy_minus_sign: | Number of most relevant documents to return | 3 |
+18
View File
@@ -0,0 +1,18 @@
---
title: "CreateRerankResponse"
---
## Supported Types
### `operations.CreateRerankResponseBody`
```python
value: operations.CreateRerankResponseBody = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,16 @@
---
title: "CreateRerankResponseBody"
---
Rerank response containing ranked results
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the rerank response (ORID format) | gen-rerank-1234567890-abc |
| `model` | *str* | :heavy_check_mark: | The model used for reranking | cohere/rerank-v3.5 |
| `provider` | *Optional[str]* | :heavy_minus_sign: | The provider that served the rerank request | Cohere |
| `results` | List[[operations.Result](../operations/result.mdx)] | :heavy_check_mark: | List of rerank results sorted by relevance | [<br/>\{<br/>"document": \{<br/>"text": "Paris is the capital of France."<br/>},<br/>"index": 0,<br/>"relevance_score": 0.98<br/>}<br/>] |
| `usage` | [Optional[operations.CreateRerankUsage]](../operations/creatererankusage.mdx) | :heavy_minus_sign: | Usage statistics | \{<br/>"search_units": 1,<br/>"total_tokens": 150<br/>} |
+14
View File
@@ -0,0 +1,14 @@
---
title: "CreateRerankUsage"
---
Usage statistics
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `cost` | *Optional[float]* | :heavy_minus_sign: | Cost of the request in credits | 0.001 |
| `search_units` | *Optional[int]* | :heavy_minus_sign: | Number of search units consumed (Cohere billing) | 1 |
| `total_tokens` | *Optional[int]* | :heavy_minus_sign: | Total number of tokens used | 150 |
-10
View File
@@ -1,10 +0,0 @@
# CreateResponsesGlobals
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -0,0 +1,11 @@
---
title: "CreateResponsesGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -1,5 +1,6 @@
# CreateResponsesRequest
---
title: "CreateResponsesRequest"
---
## Fields
@@ -8,5 +9,5 @@
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `x_open_router_metadata` | [Optional[components.MetadataLevel]](../components/metadatalevel.md) | :heavy_minus_sign: | Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility. | enabled |
| `responses_request` | [components.ResponsesRequest](../components/responsesrequest.md) | :heavy_check_mark: | N/A | {<br/>"input": [<br/>{<br/>"content": "Hello, how are you?",<br/>"role": "user",<br/>"type": "message"<br/>}<br/>],<br/>"model": "anthropic/claude-4.5-sonnet-20250929",<br/>"temperature": 0.7,<br/>"tools": [<br/>{<br/>"description": "Get the current weather in a given location",<br/>"name": "get_current_weather",<br/>"parameters": {<br/>"properties": {<br/>"location": {<br/>"type": "string"<br/>}<br/>},<br/>"type": "object"<br/>},<br/>"type": "function"<br/>}<br/>],<br/>"top_p": 0.9<br/>} |
| `x_open_router_metadata` | [Optional[components.MetadataLevel]](../components/metadatalevel.mdx) | :heavy_minus_sign: | Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility. | enabled |
| `responses_request` | [components.ResponsesRequest](../components/responsesrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"input": [<br/>\{<br/>"content": "Hello, how are you?",<br/>"role": "user",<br/>"type": "message"<br/>}<br/>],<br/>"model": "anthropic/claude-4.5-sonnet-20250929",<br/>"temperature": 0.7,<br/>"tools": [<br/>\{<br/>"description": "Get the current weather in a given location",<br/>"name": "get_current_weather",<br/>"parameters": \{<br/>"properties": \{<br/>"location": \{<br/>"type": "string"<br/>}<br/>},<br/>"type": "object"<br/>},<br/>"type": "function"<br/>}<br/>],<br/>"top_p": 0.9<br/>} |
@@ -1,5 +1,6 @@
# CreateResponsesResponse
---
title: "CreateResponsesResponse"
---
## Supported Types
+11
View File
@@ -0,0 +1,11 @@
---
title: "CreateVideosGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
+12
View File
@@ -0,0 +1,12 @@
---
title: "CreateVideosRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `video_generation_request` | [components.VideoGenerationRequest](../components/videogenerationrequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"aspect_ratio": "16:9",<br/>"duration": 8,<br/>"model": "google/veo-3.1",<br/>"prompt": "A serene mountain landscape at sunset",<br/>"resolution": "720p"<br/>} |
@@ -0,0 +1,11 @@
---
title: "CreateWorkspaceGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -0,0 +1,12 @@
---
title: "CreateWorkspaceRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `create_workspace_request` | [components.CreateWorkspaceRequest](../components/createworkspacerequest.mdx) | :heavy_check_mark: | N/A | \{<br/>"default_image_model": "openai/dall-e-3",<br/>"default_provider_sort": "price",<br/>"default_text_model": "openai/gpt-4o",<br/>"description": "Production environment workspace",<br/>"name": "Production",<br/>"slug": "production"<br/>} |
+267
View File
@@ -0,0 +1,267 @@
---
title: "Datacenter"
---
## Example Usage
```python
from openrouter.operations import Datacenter
# Open enum: unrecognized values are captured as UnrecognizedStr
value: Datacenter = "AD"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"AD"`
- `"AE"`
- `"AF"`
- `"AG"`
- `"AI"`
- `"AL"`
- `"AM"`
- `"AO"`
- `"AQ"`
- `"AR"`
- `"AS"`
- `"AT"`
- `"AU"`
- `"AW"`
- `"AX"`
- `"AZ"`
- `"BA"`
- `"BB"`
- `"BD"`
- `"BE"`
- `"BF"`
- `"BG"`
- `"BH"`
- `"BI"`
- `"BJ"`
- `"BL"`
- `"BM"`
- `"BN"`
- `"BO"`
- `"BQ"`
- `"BR"`
- `"BS"`
- `"BT"`
- `"BV"`
- `"BW"`
- `"BY"`
- `"BZ"`
- `"CA"`
- `"CC"`
- `"CD"`
- `"CF"`
- `"CG"`
- `"CH"`
- `"CI"`
- `"CK"`
- `"CL"`
- `"CM"`
- `"CN"`
- `"CO"`
- `"CR"`
- `"CU"`
- `"CV"`
- `"CW"`
- `"CX"`
- `"CY"`
- `"CZ"`
- `"DE"`
- `"DJ"`
- `"DK"`
- `"DM"`
- `"DO"`
- `"DZ"`
- `"EC"`
- `"EE"`
- `"EG"`
- `"EH"`
- `"ER"`
- `"ES"`
- `"ET"`
- `"FI"`
- `"FJ"`
- `"FK"`
- `"FM"`
- `"FO"`
- `"FR"`
- `"GA"`
- `"GB"`
- `"GD"`
- `"GE"`
- `"GF"`
- `"GG"`
- `"GH"`
- `"GI"`
- `"GL"`
- `"GM"`
- `"GN"`
- `"GP"`
- `"GQ"`
- `"GR"`
- `"GS"`
- `"GT"`
- `"GU"`
- `"GW"`
- `"GY"`
- `"HK"`
- `"HM"`
- `"HN"`
- `"HR"`
- `"HT"`
- `"HU"`
- `"ID"`
- `"IE"`
- `"IL"`
- `"IM"`
- `"IN"`
- `"IO"`
- `"IQ"`
- `"IR"`
- `"IS"`
- `"IT"`
- `"JE"`
- `"JM"`
- `"JO"`
- `"JP"`
- `"KE"`
- `"KG"`
- `"KH"`
- `"KI"`
- `"KM"`
- `"KN"`
- `"KP"`
- `"KR"`
- `"KW"`
- `"KY"`
- `"KZ"`
- `"LA"`
- `"LB"`
- `"LC"`
- `"LI"`
- `"LK"`
- `"LR"`
- `"LS"`
- `"LT"`
- `"LU"`
- `"LV"`
- `"LY"`
- `"MA"`
- `"MC"`
- `"MD"`
- `"ME"`
- `"MF"`
- `"MG"`
- `"MH"`
- `"MK"`
- `"ML"`
- `"MM"`
- `"MN"`
- `"MO"`
- `"MP"`
- `"MQ"`
- `"MR"`
- `"MS"`
- `"MT"`
- `"MU"`
- `"MV"`
- `"MW"`
- `"MX"`
- `"MY"`
- `"MZ"`
- `"NA"`
- `"NC"`
- `"NE"`
- `"NF"`
- `"NG"`
- `"NI"`
- `"NL"`
- `"NO"`
- `"NP"`
- `"NR"`
- `"NU"`
- `"NZ"`
- `"OM"`
- `"PA"`
- `"PE"`
- `"PF"`
- `"PG"`
- `"PH"`
- `"PK"`
- `"PL"`
- `"PM"`
- `"PN"`
- `"PR"`
- `"PS"`
- `"PT"`
- `"PW"`
- `"PY"`
- `"QA"`
- `"RE"`
- `"RO"`
- `"RS"`
- `"RU"`
- `"RW"`
- `"SA"`
- `"SB"`
- `"SC"`
- `"SD"`
- `"SE"`
- `"SG"`
- `"SH"`
- `"SI"`
- `"SJ"`
- `"SK"`
- `"SL"`
- `"SM"`
- `"SN"`
- `"SO"`
- `"SR"`
- `"SS"`
- `"ST"`
- `"SV"`
- `"SX"`
- `"SY"`
- `"SZ"`
- `"TC"`
- `"TD"`
- `"TF"`
- `"TG"`
- `"TH"`
- `"TJ"`
- `"TK"`
- `"TL"`
- `"TM"`
- `"TN"`
- `"TO"`
- `"TR"`
- `"TT"`
- `"TV"`
- `"TW"`
- `"TZ"`
- `"UA"`
- `"UG"`
- `"UM"`
- `"US"`
- `"UY"`
- `"UZ"`
- `"VA"`
- `"VC"`
- `"VE"`
- `"VG"`
- `"VI"`
- `"VN"`
- `"VU"`
- `"WF"`
- `"WS"`
- `"YE"`
- `"YT"`
- `"ZA"`
- `"ZM"`
- `"ZW"`
+11
View File
@@ -0,0 +1,11 @@
---
title: "DeleteBYOKKeyGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
+12
View File
@@ -0,0 +1,12 @@
---
title: "DeleteBYOKKeyRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `id` | *str* | :heavy_check_mark: | The BYOK credential ID (UUID). | 11111111-2222-3333-4444-555555555555 |
+11
View File
@@ -0,0 +1,11 @@
---
title: "DeleteFileGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
+13
View File
@@ -0,0 +1,13 @@
---
title: "DeleteFileRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `file_id` | *str* | :heavy_check_mark: | N/A | file_011CNha8iCJcU1wXNR6q4V8w |
| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Workspace to scope the request to. Defaults to the callers default workspace. | a103d8b6-42f0-4e50-9a3c-bf41e2c3c1a7 |
-10
View File
@@ -1,10 +0,0 @@
# DeleteGuardrailGlobals
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -0,0 +1,11 @@
---
title: "DeleteGuardrailGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -1,5 +1,6 @@
# DeleteGuardrailRequest
---
title: "DeleteGuardrailRequest"
---
## Fields
-10
View File
@@ -1,10 +0,0 @@
# DeleteKeysGlobals
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
+11
View File
@@ -0,0 +1,11 @@
---
title: "DeleteKeysGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -1,5 +1,6 @@
# DeleteKeysRequest
---
title: "DeleteKeysRequest"
---
## Fields
@@ -1,4 +1,6 @@
# DeleteKeysResponse
---
title: "DeleteKeysResponse"
---
API key deleted successfully
@@ -0,0 +1,11 @@
---
title: "DeleteObservabilityDestinationGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -0,0 +1,12 @@
---
title: "DeleteObservabilityDestinationRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `id` | *str* | :heavy_check_mark: | The destination ID (UUID). | 99999999-aaaa-bbbb-cccc-dddddddddddd |
@@ -0,0 +1,11 @@
---
title: "DeleteWorkspaceBudgetGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -0,0 +1,13 @@
---
title: "DeleteWorkspaceBudgetRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `id` | *str* | :heavy_check_mark: | The workspace ID (UUID) or slug | production |
| `interval` | [components.WorkspaceBudgetInterval](../components/workspacebudgetinterval.mdx) | :heavy_check_mark: | Budget reset interval. Use "lifetime" for a one-time budget that never resets. | monthly |
@@ -0,0 +1,11 @@
---
title: "DeleteWorkspaceGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -0,0 +1,12 @@
---
title: "DeleteWorkspaceRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `id` | *str* | :heavy_check_mark: | The workspace ID (UUID) or slug | production |
+10
View File
@@ -0,0 +1,10 @@
---
title: "Dimension"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- |
| `display_label` | *str* | :heavy_check_mark: | Human-readable label | Model |
| `name` | *str* | :heavy_check_mark: | Dimension identifier used in query requests | model |
+20
View File
@@ -0,0 +1,20 @@
---
title: "Direction"
---
## Example Usage
```python
from openrouter.operations import Direction
# Open enum: unrecognized values are captured as UnrecognizedStr
value: Direction = "asc"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"asc"`
- `"desc"`
+25
View File
@@ -0,0 +1,25 @@
---
title: "DisplayFormat"
---
How this metric value should be formatted for display (e.g. percent → multiply by 100 and append %, currency → prefix with $)
## Example Usage
```python
from openrouter.operations import DisplayFormat
# Open enum: unrecognized values are captured as UnrecognizedStr
value: DisplayFormat = "number"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"number"`
- `"currency"`
- `"percent"`
- `"latency"`
- `"throughput"`
+22
View File
@@ -0,0 +1,22 @@
---
title: "Distillable"
---
Filter by distillation capability. "true" returns only distillable models, "false" excludes them.
## Example Usage
```python
from openrouter.operations import Distillable
# Open enum: unrecognized values are captured as UnrecognizedStr
value: Distillable = "true"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"true"`
- `"false"`
+21
View File
@@ -0,0 +1,21 @@
---
title: "Document"
---
A document to rerank. Either a plain string, or a structured object with optional `text` and/or `image`.
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `operations.DocumentRequest`
```python
value: operations.DocumentRequest = /* values here */
```
+13
View File
@@ -0,0 +1,13 @@
---
title: "DocumentRequest"
---
A structured document with optional text and/or image content. At least one of `text` or `image` must be provided.
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `image` | *Optional[str]* | :heavy_minus_sign: | An image associated with the document, as a remote URL (http/https) or a base64-encoded data URI (data:image/...). | https://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Phytogenic.png |
| `text` | *Optional[str]* | :heavy_minus_sign: | The document text | AI enables robots to perceive, plan, and act autonomously. |
+13
View File
@@ -0,0 +1,13 @@
---
title: "DocumentResponse"
---
The document object echoing the original input (text and/or image)
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
| `image` | *Optional[str]* | :heavy_minus_sign: | The image (URL or data URI) from the original document | https://example.com/image.png |
| `text` | *Optional[str]* | :heavy_minus_sign: | The document text | Paris is the capital of France. |
@@ -0,0 +1,11 @@
---
title: "DownloadFileContentGlobals"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -0,0 +1,13 @@
---
title: "DownloadFileContentRequest"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `file_id` | *str* | :heavy_check_mark: | N/A | file_011CNha8iCJcU1wXNR6q4V8w |
| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Workspace to scope the request to. Defaults to the callers default workspace. | a103d8b6-42f0-4e50-9a3c-bf41e2c3c1a7 |
@@ -1,4 +1,6 @@
# Embedding
---
title: "Embedding"
---
Embedding vector as an array of floats or a base64 string
-11
View File
@@ -1,11 +0,0 @@
# EncodingFormat
The format of the output embeddings
## Values
| Name | Value |
| -------- | -------- |
| `FLOAT` | float |
| `BASE64` | base64 |

Some files were not shown because too many files have changed in this diff Show More