mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-06 13:20:23 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
faad3acf8d | ||
|
|
b2098ff28e | ||
|
|
1cad51abb6 |
+67
-11
@@ -1,12 +1,12 @@
|
||||
lockVersion: 2.0.0
|
||||
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
|
||||
management:
|
||||
docChecksum: 4cc0fd0666832ffd4990d56ea4d60d8a
|
||||
docChecksum: a8fed71df7458c6d948fc393e17aa9bc
|
||||
docVersion: 1.0.0
|
||||
speakeasyVersion: 1.666.0
|
||||
generationVersion: 2.768.0
|
||||
releaseVersion: 0.4.1
|
||||
configChecksum: 25abf1229cf681cc15488099121619e5
|
||||
releaseVersion: 0.7.0
|
||||
configChecksum: fb83a92d2ee84da7390a12353d622d23
|
||||
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
published: true
|
||||
@@ -14,6 +14,7 @@ features:
|
||||
python:
|
||||
acceptHeaders: 3.0.0
|
||||
additionalDependencies: 1.0.0
|
||||
additionalProperties: 1.0.1
|
||||
constsAndDefaults: 1.0.5
|
||||
core: 5.23.13
|
||||
defaultEnabledRetries: 0.2.0
|
||||
@@ -424,10 +425,11 @@ generatedFiles:
|
||||
- docs/components/schema17responsehealing.md
|
||||
- docs/components/schema17web.md
|
||||
- docs/components/schema19.md
|
||||
- docs/components/schema19reasoningencrypted.md
|
||||
- docs/components/schema19reasoningsummary.md
|
||||
- docs/components/schema19reasoningtext.md
|
||||
- docs/components/schema21.md
|
||||
- docs/components/schema20.md
|
||||
- docs/components/schema20reasoningencrypted.md
|
||||
- docs/components/schema20reasoningsummary.md
|
||||
- docs/components/schema20reasoningtext.md
|
||||
- docs/components/schema22.md
|
||||
- docs/components/schema3.md
|
||||
- docs/components/schema5.md
|
||||
- docs/components/schema5enum.md
|
||||
@@ -447,6 +449,7 @@ generatedFiles:
|
||||
- docs/components/toolresponsemessagecontent.md
|
||||
- docs/components/toomanyrequestsresponseerrordata.md
|
||||
- docs/components/topproviderinfo.md
|
||||
- docs/components/trace.md
|
||||
- docs/components/truncation.md
|
||||
- docs/components/ttl.md
|
||||
- docs/components/type.md
|
||||
@@ -498,15 +501,19 @@ generatedFiles:
|
||||
- docs/models/internal/globals.md
|
||||
- docs/models/utils/retryconfig.md
|
||||
- docs/operations/apitype.md
|
||||
- docs/operations/bulkassignkeystoguardrailglobals.md
|
||||
- docs/operations/bulkassignkeystoguardrailrequest.md
|
||||
- docs/operations/bulkassignkeystoguardrailrequestbody.md
|
||||
- docs/operations/bulkassignkeystoguardrailresponse.md
|
||||
- docs/operations/bulkassignmemberstoguardrailglobals.md
|
||||
- docs/operations/bulkassignmemberstoguardrailrequest.md
|
||||
- docs/operations/bulkassignmemberstoguardrailrequestbody.md
|
||||
- docs/operations/bulkassignmemberstoguardrailresponse.md
|
||||
- docs/operations/bulkunassignkeysfromguardrailglobals.md
|
||||
- docs/operations/bulkunassignkeysfromguardrailrequest.md
|
||||
- docs/operations/bulkunassignkeysfromguardrailrequestbody.md
|
||||
- docs/operations/bulkunassignkeysfromguardrailresponse.md
|
||||
- docs/operations/bulkunassignmembersfromguardrailglobals.md
|
||||
- docs/operations/bulkunassignmembersfromguardrailrequest.md
|
||||
- docs/operations/bulkunassignmembersfromguardrailrequestbody.md
|
||||
- docs/operations/bulkunassignmembersfromguardrailresponse.md
|
||||
@@ -517,77 +524,119 @@ generatedFiles:
|
||||
- docs/operations/contenttext.md
|
||||
- docs/operations/createauthkeyscodecodechallengemethod.md
|
||||
- docs/operations/createauthkeyscodedata.md
|
||||
- docs/operations/createauthkeyscodeglobals.md
|
||||
- docs/operations/createauthkeyscoderequest.md
|
||||
- docs/operations/createauthkeyscoderequestbody.md
|
||||
- docs/operations/createauthkeyscoderesponse.md
|
||||
- docs/operations/createcoinbasechargedata.md
|
||||
- docs/operations/createcoinbasechargeglobals.md
|
||||
- docs/operations/createcoinbasechargerequest.md
|
||||
- docs/operations/createcoinbasechargeresponse.md
|
||||
- docs/operations/createcoinbasechargesecurity.md
|
||||
- docs/operations/createembeddingsdata.md
|
||||
- docs/operations/createembeddingsglobals.md
|
||||
- docs/operations/createembeddingsrequest.md
|
||||
- docs/operations/createembeddingsrequestbody.md
|
||||
- docs/operations/createembeddingsresponse.md
|
||||
- docs/operations/createembeddingsresponsebody.md
|
||||
- docs/operations/createguardraildata.md
|
||||
- docs/operations/createguardrailglobals.md
|
||||
- docs/operations/createguardrailrequest.md
|
||||
- docs/operations/createguardrailrequestbody.md
|
||||
- docs/operations/createguardrailresetintervalrequest.md
|
||||
- docs/operations/createguardrailresetintervalresponse.md
|
||||
- docs/operations/createguardrailresponse.md
|
||||
- docs/operations/createkeysdata.md
|
||||
- docs/operations/createkeysglobals.md
|
||||
- docs/operations/createkeyslimitreset.md
|
||||
- docs/operations/createkeysrequest.md
|
||||
- docs/operations/createkeysrequestbody.md
|
||||
- docs/operations/createkeysresponse.md
|
||||
- docs/operations/createresponsesglobals.md
|
||||
- docs/operations/createresponsesrequest.md
|
||||
- docs/operations/createresponsesresponse.md
|
||||
- docs/operations/createresponsesresponsebody.md
|
||||
- docs/operations/deleteguardrailglobals.md
|
||||
- docs/operations/deleteguardrailrequest.md
|
||||
- docs/operations/deleteguardrailresponse.md
|
||||
- docs/operations/deletekeysglobals.md
|
||||
- docs/operations/deletekeysrequest.md
|
||||
- docs/operations/deletekeysresponse.md
|
||||
- docs/operations/embedding.md
|
||||
- docs/operations/encodingformat.md
|
||||
- docs/operations/exchangeauthcodeforapikeycodechallengemethod.md
|
||||
- docs/operations/exchangeauthcodeforapikeyglobals.md
|
||||
- docs/operations/exchangeauthcodeforapikeyrequest.md
|
||||
- docs/operations/exchangeauthcodeforapikeyrequestbody.md
|
||||
- docs/operations/exchangeauthcodeforapikeyresponse.md
|
||||
- docs/operations/getcreditsdata.md
|
||||
- docs/operations/getcreditsglobals.md
|
||||
- docs/operations/getcreditsrequest.md
|
||||
- docs/operations/getcreditsresponse.md
|
||||
- docs/operations/getcurrentkeydata.md
|
||||
- docs/operations/getcurrentkeyglobals.md
|
||||
- docs/operations/getcurrentkeyrequest.md
|
||||
- docs/operations/getcurrentkeyresponse.md
|
||||
- docs/operations/getgenerationdata.md
|
||||
- docs/operations/getgenerationglobals.md
|
||||
- docs/operations/getgenerationrequest.md
|
||||
- docs/operations/getgenerationresponse.md
|
||||
- docs/operations/getguardraildata.md
|
||||
- docs/operations/getguardrailglobals.md
|
||||
- docs/operations/getguardrailrequest.md
|
||||
- docs/operations/getguardrailresetinterval.md
|
||||
- docs/operations/getguardrailresponse.md
|
||||
- docs/operations/getkeydata.md
|
||||
- docs/operations/getkeyglobals.md
|
||||
- docs/operations/getkeyrequest.md
|
||||
- docs/operations/getkeyresponse.md
|
||||
- docs/operations/getmodelsglobals.md
|
||||
- docs/operations/getmodelsrequest.md
|
||||
- docs/operations/getuseractivityglobals.md
|
||||
- docs/operations/getuseractivityrequest.md
|
||||
- docs/operations/getuseractivityresponse.md
|
||||
- docs/operations/imageurl.md
|
||||
- docs/operations/input.md
|
||||
- docs/operations/inputunion.md
|
||||
- docs/operations/listdata.md
|
||||
- docs/operations/listembeddingsmodelsglobals.md
|
||||
- docs/operations/listembeddingsmodelsrequest.md
|
||||
- docs/operations/listendpointsglobals.md
|
||||
- docs/operations/listendpointsrequest.md
|
||||
- docs/operations/listendpointsresponse.md
|
||||
- docs/operations/listendpointszdrglobals.md
|
||||
- docs/operations/listendpointszdrrequest.md
|
||||
- docs/operations/listendpointszdrresponse.md
|
||||
- docs/operations/listglobals.md
|
||||
- docs/operations/listguardrailkeyassignmentsdata.md
|
||||
- docs/operations/listguardrailkeyassignmentsglobals.md
|
||||
- docs/operations/listguardrailkeyassignmentsrequest.md
|
||||
- docs/operations/listguardrailkeyassignmentsresponse.md
|
||||
- docs/operations/listguardrailmemberassignmentsdata.md
|
||||
- docs/operations/listguardrailmemberassignmentsglobals.md
|
||||
- docs/operations/listguardrailmemberassignmentsrequest.md
|
||||
- docs/operations/listguardrailmemberassignmentsresponse.md
|
||||
- docs/operations/listguardrailsdata.md
|
||||
- docs/operations/listguardrailsglobals.md
|
||||
- docs/operations/listguardrailsrequest.md
|
||||
- docs/operations/listguardrailsresetinterval.md
|
||||
- docs/operations/listguardrailsresponse.md
|
||||
- docs/operations/listkeyassignmentsdata.md
|
||||
- docs/operations/listkeyassignmentsglobals.md
|
||||
- docs/operations/listkeyassignmentsrequest.md
|
||||
- docs/operations/listkeyassignmentsresponse.md
|
||||
- docs/operations/listmemberassignmentsdata.md
|
||||
- docs/operations/listmemberassignmentsglobals.md
|
||||
- docs/operations/listmemberassignmentsrequest.md
|
||||
- docs/operations/listmemberassignmentsresponse.md
|
||||
- docs/operations/listmodelscountglobals.md
|
||||
- docs/operations/listmodelscountrequest.md
|
||||
- docs/operations/listmodelsuserglobals.md
|
||||
- docs/operations/listmodelsuserrequest.md
|
||||
- docs/operations/listmodelsusersecurity.md
|
||||
- docs/operations/listprovidersdata.md
|
||||
- docs/operations/listprovidersglobals.md
|
||||
- docs/operations/listprovidersrequest.md
|
||||
- docs/operations/listprovidersresponse.md
|
||||
- docs/operations/listrequest.md
|
||||
- docs/operations/listresponse.md
|
||||
@@ -597,17 +646,21 @@ generatedFiles:
|
||||
- docs/operations/providername.md
|
||||
- docs/operations/providerresponse.md
|
||||
- docs/operations/ratelimit.md
|
||||
- docs/operations/sendchatcompletionrequestglobals.md
|
||||
- docs/operations/sendchatcompletionrequestrequest.md
|
||||
- docs/operations/sendchatcompletionrequestresponse.md
|
||||
- docs/operations/transferintent.md
|
||||
- docs/operations/typeimageurl.md
|
||||
- docs/operations/typetext.md
|
||||
- docs/operations/updateguardraildata.md
|
||||
- docs/operations/updateguardrailglobals.md
|
||||
- docs/operations/updateguardrailrequest.md
|
||||
- docs/operations/updateguardrailrequestbody.md
|
||||
- docs/operations/updateguardrailresetintervalrequest.md
|
||||
- docs/operations/updateguardrailresetintervalresponse.md
|
||||
- docs/operations/updateguardrailresponse.md
|
||||
- docs/operations/updatekeysdata.md
|
||||
- docs/operations/updatekeysglobals.md
|
||||
- docs/operations/updatekeyslimitreset.md
|
||||
- docs/operations/updatekeysrequest.md
|
||||
- docs/operations/updatekeysrequestbody.md
|
||||
@@ -645,6 +698,7 @@ generatedFiles:
|
||||
- src/openrouter/components/_schema14.py
|
||||
- src/openrouter/components/_schema17.py
|
||||
- src/openrouter/components/_schema19.py
|
||||
- src/openrouter/components/_schema20.py
|
||||
- src/openrouter/components/_schema5.py
|
||||
- src/openrouter/components/activityitem.py
|
||||
- src/openrouter/components/assistantmessage.py
|
||||
@@ -852,6 +906,7 @@ generatedFiles:
|
||||
- src/openrouter/operations/getmodels.py
|
||||
- src/openrouter/operations/getuseractivity.py
|
||||
- src/openrouter/operations/list.py
|
||||
- src/openrouter/operations/listembeddingsmodels.py
|
||||
- src/openrouter/operations/listendpoints.py
|
||||
- src/openrouter/operations/listendpointszdr.py
|
||||
- src/openrouter/operations/listguardrailkeyassignments.py
|
||||
@@ -859,6 +914,7 @@ generatedFiles:
|
||||
- src/openrouter/operations/listguardrails.py
|
||||
- src/openrouter/operations/listkeyassignments.py
|
||||
- src/openrouter/operations/listmemberassignments.py
|
||||
- src/openrouter/operations/listmodelscount.py
|
||||
- src/openrouter/operations/listmodelsuser.py
|
||||
- src/openrouter/operations/listproviders.py
|
||||
- src/openrouter/operations/sendchatcompletionrequest.py
|
||||
@@ -935,7 +991,7 @@ examples:
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"403":
|
||||
application/json: {"error": {"code": 403, "message": "Only provisioning keys can perform this operation"}}
|
||||
application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
getCredits:
|
||||
@@ -946,7 +1002,7 @@ examples:
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"403":
|
||||
application/json: {"error": {"code": 403, "message": "Only provisioning keys can perform this operation"}}
|
||||
application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
createCoinbaseCharge:
|
||||
@@ -1180,7 +1236,7 @@ examples:
|
||||
speakeasy-default-get-current-key:
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"data": {"label": "sk-or-v1-au7...890", "limit": 100, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "is_free_tier": false, "is_provisioning_key": false, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "rate_limit": {"requests": 1000, "interval": "1h", "note": "This field is deprecated and safe to ignore."}}}
|
||||
application/json: {"data": {"label": "sk-or-v1-au7...890", "limit": 100, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "is_free_tier": false, "is_management_key": false, "is_provisioning_key": false, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "rate_limit": {"requests": 1000, "interval": "1h", "note": "This field is deprecated and safe to ignore."}}}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"500":
|
||||
@@ -1195,7 +1251,7 @@ examples:
|
||||
"400":
|
||||
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
|
||||
"403":
|
||||
application/json: {"error": {"code": 403, "message": "Only provisioning keys can perform this operation"}}
|
||||
application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
createAuthKeysCode:
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ generation:
|
||||
skipResponseBodyAssertions: false
|
||||
preApplyUnionDiscriminators: true
|
||||
python:
|
||||
version: 0.4.1
|
||||
version: 0.7.0
|
||||
additionalDependencies:
|
||||
dev: {}
|
||||
main: {}
|
||||
|
||||
+153
-54
@@ -4094,6 +4094,25 @@ components:
|
||||
A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for
|
||||
observability. If provided in both the request body and the x-session-id header, the body value takes
|
||||
precedence. Maximum of 128 characters.
|
||||
trace:
|
||||
type: object
|
||||
properties:
|
||||
trace_id:
|
||||
type: string
|
||||
trace_name:
|
||||
type: string
|
||||
span_name:
|
||||
type: string
|
||||
generation_name:
|
||||
type: string
|
||||
parent_span_id:
|
||||
type: string
|
||||
additionalProperties:
|
||||
nullable: true
|
||||
description: >-
|
||||
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name,
|
||||
parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured
|
||||
broadcast destinations.
|
||||
description: Request schema for Responses endpoint
|
||||
example:
|
||||
model: anthropic/claude-4.5-sonnet-20250929
|
||||
@@ -4403,7 +4422,6 @@ components:
|
||||
- tool_use
|
||||
- pause_turn
|
||||
- refusal
|
||||
- model_context_window_exceeded
|
||||
stop_sequence:
|
||||
type: string
|
||||
nullable: true
|
||||
@@ -4431,6 +4449,9 @@ components:
|
||||
required:
|
||||
- ephemeral_5m_input_tokens
|
||||
- ephemeral_1h_input_tokens
|
||||
inference_geo:
|
||||
type: string
|
||||
nullable: true
|
||||
server_tool_use:
|
||||
type: object
|
||||
nullable: true
|
||||
@@ -4452,6 +4473,7 @@ components:
|
||||
- cache_creation_input_tokens
|
||||
- cache_read_input_tokens
|
||||
- cache_creation
|
||||
- inference_geo
|
||||
- server_tool_use
|
||||
- service_tier
|
||||
required:
|
||||
@@ -4486,6 +4508,7 @@ components:
|
||||
cache_creation_input_tokens: null
|
||||
cache_read_input_tokens: null
|
||||
cache_creation: null
|
||||
inference_geo: null
|
||||
server_tool_use: null
|
||||
service_tier: standard
|
||||
AnthropicMessagesStreamEvent:
|
||||
@@ -4805,6 +4828,9 @@ components:
|
||||
required:
|
||||
- ephemeral_5m_input_tokens
|
||||
- ephemeral_1h_input_tokens
|
||||
inference_geo:
|
||||
type: string
|
||||
nullable: true
|
||||
server_tool_use:
|
||||
type: object
|
||||
nullable: true
|
||||
@@ -4826,6 +4852,7 @@ components:
|
||||
- cache_creation_input_tokens
|
||||
- cache_read_input_tokens
|
||||
- cache_creation
|
||||
- inference_geo
|
||||
- server_tool_use
|
||||
- service_tier
|
||||
required:
|
||||
@@ -4859,7 +4886,6 @@ components:
|
||||
- tool_use
|
||||
- pause_turn
|
||||
- refusal
|
||||
- model_context_window_exceeded
|
||||
stop_sequence:
|
||||
type: string
|
||||
nullable: true
|
||||
@@ -6524,6 +6550,22 @@ components:
|
||||
- role
|
||||
- content
|
||||
description: Anthropic message with OpenRouter extensions
|
||||
AnthropicOutputConfig:
|
||||
type: object
|
||||
properties:
|
||||
effort:
|
||||
type: string
|
||||
nullable: true
|
||||
enum:
|
||||
- low
|
||||
- medium
|
||||
- high
|
||||
- max
|
||||
description: >-
|
||||
How much effort the model should put into its response. Higher effort levels may result in more thorough
|
||||
analysis but take longer. Valid values are `low`, `medium`, `high`, or `max`.
|
||||
example: medium
|
||||
description: Configuration for controlling output behavior. Currently supports the effort parameter for Claude Opus 4.5.
|
||||
AnthropicMessagesRequest:
|
||||
type: object
|
||||
properties:
|
||||
@@ -6937,6 +6979,14 @@ components:
|
||||
- disabled
|
||||
required:
|
||||
- type
|
||||
- type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- adaptive
|
||||
required:
|
||||
- type
|
||||
service_tier:
|
||||
type: string
|
||||
enum:
|
||||
@@ -7160,10 +7210,31 @@ components:
|
||||
A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for
|
||||
observability. If provided in both the request body and the x-session-id header, the body value takes
|
||||
precedence. Maximum of 128 characters.
|
||||
trace:
|
||||
type: object
|
||||
properties:
|
||||
trace_id:
|
||||
type: string
|
||||
trace_name:
|
||||
type: string
|
||||
span_name:
|
||||
type: string
|
||||
generation_name:
|
||||
type: string
|
||||
parent_span_id:
|
||||
type: string
|
||||
additionalProperties:
|
||||
nullable: true
|
||||
description: >-
|
||||
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name,
|
||||
parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured
|
||||
broadcast destinations.
|
||||
models:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
output_config:
|
||||
$ref: '#/components/schemas/AnthropicOutputConfig'
|
||||
required:
|
||||
- model
|
||||
- max_tokens
|
||||
@@ -7265,7 +7336,7 @@ components:
|
||||
description: Error data for ForbiddenResponse
|
||||
example:
|
||||
code: 403
|
||||
message: Only provisioning keys can perform this operation
|
||||
message: Only management keys can perform this operation
|
||||
ForbiddenResponse:
|
||||
type: object
|
||||
properties:
|
||||
@@ -7280,7 +7351,7 @@ components:
|
||||
example:
|
||||
error:
|
||||
code: 403
|
||||
message: Only provisioning keys can perform this operation
|
||||
message: Only management keys can perform this operation
|
||||
CreateChargeRequest:
|
||||
type: object
|
||||
properties:
|
||||
@@ -8499,6 +8570,20 @@ components:
|
||||
type: string
|
||||
maxLength: 128
|
||||
__schema19:
|
||||
type: object
|
||||
properties:
|
||||
trace_id:
|
||||
type: string
|
||||
trace_name:
|
||||
type: string
|
||||
span_name:
|
||||
type: string
|
||||
generation_name:
|
||||
type: string
|
||||
parent_span_id:
|
||||
type: string
|
||||
additionalProperties: {}
|
||||
__schema20:
|
||||
oneOf:
|
||||
- type: object
|
||||
properties:
|
||||
@@ -8508,9 +8593,9 @@ components:
|
||||
summary:
|
||||
type: string
|
||||
id:
|
||||
$ref: '#/components/schemas/__schema20'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema21'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema22'
|
||||
index:
|
||||
$ref: '#/components/schemas/__schema11'
|
||||
required:
|
||||
@@ -8524,9 +8609,9 @@ components:
|
||||
data:
|
||||
type: string
|
||||
id:
|
||||
$ref: '#/components/schemas/__schema20'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema21'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema22'
|
||||
index:
|
||||
$ref: '#/components/schemas/__schema11'
|
||||
required:
|
||||
@@ -8546,19 +8631,19 @@ components:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
id:
|
||||
$ref: '#/components/schemas/__schema20'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema21'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema22'
|
||||
index:
|
||||
$ref: '#/components/schemas/__schema11'
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
__schema20:
|
||||
__schema21:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
__schema21:
|
||||
__schema22:
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
@@ -8569,7 +8654,7 @@ components:
|
||||
- anthropic-claude-v1
|
||||
- google-gemini-v1
|
||||
- type: 'null'
|
||||
__schema25:
|
||||
__schema26:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ChatCompletionFinishReason'
|
||||
- type: 'null'
|
||||
@@ -8945,7 +9030,7 @@ components:
|
||||
reasoning_details:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/__schema19'
|
||||
$ref: '#/components/schemas/__schema20'
|
||||
images:
|
||||
type: array
|
||||
items:
|
||||
@@ -9078,6 +9163,12 @@ components:
|
||||
observability. If provided in both the request body and the x-session-id header, the body value takes
|
||||
precedence. Maximum of 128 characters.
|
||||
$ref: '#/components/schemas/__schema18'
|
||||
trace:
|
||||
description: >-
|
||||
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name,
|
||||
parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured
|
||||
broadcast destinations.
|
||||
$ref: '#/components/schemas/__schema19'
|
||||
messages:
|
||||
minItems: 1
|
||||
type: array
|
||||
@@ -9253,7 +9344,7 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
finish_reason:
|
||||
$ref: '#/components/schemas/__schema25'
|
||||
$ref: '#/components/schemas/__schema26'
|
||||
index:
|
||||
type: number
|
||||
message:
|
||||
@@ -9311,14 +9402,14 @@ components:
|
||||
reasoning_details:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/__schema19'
|
||||
$ref: '#/components/schemas/__schema20'
|
||||
ChatStreamingChoice:
|
||||
type: object
|
||||
properties:
|
||||
delta:
|
||||
$ref: '#/components/schemas/ChatStreamingMessageChunk'
|
||||
finish_reason:
|
||||
$ref: '#/components/schemas/__schema25'
|
||||
$ref: '#/components/schemas/__schema26'
|
||||
index:
|
||||
type: number
|
||||
logprobs:
|
||||
@@ -9789,8 +9880,8 @@ paths:
|
||||
operationId: getUserActivity
|
||||
summary: Get user activity grouped by endpoint
|
||||
description: >-
|
||||
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Provisioning
|
||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Management
|
||||
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -9841,7 +9932,7 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/UnauthorizedResponse'
|
||||
'403':
|
||||
description: Forbidden - Only provisioning keys can fetch activity
|
||||
description: Forbidden - Only management keys can fetch activity
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -9860,8 +9951,8 @@ paths:
|
||||
summary: Get remaining credits
|
||||
operationId: getCredits
|
||||
description: >-
|
||||
Get total credits purchased and used for the authenticated user. [Provisioning
|
||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Get total credits purchased and used for the authenticated user. [Management
|
||||
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
responses:
|
||||
'200':
|
||||
description: Returns the total credits purchased and used
|
||||
@@ -9901,7 +9992,7 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/UnauthorizedResponse'
|
||||
'403':
|
||||
description: Forbidden - Only provisioning keys can fetch credits
|
||||
description: Forbidden - Only management keys can fetch credits
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -10924,8 +11015,8 @@ paths:
|
||||
- API Keys
|
||||
summary: List API keys
|
||||
description: >-
|
||||
List all API keys for the authenticated user. [Provisioning
|
||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
List all API keys for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys)
|
||||
required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -11125,8 +11216,8 @@ paths:
|
||||
- API Keys
|
||||
summary: Create a new API key
|
||||
description: >-
|
||||
Create a new API key for the authenticated user. [Provisioning
|
||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Create a new API key for the authenticated user. [Management
|
||||
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
@@ -11368,7 +11459,7 @@ paths:
|
||||
tags:
|
||||
- API Keys
|
||||
summary: Update an API key
|
||||
description: Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
description: Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -11611,7 +11702,7 @@ paths:
|
||||
tags:
|
||||
- API Keys
|
||||
summary: Delete an API key
|
||||
description: Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
description: Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -11669,7 +11760,7 @@ paths:
|
||||
tags:
|
||||
- API Keys
|
||||
summary: Get a single API key
|
||||
description: Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
description: Get a single API key by hash. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -11867,8 +11958,8 @@ paths:
|
||||
- Guardrails
|
||||
summary: List guardrails
|
||||
description: >-
|
||||
List all guardrails for the authenticated user. [Provisioning
|
||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys)
|
||||
required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -12024,8 +12115,8 @@ paths:
|
||||
- Guardrails
|
||||
summary: Create a guardrail
|
||||
description: >-
|
||||
Create a new guardrail for the authenticated user. [Provisioning
|
||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Create a new guardrail for the authenticated user. [Management
|
||||
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
@@ -12237,7 +12328,7 @@ paths:
|
||||
tags:
|
||||
- Guardrails
|
||||
summary: Get a guardrail
|
||||
description: Get a single guardrail by ID. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
description: Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -12383,7 +12474,7 @@ paths:
|
||||
tags:
|
||||
- Guardrails
|
||||
summary: Update a guardrail
|
||||
description: Update an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
description: Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -12598,7 +12689,7 @@ paths:
|
||||
tags:
|
||||
- Guardrails
|
||||
summary: Delete a guardrail
|
||||
description: Delete an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
description: Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -12652,8 +12743,8 @@ paths:
|
||||
- Guardrails
|
||||
summary: List all key assignments
|
||||
description: >-
|
||||
List all API key guardrail assignments for the authenticated user. [Provisioning
|
||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
List all API key guardrail assignments for the authenticated user. [Management
|
||||
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -12751,8 +12842,8 @@ paths:
|
||||
- Guardrails
|
||||
summary: List all member assignments
|
||||
description: >-
|
||||
List all organization member guardrail assignments for the authenticated user. [Provisioning
|
||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
List all organization member guardrail assignments for the authenticated user. [Management
|
||||
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -12845,8 +12936,8 @@ paths:
|
||||
- Guardrails
|
||||
summary: List key assignments for a guardrail
|
||||
description: >-
|
||||
List all API key assignments for a specific guardrail. [Provisioning
|
||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
List all API key assignments for a specific guardrail. [Management
|
||||
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -12958,8 +13049,8 @@ paths:
|
||||
- Guardrails
|
||||
summary: Bulk assign keys to a guardrail
|
||||
description: >-
|
||||
Assign multiple API keys to a specific guardrail. [Provisioning
|
||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Assign multiple API keys to a specific guardrail. [Management
|
||||
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -13034,8 +13125,8 @@ paths:
|
||||
- Guardrails
|
||||
summary: List member assignments for a guardrail
|
||||
description: >-
|
||||
List all organization member assignments for a specific guardrail. [Provisioning
|
||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
List all organization member assignments for a specific guardrail. [Management
|
||||
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -13142,8 +13233,8 @@ paths:
|
||||
- Guardrails
|
||||
summary: Bulk assign members to a guardrail
|
||||
description: >-
|
||||
Assign multiple organization members to a specific guardrail. [Provisioning
|
||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Assign multiple organization members to a specific guardrail. [Management
|
||||
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -13219,8 +13310,8 @@ paths:
|
||||
- Guardrails
|
||||
summary: Bulk unassign keys from a guardrail
|
||||
description: >-
|
||||
Unassign multiple API keys from a specific guardrail. [Provisioning
|
||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Unassign multiple API keys from a specific guardrail. [Management
|
||||
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -13295,8 +13386,8 @@ paths:
|
||||
- Guardrails
|
||||
summary: Bulk unassign members from a guardrail
|
||||
description: >-
|
||||
Unassign multiple organization members from a specific guardrail. [Provisioning
|
||||
key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Unassign multiple organization members from a specific guardrail. [Management
|
||||
key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -13428,9 +13519,14 @@ paths:
|
||||
type: boolean
|
||||
description: Whether this is a free tier API key
|
||||
example: false
|
||||
is_management_key:
|
||||
type: boolean
|
||||
description: Whether this is a management key
|
||||
example: false
|
||||
is_provisioning_key:
|
||||
type: boolean
|
||||
description: Whether this is a provisioning key
|
||||
description: Whether this is a management key
|
||||
deprecated: true
|
||||
example: false
|
||||
limit_remaining:
|
||||
type: number
|
||||
@@ -13489,6 +13585,7 @@ paths:
|
||||
- byok_usage_weekly
|
||||
- byok_usage_monthly
|
||||
- is_free_tier
|
||||
- is_management_key
|
||||
- is_provisioning_key
|
||||
- limit_remaining
|
||||
- limit_reset
|
||||
@@ -13507,6 +13604,7 @@ paths:
|
||||
byok_usage_weekly: 17.38
|
||||
byok_usage_monthly: 17.38
|
||||
is_free_tier: false
|
||||
is_management_key: false
|
||||
is_provisioning_key: false
|
||||
limit_remaining: 74.5
|
||||
limit_reset: monthly
|
||||
@@ -13531,6 +13629,7 @@ paths:
|
||||
byok_usage_weekly: 17.38
|
||||
byok_usage_monthly: 17.38
|
||||
is_free_tier: false
|
||||
is_management_key: false
|
||||
is_provisioning_key: false
|
||||
limit_remaining: 74.5
|
||||
limit_reset: monthly
|
||||
|
||||
+217
-40
@@ -4097,6 +4097,23 @@ components:
|
||||
maxLength: 128
|
||||
description: >-
|
||||
A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
|
||||
trace:
|
||||
type: object
|
||||
properties:
|
||||
trace_id:
|
||||
type: string
|
||||
trace_name:
|
||||
type: string
|
||||
span_name:
|
||||
type: string
|
||||
generation_name:
|
||||
type: string
|
||||
parent_span_id:
|
||||
type: string
|
||||
additionalProperties:
|
||||
nullable: true
|
||||
description: >-
|
||||
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
|
||||
description: Request schema for Responses endpoint
|
||||
example:
|
||||
model: anthropic/claude-4.5-sonnet-20250929
|
||||
@@ -4407,7 +4424,6 @@ components:
|
||||
- tool_use
|
||||
- pause_turn
|
||||
- refusal
|
||||
- model_context_window_exceeded
|
||||
x-speakeasy-unknown-values: allow
|
||||
stop_sequence:
|
||||
type: string
|
||||
@@ -4436,6 +4452,9 @@ components:
|
||||
required:
|
||||
- ephemeral_5m_input_tokens
|
||||
- ephemeral_1h_input_tokens
|
||||
inference_geo:
|
||||
type: string
|
||||
nullable: true
|
||||
server_tool_use:
|
||||
type: object
|
||||
nullable: true
|
||||
@@ -4458,6 +4477,7 @@ components:
|
||||
- cache_creation_input_tokens
|
||||
- cache_read_input_tokens
|
||||
- cache_creation
|
||||
- inference_geo
|
||||
- server_tool_use
|
||||
- service_tier
|
||||
required:
|
||||
@@ -4492,6 +4512,7 @@ components:
|
||||
cache_creation_input_tokens: null
|
||||
cache_read_input_tokens: null
|
||||
cache_creation: null
|
||||
inference_geo: null
|
||||
server_tool_use: null
|
||||
service_tier: standard
|
||||
AnthropicMessagesStreamEvent:
|
||||
@@ -4812,6 +4833,9 @@ components:
|
||||
required:
|
||||
- ephemeral_5m_input_tokens
|
||||
- ephemeral_1h_input_tokens
|
||||
inference_geo:
|
||||
type: string
|
||||
nullable: true
|
||||
server_tool_use:
|
||||
type: object
|
||||
nullable: true
|
||||
@@ -4834,6 +4858,7 @@ components:
|
||||
- cache_creation_input_tokens
|
||||
- cache_read_input_tokens
|
||||
- cache_creation
|
||||
- inference_geo
|
||||
- server_tool_use
|
||||
- service_tier
|
||||
required:
|
||||
@@ -4867,7 +4892,6 @@ components:
|
||||
- tool_use
|
||||
- pause_turn
|
||||
- refusal
|
||||
- model_context_window_exceeded
|
||||
x-speakeasy-unknown-values: allow
|
||||
stop_sequence:
|
||||
type: string
|
||||
@@ -6552,6 +6576,22 @@ components:
|
||||
- role
|
||||
- content
|
||||
description: Anthropic message with OpenRouter extensions
|
||||
AnthropicOutputConfig:
|
||||
type: object
|
||||
properties:
|
||||
effort:
|
||||
type: string
|
||||
nullable: true
|
||||
enum:
|
||||
- low
|
||||
- medium
|
||||
- high
|
||||
- max
|
||||
description: >-
|
||||
How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, or `max`.
|
||||
example: medium
|
||||
x-speakeasy-unknown-values: allow
|
||||
description: Configuration for controlling output behavior. Currently supports the effort parameter for Claude Opus 4.5.
|
||||
AnthropicMessagesRequest:
|
||||
type: object
|
||||
properties:
|
||||
@@ -6970,6 +7010,14 @@ components:
|
||||
- disabled
|
||||
required:
|
||||
- type
|
||||
- type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- adaptive
|
||||
required:
|
||||
- type
|
||||
service_tier:
|
||||
type: string
|
||||
enum:
|
||||
@@ -7178,10 +7226,29 @@ components:
|
||||
maxLength: 128
|
||||
description: >-
|
||||
A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
|
||||
trace:
|
||||
type: object
|
||||
properties:
|
||||
trace_id:
|
||||
type: string
|
||||
trace_name:
|
||||
type: string
|
||||
span_name:
|
||||
type: string
|
||||
generation_name:
|
||||
type: string
|
||||
parent_span_id:
|
||||
type: string
|
||||
additionalProperties:
|
||||
nullable: true
|
||||
description: >-
|
||||
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
|
||||
models:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
output_config:
|
||||
$ref: '#/components/schemas/AnthropicOutputConfig'
|
||||
required:
|
||||
- model
|
||||
- max_tokens
|
||||
@@ -7283,7 +7350,7 @@ components:
|
||||
description: Error data for ForbiddenResponse
|
||||
example:
|
||||
code: 403
|
||||
message: Only provisioning keys can perform this operation
|
||||
message: Only management keys can perform this operation
|
||||
ForbiddenResponse:
|
||||
type: object
|
||||
properties:
|
||||
@@ -7298,7 +7365,7 @@ components:
|
||||
example:
|
||||
error:
|
||||
code: 403
|
||||
message: Only provisioning keys can perform this operation
|
||||
message: Only management keys can perform this operation
|
||||
CreateChargeRequest:
|
||||
type: object
|
||||
properties:
|
||||
@@ -8503,6 +8570,20 @@ components:
|
||||
type: string
|
||||
maxLength: 128
|
||||
__schema19:
|
||||
type: object
|
||||
properties:
|
||||
trace_id:
|
||||
type: string
|
||||
trace_name:
|
||||
type: string
|
||||
span_name:
|
||||
type: string
|
||||
generation_name:
|
||||
type: string
|
||||
parent_span_id:
|
||||
type: string
|
||||
additionalProperties: {}
|
||||
__schema20:
|
||||
oneOf:
|
||||
- type: object
|
||||
properties:
|
||||
@@ -8512,9 +8593,9 @@ components:
|
||||
summary:
|
||||
type: string
|
||||
id:
|
||||
$ref: '#/components/schemas/__schema20'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema21'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema22'
|
||||
index:
|
||||
$ref: '#/components/schemas/__schema11'
|
||||
required:
|
||||
@@ -8528,9 +8609,9 @@ components:
|
||||
data:
|
||||
type: string
|
||||
id:
|
||||
$ref: '#/components/schemas/__schema20'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema21'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema22'
|
||||
index:
|
||||
$ref: '#/components/schemas/__schema11'
|
||||
required:
|
||||
@@ -8550,19 +8631,19 @@ components:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
id:
|
||||
$ref: '#/components/schemas/__schema20'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema21'
|
||||
format:
|
||||
$ref: '#/components/schemas/__schema22'
|
||||
index:
|
||||
$ref: '#/components/schemas/__schema11'
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
__schema20:
|
||||
__schema21:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
__schema21:
|
||||
__schema22:
|
||||
anyOf:
|
||||
- type: string
|
||||
enum:
|
||||
@@ -8574,7 +8655,7 @@ components:
|
||||
- google-gemini-v1
|
||||
x-speakeasy-unknown-values: allow
|
||||
- type: 'null'
|
||||
__schema25:
|
||||
__schema26:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/ChatCompletionFinishReason'
|
||||
- type: 'null'
|
||||
@@ -8953,7 +9034,7 @@ components:
|
||||
reasoning_details:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/__schema19'
|
||||
$ref: '#/components/schemas/__schema20'
|
||||
images:
|
||||
type: array
|
||||
items:
|
||||
@@ -9085,6 +9166,10 @@ components:
|
||||
description: >-
|
||||
A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
|
||||
$ref: '#/components/schemas/__schema18'
|
||||
trace:
|
||||
description: >-
|
||||
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
|
||||
$ref: '#/components/schemas/__schema19'
|
||||
messages:
|
||||
minItems: 1
|
||||
type: array
|
||||
@@ -9262,7 +9347,7 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
finish_reason:
|
||||
$ref: '#/components/schemas/__schema25'
|
||||
$ref: '#/components/schemas/__schema26'
|
||||
index:
|
||||
type: number
|
||||
message:
|
||||
@@ -9320,14 +9405,14 @@ components:
|
||||
reasoning_details:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/__schema19'
|
||||
$ref: '#/components/schemas/__schema20'
|
||||
ChatStreamingChoice:
|
||||
type: object
|
||||
properties:
|
||||
delta:
|
||||
$ref: '#/components/schemas/ChatStreamingMessageChunk'
|
||||
finish_reason:
|
||||
$ref: '#/components/schemas/__schema25'
|
||||
$ref: '#/components/schemas/__schema26'
|
||||
index:
|
||||
type: number
|
||||
logprobs:
|
||||
@@ -9562,6 +9647,9 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ProviderOverloadedResponse'
|
||||
operationId: createResponses
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/messages:
|
||||
post:
|
||||
x-speakeasy-ignore: true
|
||||
@@ -9790,6 +9878,9 @@ paths:
|
||||
- type
|
||||
- error
|
||||
operationId: createMessages
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/activity:
|
||||
get:
|
||||
tags:
|
||||
@@ -9797,7 +9888,7 @@ paths:
|
||||
operationId: getUserActivity
|
||||
summary: Get user activity grouped by endpoint
|
||||
description: >-
|
||||
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -9848,7 +9939,7 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/UnauthorizedResponse'
|
||||
'403':
|
||||
description: Forbidden - Only provisioning keys can fetch activity
|
||||
description: Forbidden - Only management keys can fetch activity
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -9859,6 +9950,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/credits:
|
||||
get:
|
||||
x-speakeasy-name-override: getCredits
|
||||
@@ -9867,7 +9961,7 @@ paths:
|
||||
summary: Get remaining credits
|
||||
operationId: getCredits
|
||||
description: >-
|
||||
Get total credits purchased and used for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Get total credits purchased and used for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
responses:
|
||||
'200':
|
||||
description: Returns the total credits purchased and used
|
||||
@@ -9907,7 +10001,7 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/UnauthorizedResponse'
|
||||
'403':
|
||||
description: Forbidden - Only provisioning keys can fetch credits
|
||||
description: Forbidden - Only management keys can fetch credits
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -9918,6 +10012,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/credits/coinbase:
|
||||
post:
|
||||
security:
|
||||
@@ -10040,6 +10137,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/embeddings:
|
||||
post:
|
||||
x-speakeasy-name-override: generate
|
||||
@@ -10244,6 +10344,9 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ProviderOverloadedResponse'
|
||||
operationId: createEmbeddings
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/embeddings/models:
|
||||
get:
|
||||
tags:
|
||||
@@ -10271,6 +10374,9 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
operationId: listEmbeddingsModels
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/generation:
|
||||
get:
|
||||
tags:
|
||||
@@ -10669,6 +10775,9 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ProviderOverloadedResponse'
|
||||
operationId: getGeneration
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/models/count:
|
||||
get:
|
||||
tags:
|
||||
@@ -10689,6 +10798,9 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
operationId: listModelsCount
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/models:
|
||||
get:
|
||||
tags:
|
||||
@@ -10743,6 +10855,9 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
operationId: getModels
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/models/user:
|
||||
get:
|
||||
tags:
|
||||
@@ -10779,6 +10894,9 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
operationId: listModelsUser
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/models/{author}/{slug}/endpoints:
|
||||
get:
|
||||
tags:
|
||||
@@ -10821,6 +10939,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/endpoints/zdr:
|
||||
get:
|
||||
tags:
|
||||
@@ -10848,6 +10969,9 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
operationId: listEndpointsZdr
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/providers:
|
||||
get:
|
||||
tags:
|
||||
@@ -10909,6 +11033,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/keys:
|
||||
get:
|
||||
operationId: list
|
||||
@@ -10917,7 +11044,7 @@ paths:
|
||||
- API Keys
|
||||
summary: List API keys
|
||||
description: >-
|
||||
List all API keys for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
List all API keys for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -11117,7 +11244,7 @@ paths:
|
||||
- API Keys
|
||||
summary: Create a new API key
|
||||
description: >-
|
||||
Create a new API key for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
@@ -11352,13 +11479,16 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
operationId: createKeys
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/keys/{hash}:
|
||||
patch:
|
||||
x-speakeasy-name-override: update
|
||||
tags:
|
||||
- API Keys
|
||||
summary: Update an API key
|
||||
description: Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
description: Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -11601,7 +11731,7 @@ paths:
|
||||
tags:
|
||||
- API Keys
|
||||
summary: Delete an API key
|
||||
description: Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
description: Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -11659,7 +11789,7 @@ paths:
|
||||
tags:
|
||||
- API Keys
|
||||
summary: Get a single API key
|
||||
description: Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
description: Get a single API key by hash. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -11849,6 +11979,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/guardrails:
|
||||
get:
|
||||
operationId: listGuardrails
|
||||
@@ -11857,7 +11990,7 @@ paths:
|
||||
- Guardrails
|
||||
summary: List guardrails
|
||||
description: >-
|
||||
List all guardrails for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -12014,7 +12147,7 @@ paths:
|
||||
- Guardrails
|
||||
summary: Create a guardrail
|
||||
description: >-
|
||||
Create a new guardrail for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Create a new guardrail for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
@@ -12221,6 +12354,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/guardrails/{id}:
|
||||
get:
|
||||
operationId: getGuardrail
|
||||
@@ -12228,7 +12364,7 @@ paths:
|
||||
tags:
|
||||
- Guardrails
|
||||
summary: Get a guardrail
|
||||
description: Get a single guardrail by ID. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
description: Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -12375,7 +12511,7 @@ paths:
|
||||
tags:
|
||||
- Guardrails
|
||||
summary: Update a guardrail
|
||||
description: Update an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
description: Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -12592,7 +12728,7 @@ paths:
|
||||
tags:
|
||||
- Guardrails
|
||||
summary: Delete a guardrail
|
||||
description: Delete an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
description: Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -12638,6 +12774,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/guardrails/assignments/keys:
|
||||
get:
|
||||
operationId: listKeyAssignments
|
||||
@@ -12646,7 +12785,7 @@ paths:
|
||||
- Guardrails
|
||||
summary: List all key assignments
|
||||
description: >-
|
||||
List all API key guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -12736,6 +12875,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/guardrails/assignments/members:
|
||||
get:
|
||||
operationId: listMemberAssignments
|
||||
@@ -12744,7 +12886,7 @@ paths:
|
||||
- Guardrails
|
||||
summary: List all member assignments
|
||||
description: >-
|
||||
List all organization member guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -12829,6 +12971,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/guardrails/{id}/assignments/keys:
|
||||
get:
|
||||
operationId: listGuardrailKeyAssignments
|
||||
@@ -12837,7 +12982,7 @@ paths:
|
||||
- Guardrails
|
||||
summary: List key assignments for a guardrail
|
||||
description: >-
|
||||
List all API key assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -12949,7 +13094,7 @@ paths:
|
||||
- Guardrails
|
||||
summary: Bulk assign keys to a guardrail
|
||||
description: >-
|
||||
Assign multiple API keys to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -13016,6 +13161,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/guardrails/{id}/assignments/members:
|
||||
get:
|
||||
operationId: listGuardrailMemberAssignments
|
||||
@@ -13024,7 +13172,7 @@ paths:
|
||||
- Guardrails
|
||||
summary: List member assignments for a guardrail
|
||||
description: >-
|
||||
List all organization member assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -13131,7 +13279,7 @@ paths:
|
||||
- Guardrails
|
||||
summary: Bulk assign members to a guardrail
|
||||
description: >-
|
||||
Assign multiple organization members to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -13199,6 +13347,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/guardrails/{id}/assignments/keys/remove:
|
||||
post:
|
||||
operationId: bulkUnassignKeysFromGuardrail
|
||||
@@ -13207,7 +13358,7 @@ paths:
|
||||
- Guardrails
|
||||
summary: Bulk unassign keys from a guardrail
|
||||
description: >-
|
||||
Unassign multiple API keys from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -13274,6 +13425,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/guardrails/{id}/assignments/members/remove:
|
||||
post:
|
||||
operationId: bulkUnassignMembersFromGuardrail
|
||||
@@ -13282,7 +13436,7 @@ paths:
|
||||
- Guardrails
|
||||
summary: Bulk unassign members from a guardrail
|
||||
description: >-
|
||||
Unassign multiple organization members from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
parameters:
|
||||
- schema:
|
||||
type: string
|
||||
@@ -13350,6 +13504,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/key:
|
||||
get:
|
||||
operationId: getCurrentKey
|
||||
@@ -13414,9 +13571,14 @@ paths:
|
||||
type: boolean
|
||||
description: Whether this is a free tier API key
|
||||
example: false
|
||||
is_management_key:
|
||||
type: boolean
|
||||
description: Whether this is a management key
|
||||
example: false
|
||||
is_provisioning_key:
|
||||
type: boolean
|
||||
description: Whether this is a provisioning key
|
||||
description: Whether this is a management key
|
||||
deprecated: true
|
||||
example: false
|
||||
limit_remaining:
|
||||
type: number
|
||||
@@ -13475,6 +13637,7 @@ paths:
|
||||
- byok_usage_weekly
|
||||
- byok_usage_monthly
|
||||
- is_free_tier
|
||||
- is_management_key
|
||||
- is_provisioning_key
|
||||
- limit_remaining
|
||||
- limit_reset
|
||||
@@ -13493,6 +13656,7 @@ paths:
|
||||
byok_usage_weekly: 17.38
|
||||
byok_usage_monthly: 17.38
|
||||
is_free_tier: false
|
||||
is_management_key: false
|
||||
is_provisioning_key: false
|
||||
limit_remaining: 74.5
|
||||
limit_reset: monthly
|
||||
@@ -13517,6 +13681,7 @@ paths:
|
||||
byok_usage_weekly: 17.38
|
||||
byok_usage_monthly: 17.38
|
||||
is_free_tier: false
|
||||
is_management_key: false
|
||||
is_provisioning_key: false
|
||||
limit_remaining: 74.5
|
||||
limit_reset: monthly
|
||||
@@ -13538,6 +13703,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/auth/keys:
|
||||
post:
|
||||
operationId: exchangeAuthCodeForAPIKey
|
||||
@@ -13616,6 +13784,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/auth/keys/code:
|
||||
post:
|
||||
x-speakeasy-name-override: createAuthCode
|
||||
@@ -13717,6 +13888,9 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InternalServerResponse'
|
||||
operationId: createAuthKeysCode
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
/chat/completions:
|
||||
post:
|
||||
summary: Create a chat completion
|
||||
@@ -13771,6 +13945,9 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ChatError'
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
servers:
|
||||
- url: https://openrouter.ai/api/v1
|
||||
description: Production server
|
||||
|
||||
@@ -33,3 +33,11 @@ actions:
|
||||
type: string
|
||||
description: |
|
||||
The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
# Add header parameters to all paths so Speakeasy matches them with globals
|
||||
- target: $.paths[*]
|
||||
description: Reference app identification headers on all paths so Speakeasy injects them via globals
|
||||
update:
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
|
||||
@@ -8,8 +8,8 @@ sources:
|
||||
- latest
|
||||
OpenRouter API:
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:081a51121f970e44311f1415c10c22b1838d1d1b6057280a3e6cba78acab1dca
|
||||
sourceBlobDigest: sha256:fc6bdfffd4edd78b043363b817794d80faaa927b5b4b7e8f149fda68084dac13
|
||||
sourceRevisionDigest: sha256:79b8d064e91a2614d9853eb640f9e7255a8b1e9614882641ab5c75ac071814d6
|
||||
sourceBlobDigest: sha256:b74fe6d34af037172e5b80f6d03b85df45eb5360577027682ea7d3fd308e8293
|
||||
tags:
|
||||
- latest
|
||||
- main
|
||||
@@ -18,10 +18,10 @@ targets:
|
||||
open-router:
|
||||
source: OpenRouter API
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:081a51121f970e44311f1415c10c22b1838d1d1b6057280a3e6cba78acab1dca
|
||||
sourceBlobDigest: sha256:fc6bdfffd4edd78b043363b817794d80faaa927b5b4b7e8f149fda68084dac13
|
||||
sourceRevisionDigest: sha256:79b8d064e91a2614d9853eb640f9e7255a8b1e9614882641ab5c75ac071814d6
|
||||
sourceBlobDigest: sha256:b74fe6d34af037172e5b80f6d03b85df45eb5360577027682ea7d3fd308e8293
|
||||
codeSamplesNamespace: open-router-python-code-samples
|
||||
codeSamplesRevisionDigest: sha256:c48795939148c825d881d736e1b7a8d884b6b7e3f66114a5e11d4ed532b75baa
|
||||
codeSamplesRevisionDigest: sha256:ff5b83e50996943aaf26b9089fd02488fc49b8c5f742dc432135c8eeb69c7042
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: 1.666.0
|
||||
|
||||
@@ -182,6 +182,8 @@ import os
|
||||
def main():
|
||||
|
||||
with OpenRouter(
|
||||
http_referer="<value>",
|
||||
x_title="<value>",
|
||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||
) as open_router:
|
||||
# Rest of application here...
|
||||
@@ -191,6 +193,8 @@ def main():
|
||||
async def amain():
|
||||
|
||||
async with OpenRouter(
|
||||
http_referer="<value>",
|
||||
x_title="<value>",
|
||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||
) as open_router:
|
||||
# Rest of application here...
|
||||
|
||||
@@ -6,6 +6,8 @@ import os
|
||||
|
||||
|
||||
with OpenRouter(
|
||||
http_referer="<value>",
|
||||
x_title="<value>",
|
||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||
) as open_router:
|
||||
|
||||
@@ -30,6 +32,8 @@ import os
|
||||
async def main():
|
||||
|
||||
async with OpenRouter(
|
||||
http_referer="<value>",
|
||||
x_title="<value>",
|
||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||
) as open_router:
|
||||
|
||||
|
||||
@@ -11,5 +11,5 @@
|
||||
| `tool_calls` | List[[components.ChatMessageToolCall](../components/chatmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
|
||||
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `reasoning_details` | List[[components.Schema19](../components/schema19.md)] | :heavy_minus_sign: | N/A |
|
||||
| `reasoning_details` | List[[components.Schema20](../components/schema20.md)] | :heavy_minus_sign: | N/A |
|
||||
| `images` | List[[components.Image](../components/image.md)] | :heavy_minus_sign: | N/A |
|
||||
@@ -10,6 +10,7 @@
|
||||
| `route` | [OptionalNullable[components.Route]](../components/route.md) | :heavy_minus_sign: | N/A |
|
||||
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `session_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `trace` | [Optional[components.Schema19]](../components/schema19.md) | :heavy_minus_sign: | N/A |
|
||||
| `messages` | List[[components.Message](../components/message.md)] | :heavy_check_mark: | N/A |
|
||||
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `tool_calls` | List[[components.ChatStreamingMessageToolCall](../components/chatstreamingmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
|
||||
| `reasoning_details` | List[[components.Schema19](../components/schema19.md)] | :heavy_minus_sign: | N/A |
|
||||
| `reasoning_details` | List[[components.Schema20](../components/schema20.md)] | :heavy_minus_sign: | N/A |
|
||||
@@ -40,4 +40,5 @@ Request schema for Responses endpoint
|
||||
| `provider` | [OptionalNullable[components.Provider]](../components/provider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
|
||||
| `plugins` | List[[components.Plugin](../components/plugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
|
||||
| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. | |
|
||||
| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. | |
|
||||
| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. | |
|
||||
| `trace` | [Optional[components.Trace]](../components/trace.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | |
|
||||
@@ -1,23 +1,13 @@
|
||||
# Schema19
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.Schema19ReasoningSummary`
|
||||
|
||||
```python
|
||||
value: components.Schema19ReasoningSummary = /* values here */
|
||||
```
|
||||
|
||||
### `components.Schema19ReasoningEncrypted`
|
||||
|
||||
```python
|
||||
value: components.Schema19ReasoningEncrypted = /* values here */
|
||||
```
|
||||
|
||||
### `components.Schema19ReasoningText`
|
||||
|
||||
```python
|
||||
value: components.Schema19ReasoningText = /* values here */
|
||||
```
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------- | -------------------- | -------------------- | -------------------- |
|
||||
| `trace_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `trace_name` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `span_name` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `generation_name` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `parent_span_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,23 @@
|
||||
# Schema20
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.Schema20ReasoningSummary`
|
||||
|
||||
```python
|
||||
value: components.Schema20ReasoningSummary = /* values here */
|
||||
```
|
||||
|
||||
### `components.Schema20ReasoningEncrypted`
|
||||
|
||||
```python
|
||||
value: components.Schema20ReasoningEncrypted = /* values here */
|
||||
```
|
||||
|
||||
### `components.Schema20ReasoningText`
|
||||
|
||||
```python
|
||||
value: components.Schema20ReasoningText = /* values here */
|
||||
```
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
# Schema19ReasoningEncrypted
|
||||
# Schema20ReasoningEncrypted
|
||||
|
||||
|
||||
## Fields
|
||||
@@ -8,5 +8,5 @@
|
||||
| `type` | *Literal["reasoning.encrypted"]* | :heavy_check_mark: | N/A |
|
||||
| `data` | *str* | :heavy_check_mark: | N/A |
|
||||
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `format_` | [OptionalNullable[components.Schema21]](../components/schema21.md) | :heavy_minus_sign: | N/A |
|
||||
| `format_` | [OptionalNullable[components.Schema22]](../components/schema22.md) | :heavy_minus_sign: | N/A |
|
||||
| `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
# Schema19ReasoningSummary
|
||||
# Schema20ReasoningSummary
|
||||
|
||||
|
||||
## Fields
|
||||
@@ -8,5 +8,5 @@
|
||||
| `type` | *Literal["reasoning.summary"]* | :heavy_check_mark: | N/A |
|
||||
| `summary` | *str* | :heavy_check_mark: | N/A |
|
||||
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `format_` | [OptionalNullable[components.Schema21]](../components/schema21.md) | :heavy_minus_sign: | N/A |
|
||||
| `format_` | [OptionalNullable[components.Schema22]](../components/schema22.md) | :heavy_minus_sign: | N/A |
|
||||
| `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
@@ -1,4 +1,4 @@
|
||||
# Schema19ReasoningText
|
||||
# Schema20ReasoningText
|
||||
|
||||
|
||||
## Fields
|
||||
@@ -9,5 +9,5 @@
|
||||
| `text` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `format_` | [OptionalNullable[components.Schema21]](../components/schema21.md) | :heavy_minus_sign: | N/A |
|
||||
| `format_` | [OptionalNullable[components.Schema22]](../components/schema22.md) | :heavy_minus_sign: | N/A |
|
||||
| `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
@@ -1,4 +1,4 @@
|
||||
# Schema21
|
||||
# Schema22
|
||||
|
||||
|
||||
## Values
|
||||
@@ -0,0 +1,15 @@
|
||||
# Trace
|
||||
|
||||
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------- | -------------------------- | -------------------------- | -------------------------- |
|
||||
| `trace_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `trace_name` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `span_name` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `generation_name` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `parent_span_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `__pydantic_extra__` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A |
|
||||
@@ -7,5 +7,5 @@ Forbidden - Authentication successful but insufficient permissions
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
||||
| `error` | [components.ForbiddenResponseErrorData](../components/forbiddenresponseerrordata.md) | :heavy_check_mark: | Error data for ForbiddenResponse | {<br/>"code": 403,<br/>"message": "Only provisioning keys can perform this operation"<br/>} |
|
||||
| `error` | [components.ForbiddenResponseErrorData](../components/forbiddenresponseerrordata.md) | :heavy_check_mark: | Error data for ForbiddenResponse | {<br/>"code": 403,<br/>"message": "Only management keys can perform this operation"<br/>} |
|
||||
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -0,0 +1,9 @@
|
||||
# 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `request_body` | [operations.BulkAssignKeysToGuardrailRequestBody](../operations/bulkassignkeystoguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `request_body` | [operations.BulkAssignKeysToGuardrailRequestBody](../operations/bulkassignkeystoguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,9 @@
|
||||
# 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `request_body` | [operations.BulkAssignMembersToGuardrailRequestBody](../operations/bulkassignmemberstoguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `request_body` | [operations.BulkAssignMembersToGuardrailRequestBody](../operations/bulkassignmemberstoguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,9 @@
|
||||
# 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `request_body` | [operations.BulkUnassignKeysFromGuardrailRequestBody](../operations/bulkunassignkeysfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `request_body` | [operations.BulkUnassignKeysFromGuardrailRequestBody](../operations/bulkunassignkeysfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,9 @@
|
||||
# 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `request_body` | [operations.BulkUnassignMembersFromGuardrailRequestBody](../operations/bulkunassignmembersfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `request_body` | [operations.BulkUnassignMembersFromGuardrailRequestBody](../operations/bulkunassignmembersfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,9 @@
|
||||
# CreateAuthKeysCodeGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,10 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
||||
| `callback_url` | *str* | :heavy_check_mark: | The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed. | 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 |
|
||||
| `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 |
|
||||
| `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 | |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<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/>} |
|
||||
@@ -0,0 +1,12 @@
|
||||
# CreateAuthKeysCodeRequestBody
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
||||
| `callback_url` | *str* | :heavy_check_mark: | The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed. | 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 |
|
||||
| `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 |
|
||||
| `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 | |
|
||||
@@ -0,0 +1,9 @@
|
||||
# CreateCoinbaseChargeGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -0,0 +1,10 @@
|
||||
# CreateCoinbaseChargeRequest
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `create_charge_request` | [components.CreateChargeRequest](../components/createchargerequest.md) | :heavy_check_mark: | N/A | {<br/>"amount": 100,<br/>"sender": "0x1234567890123456789012345678901234567890",<br/>"chain_id": 1<br/>} |
|
||||
@@ -0,0 +1,9 @@
|
||||
# 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,12 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||
| `input` | [operations.InputUnion](../operations/inputunion.md) | :heavy_check_mark: | N/A |
|
||||
| `model` | *str* | :heavy_check_mark: | N/A |
|
||||
| `encoding_format` | [Optional[operations.EncodingFormat]](../operations/encodingformat.md) | :heavy_minus_sign: | N/A |
|
||||
| `dimensions` | *Optional[int]* | :heavy_minus_sign: | N/A |
|
||||
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `provider` | [Optional[components.ProviderPreferences]](../components/providerpreferences.md) | :heavy_minus_sign: | Provider routing preferences for the request. |
|
||||
| `input_type` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
| `request_body` | [operations.CreateEmbeddingsRequestBody](../operations/createembeddingsrequestbody.md) | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,14 @@
|
||||
# CreateEmbeddingsRequestBody
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||
| `input` | [operations.InputUnion](../operations/inputunion.md) | :heavy_check_mark: | N/A |
|
||||
| `model` | *str* | :heavy_check_mark: | N/A |
|
||||
| `encoding_format` | [Optional[operations.EncodingFormat]](../operations/encodingformat.md) | :heavy_minus_sign: | N/A |
|
||||
| `dimensions` | *Optional[int]* | :heavy_minus_sign: | N/A |
|
||||
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `provider` | [Optional[components.ProviderPreferences]](../components/providerpreferences.md) | :heavy_minus_sign: | Provider routing preferences for the request. |
|
||||
| `input_type` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,9 @@
|
||||
# CreateGuardrailGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,12 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `name` | *str* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail |
|
||||
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage |
|
||||
| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 |
|
||||
| `reset_interval` | [OptionalNullable[operations.CreateGuardrailResetIntervalRequest]](../operations/createguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
|
||||
| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [<br/>"openai",<br/>"anthropic",<br/>"deepseek"<br/>] |
|
||||
| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [<br/>"openai/gpt-5.2",<br/>"anthropic/claude-4.5-opus-20251124",<br/>"deepseek/deepseek-r1-0528:free"<br/>] |
|
||||
| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `request_body` | [operations.CreateGuardrailRequestBody](../operations/createguardrailrequestbody.md) | :heavy_check_mark: | N/A | {<br/>"name": "My New Guardrail",<br/>"description": "A guardrail for limiting API usage",<br/>"limit_usd": 50,<br/>"reset_interval": "monthly",<br/>"allowed_providers": [<br/>"openai",<br/>"anthropic",<br/>"deepseek"<br/>],<br/>"allowed_models": null,<br/>"enforce_zdr": false<br/>} |
|
||||
@@ -0,0 +1,14 @@
|
||||
# CreateGuardrailRequestBody
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `name` | *str* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail |
|
||||
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage |
|
||||
| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 |
|
||||
| `reset_interval` | [OptionalNullable[operations.CreateGuardrailResetIntervalRequest]](../operations/createguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
|
||||
| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [<br/>"openai",<br/>"anthropic",<br/>"deepseek"<br/>] |
|
||||
| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [<br/>"openai/gpt-5.2",<br/>"anthropic/claude-4.5-opus-20251124",<br/>"deepseek/deepseek-r1-0528:free"<br/>] |
|
||||
| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false |
|
||||
@@ -0,0 +1,9 @@
|
||||
# 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,10 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `name` | *str* | :heavy_check_mark: | Name for the new API key | My New API Key |
|
||||
| `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 |
|
||||
| `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true |
|
||||
| `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 |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `request_body` | [operations.CreateKeysRequestBody](../operations/createkeysrequestbody.md) | :heavy_check_mark: | N/A | {<br/>"name": "My New API Key",<br/>"limit": 50,<br/>"limit_reset": "monthly",<br/>"include_byok_in_limit": true,<br/>"expires_at": "2027-12-31T23:59:59Z"<br/>} |
|
||||
@@ -0,0 +1,12 @@
|
||||
# CreateKeysRequestBody
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `name` | *str* | :heavy_check_mark: | Name for the new API key | My New API Key |
|
||||
| `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 |
|
||||
| `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true |
|
||||
| `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 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -0,0 +1,10 @@
|
||||
# CreateResponsesRequest
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `open_responses_request` | [components.OpenResponsesRequest](../components/openresponsesrequest.md) | :heavy_check_mark: | N/A | {<br/>"model": "anthropic/claude-4.5-sonnet-20250929",<br/>"input": [<br/>{<br/>"type": "message",<br/>"content": "Hello, how are you?",<br/>"role": "user"<br/>}<br/>],<br/>"temperature": 0.7,<br/>"top_p": 0.9,<br/>"tools": [<br/>{<br/>"type": "function",<br/>"name": "get_current_weather",<br/>"description": "Get the current weather in a given location",<br/>"parameters": {<br/>"type": "object",<br/>"properties": {<br/>"location": {<br/>"type": "string"<br/>}<br/>}<br/>}<br/>}<br/>]<br/>} |
|
||||
@@ -0,0 +1,9 @@
|
||||
# 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to delete | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to delete | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to delete | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to delete | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ExchangeAuthCodeForAPIKeyGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `code` | *str* | :heavy_check_mark: | The authorization code received from the OAuth redirect | auth_code_abc123def456 |
|
||||
| `code_verifier` | *Optional[str]* | :heavy_minus_sign: | The code verifier if code_challenge was used in the authorization request | dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk |
|
||||
| `code_challenge_method` | [OptionalNullable[operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod]](../operations/exchangeauthcodeforapikeycodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `request_body` | [operations.ExchangeAuthCodeForAPIKeyRequestBody](../operations/exchangeauthcodeforapikeyrequestbody.md) | :heavy_check_mark: | N/A | {<br/>"code": "auth_code_abc123def456",<br/>"code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",<br/>"code_challenge_method": "S256"<br/>} |
|
||||
@@ -0,0 +1,10 @@
|
||||
# ExchangeAuthCodeForAPIKeyRequestBody
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `code` | *str* | :heavy_check_mark: | The authorization code received from the OAuth redirect | auth_code_abc123def456 |
|
||||
| `code_verifier` | *Optional[str]* | :heavy_minus_sign: | The code verifier if code_challenge was used in the authorization request | dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk |
|
||||
| `code_challenge_method` | [OptionalNullable[operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod]](../operations/exchangeauthcodeforapikeycodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetCreditsGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetCreditsRequest
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -18,7 +18,8 @@ Current API key information
|
||||
| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 |
|
||||
| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 |
|
||||
| `is_free_tier` | *bool* | :heavy_check_mark: | Whether this is a free tier API key | false |
|
||||
| `is_provisioning_key` | *bool* | :heavy_check_mark: | Whether this is a provisioning key | false |
|
||||
| `is_management_key` | *bool* | :heavy_check_mark: | Whether this is a management key | false |
|
||||
| ~~`is_provisioning_key`~~ | *bool* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>Whether this is a management key | false |
|
||||
| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
|
||||
| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly |
|
||||
| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false |
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetCurrentKeyGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetCurrentKeyRequest
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -5,6 +5,6 @@ API key details
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `data` | [operations.GetCurrentKeyData](../operations/getcurrentkeydata.md) | :heavy_check_mark: | Current API key information | {<br/>"label": "sk-or-v1-au7...890",<br/>"limit": 100,<br/>"usage": 25.5,<br/>"usage_daily": 25.5,<br/>"usage_weekly": 25.5,<br/>"usage_monthly": 25.5,<br/>"byok_usage": 17.38,<br/>"byok_usage_daily": 17.38,<br/>"byok_usage_weekly": 17.38,<br/>"byok_usage_monthly": 17.38,<br/>"is_free_tier": false,<br/>"is_provisioning_key": false,<br/>"limit_remaining": 74.5,<br/>"limit_reset": "monthly",<br/>"include_byok_in_limit": false,<br/>"expires_at": "2027-12-31T23:59:59Z",<br/>"rate_limit": {<br/>"requests": 1000,<br/>"interval": "1h",<br/>"note": "This field is deprecated and safe to ignore."<br/>}<br/>} |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `data` | [operations.GetCurrentKeyData](../operations/getcurrentkeydata.md) | :heavy_check_mark: | Current API key information | {<br/>"label": "sk-or-v1-au7...890",<br/>"limit": 100,<br/>"usage": 25.5,<br/>"usage_daily": 25.5,<br/>"usage_weekly": 25.5,<br/>"usage_monthly": 25.5,<br/>"byok_usage": 17.38,<br/>"byok_usage_daily": 17.38,<br/>"byok_usage_weekly": 17.38,<br/>"byok_usage_monthly": 17.38,<br/>"is_free_tier": false,<br/>"is_management_key": false,<br/>"is_provisioning_key": false,<br/>"limit_remaining": 74.5,<br/>"limit_reset": "monthly",<br/>"include_byok_in_limit": false,<br/>"expires_at": "2027-12-31T23:59:59Z",<br/>"rate_limit": {<br/>"requests": 1000,<br/>"interval": "1h",<br/>"note": "This field is deprecated and safe to ignore."<br/>}<br/>} |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetGenerationGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `id` | *str* | :heavy_check_mark: | N/A |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
| `id` | *str* | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetGuardrailGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to retrieve | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to retrieve | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetKeyGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to retrieve | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to retrieve | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetModelsGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
|
||||
| `category` | [Optional[operations.Category]](../operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming |
|
||||
| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | N/A | |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `category` | [Optional[operations.Category]](../operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming |
|
||||
| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -0,0 +1,9 @@
|
||||
# GetUserActivityGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
||||
| `date_` | *Optional[str]* | :heavy_minus_sign: | Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). | 2025-08-24 |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `date_` | *Optional[str]* | :heavy_minus_sign: | Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). | 2025-08-24 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListEmbeddingsModelsGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListEmbeddingsModelsRequest
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListEndpointsGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `author` | *str* | :heavy_check_mark: | N/A |
|
||||
| `slug` | *str* | :heavy_check_mark: | N/A |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
| `author` | *str* | :heavy_check_mark: | N/A |
|
||||
| `slug` | *str* | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListEndpointsZdrGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListEndpointsZdrRequest
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListGuardrailKeyAssignmentsGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,8 +3,10 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListGuardrailMemberAssignmentsGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,8 +3,10 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListGuardrailsGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListKeyAssignmentsGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListMemberAssignmentsGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListModelsCountGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListModelsCountRequest
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListModelsUserGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListModelsUserRequest
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListProvidersGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListProvidersRequest
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||
| `include_disabled` | *Optional[str]* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `include_disabled` | *Optional[str]* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# SendChatCompletionRequestGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -0,0 +1,10 @@
|
||||
# SendChatCompletionRequestRequest
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
| `chat_generation_params` | [components.ChatGenerationParams](../components/chatgenerationparams.md) | :heavy_check_mark: | Chat completion request parameters |
|
||||
@@ -0,0 +1,9 @@
|
||||
# UpdateGuardrailGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `request_body` | [operations.UpdateGuardrailRequestBody](../operations/updateguardrailrequestbody.md) | :heavy_check_mark: | N/A | {<br/>"name": "Updated Guardrail Name",<br/>"description": "Updated description",<br/>"limit_usd": 75,<br/>"reset_interval": "weekly"<br/>} |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `request_body` | [operations.UpdateGuardrailRequestBody](../operations/updateguardrailrequestbody.md) | :heavy_check_mark: | N/A | {<br/>"name": "Updated Guardrail Name",<br/>"description": "Updated description",<br/>"limit_usd": 75,<br/>"reset_interval": "weekly"<br/>} |
|
||||
@@ -0,0 +1,9 @@
|
||||
# UpdateKeysGlobals
|
||||
|
||||
|
||||
## 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to update | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||
| `request_body` | [operations.UpdateKeysRequestBody](../operations/updatekeysrequestbody.md) | :heavy_check_mark: | N/A | {<br/>"name": "Updated API Key Name",<br/>"disabled": false,<br/>"limit": 75,<br/>"limit_reset": "daily",<br/>"include_byok_in_limit": true<br/>} |
|
||||
| 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to update | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||
| `request_body` | [operations.UpdateKeysRequestBody](../operations/updatekeysrequestbody.md) | :heavy_check_mark: | N/A | {<br/>"name": "Updated API Key Name",<br/>"disabled": false,<br/>"limit": 75,<br/>"limit_reset": "daily",<br/>"include_byok_in_limit": true<br/>} |
|
||||
@@ -11,7 +11,7 @@ Analytics and usage endpoints
|
||||
|
||||
## get_user_activity
|
||||
|
||||
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
### Example Usage
|
||||
|
||||
@@ -22,6 +22,8 @@ import os
|
||||
|
||||
|
||||
with OpenRouter(
|
||||
http_referer="<value>",
|
||||
x_title="<value>",
|
||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||
) as open_router:
|
||||
|
||||
@@ -34,10 +36,12 @@ with OpenRouter(
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
||||
| `date_` | *Optional[str]* | :heavy_minus_sign: | Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). | 2025-08-24 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| Parameter | 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `date_` | *Optional[str]* | :heavy_minus_sign: | Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). | 2025-08-24 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
|
||||
+45
-21
@@ -16,7 +16,7 @@ API key management endpoints
|
||||
|
||||
## list
|
||||
|
||||
List all API keys for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
List all API keys for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
### Example Usage
|
||||
|
||||
@@ -27,6 +27,8 @@ import os
|
||||
|
||||
|
||||
with OpenRouter(
|
||||
http_referer="<value>",
|
||||
x_title="<value>",
|
||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||
) as open_router:
|
||||
|
||||
@@ -39,11 +41,13 @@ with OpenRouter(
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `include_disabled` | *Optional[str]* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| Parameter | 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `include_disabled` | *Optional[str]* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
@@ -60,7 +64,7 @@ with OpenRouter(
|
||||
|
||||
## create
|
||||
|
||||
Create a new API key for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
### Example Usage
|
||||
|
||||
@@ -71,6 +75,8 @@ import os
|
||||
|
||||
|
||||
with OpenRouter(
|
||||
http_referer="<value>",
|
||||
x_title="<value>",
|
||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||
) as open_router:
|
||||
|
||||
@@ -86,6 +92,8 @@ with OpenRouter(
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `name` | *str* | :heavy_check_mark: | Name for the new API key | My New API Key |
|
||||
| `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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `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 |
|
||||
| `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true |
|
||||
@@ -108,7 +116,7 @@ with OpenRouter(
|
||||
|
||||
## update
|
||||
|
||||
Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
### Example Usage
|
||||
|
||||
@@ -119,6 +127,8 @@ import os
|
||||
|
||||
|
||||
with OpenRouter(
|
||||
http_referer="<value>",
|
||||
x_title="<value>",
|
||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||
) as open_router:
|
||||
|
||||
@@ -134,6 +144,8 @@ with OpenRouter(
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to update | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||
| `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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the API key | Updated API Key Name |
|
||||
| `disabled` | *Optional[bool]* | :heavy_minus_sign: | Whether to disable the API key | false |
|
||||
| `limit` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit for the API key in USD | 75 |
|
||||
@@ -158,7 +170,7 @@ with OpenRouter(
|
||||
|
||||
## delete
|
||||
|
||||
Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
### Example Usage
|
||||
|
||||
@@ -169,6 +181,8 @@ import os
|
||||
|
||||
|
||||
with OpenRouter(
|
||||
http_referer="<value>",
|
||||
x_title="<value>",
|
||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||
) as open_router:
|
||||
|
||||
@@ -181,10 +195,12 @@ with OpenRouter(
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to delete | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to delete | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||
| `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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
@@ -202,7 +218,7 @@ with OpenRouter(
|
||||
|
||||
## get
|
||||
|
||||
Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||
Get a single API key by hash. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
||||
|
||||
### Example Usage
|
||||
|
||||
@@ -213,6 +229,8 @@ import os
|
||||
|
||||
|
||||
with OpenRouter(
|
||||
http_referer="<value>",
|
||||
x_title="<value>",
|
||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||
) as open_router:
|
||||
|
||||
@@ -225,10 +243,12 @@ with OpenRouter(
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to retrieve | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to retrieve | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||
| `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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||
|
||||
### Response
|
||||
|
||||
@@ -257,6 +277,8 @@ import os
|
||||
|
||||
|
||||
with OpenRouter(
|
||||
http_referer="<value>",
|
||||
x_title="<value>",
|
||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||
) as open_router:
|
||||
|
||||
@@ -269,9 +291,11 @@ with OpenRouter(
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
| Parameter | 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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
|
||||
### Response
|
||||
|
||||
|
||||
+37
-32
@@ -20,6 +20,8 @@ import os
|
||||
|
||||
|
||||
with OpenRouter(
|
||||
http_referer="<value>",
|
||||
x_title="<value>",
|
||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||
) as open_router:
|
||||
|
||||
@@ -34,38 +36,41 @@ with OpenRouter(
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `messages` | List[[components.Message](../../components/message.md)] | :heavy_check_mark: | N/A |
|
||||
| `provider` | [OptionalNullable[components.Schema0]](../../components/schema0.md) | :heavy_minus_sign: | N/A |
|
||||
| `plugins` | List[[components.Schema17](../../components/schema17.md)] | :heavy_minus_sign: | N/A |
|
||||
| `route` | [OptionalNullable[components.Route]](../../components/route.md) | :heavy_minus_sign: | N/A |
|
||||
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `session_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
|
||||
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | N/A |
|
||||
| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
|
||||
| `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | N/A |
|
||||
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `reasoning` | [Optional[components.Reasoning]](../../components/reasoning.md) | :heavy_minus_sign: | N/A |
|
||||
| `response_format` | [Optional[components.ResponseFormat]](../../components/responseformat.md) | :heavy_minus_sign: | N/A |
|
||||
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
|
||||
| `stop` | [OptionalNullable[components.Stop]](../../components/stop.md) | :heavy_minus_sign: | N/A |
|
||||
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
|
||||
| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../../components/chatstreamoptions.md) | :heavy_minus_sign: | N/A |
|
||||
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
|
||||
| `tools` | List[[components.ToolDefinitionJSON](../../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
|
||||
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `debug` | [Optional[components.Debug]](../../components/debug.md) | :heavy_minus_sign: | N/A |
|
||||
| `image_config` | Dict[str, [components.ChatGenerationParamsImageConfig](../../components/chatgenerationparamsimageconfig.md)] | :heavy_minus_sign: | N/A |
|
||||
| `modalities` | List[[components.Modality](../../components/modality.md)] | :heavy_minus_sign: | N/A |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `messages` | List[[components.Message](../../components/message.md)] | :heavy_check_mark: | N/A |
|
||||
| `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_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
||||
| `provider` | [OptionalNullable[components.Schema0]](../../components/schema0.md) | :heavy_minus_sign: | N/A |
|
||||
| `plugins` | List[[components.Schema17](../../components/schema17.md)] | :heavy_minus_sign: | N/A |
|
||||
| `route` | [OptionalNullable[components.Route]](../../components/route.md) | :heavy_minus_sign: | N/A |
|
||||
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `session_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `trace` | [Optional[components.Schema19]](../../components/schema19.md) | :heavy_minus_sign: | N/A |
|
||||
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
|
||||
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | N/A |
|
||||
| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
|
||||
| `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | N/A |
|
||||
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `reasoning` | [Optional[components.Reasoning]](../../components/reasoning.md) | :heavy_minus_sign: | N/A |
|
||||
| `response_format` | [Optional[components.ResponseFormat]](../../components/responseformat.md) | :heavy_minus_sign: | N/A |
|
||||
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
|
||||
| `stop` | [OptionalNullable[components.Stop]](../../components/stop.md) | :heavy_minus_sign: | N/A |
|
||||
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
|
||||
| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../../components/chatstreamoptions.md) | :heavy_minus_sign: | N/A |
|
||||
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
|
||||
| `tools` | List[[components.ToolDefinitionJSON](../../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
|
||||
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `debug` | [Optional[components.Debug]](../../components/debug.md) | :heavy_minus_sign: | N/A |
|
||||
| `image_config` | Dict[str, [components.ChatGenerationParamsImageConfig](../../components/chatgenerationparamsimageconfig.md)] | :heavy_minus_sign: | N/A |
|
||||
| `modalities` | List[[components.Modality](../../components/modality.md)] | :heavy_minus_sign: | N/A |
|
||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||
|
||||
### Response
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user