mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-31 12:30:30 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
faa7751056 |
+3
-55
@@ -1,12 +1,12 @@
|
|||||||
lockVersion: 2.0.0
|
lockVersion: 2.0.0
|
||||||
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
|
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
|
||||||
management:
|
management:
|
||||||
docChecksum: 86bc0c01844e23d7e1921008d13372b9
|
docChecksum: 52c044061097671980a3ac37a4839b7f
|
||||||
docVersion: 1.0.0
|
docVersion: 1.0.0
|
||||||
speakeasyVersion: 1.666.0
|
speakeasyVersion: 1.666.0
|
||||||
generationVersion: 2.768.0
|
generationVersion: 2.768.0
|
||||||
releaseVersion: 0.5.1
|
releaseVersion: 0.5.0
|
||||||
configChecksum: 7f34271a911f5490f6f17a4e27f8ef7f
|
configChecksum: 4bcc2dd9900ba2408612f6fa04918561
|
||||||
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
|
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||||
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
|
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||||
published: true
|
published: true
|
||||||
@@ -498,19 +498,15 @@ generatedFiles:
|
|||||||
- docs/models/internal/globals.md
|
- docs/models/internal/globals.md
|
||||||
- docs/models/utils/retryconfig.md
|
- docs/models/utils/retryconfig.md
|
||||||
- docs/operations/apitype.md
|
- docs/operations/apitype.md
|
||||||
- docs/operations/bulkassignkeystoguardrailglobals.md
|
|
||||||
- docs/operations/bulkassignkeystoguardrailrequest.md
|
- docs/operations/bulkassignkeystoguardrailrequest.md
|
||||||
- docs/operations/bulkassignkeystoguardrailrequestbody.md
|
- docs/operations/bulkassignkeystoguardrailrequestbody.md
|
||||||
- docs/operations/bulkassignkeystoguardrailresponse.md
|
- docs/operations/bulkassignkeystoguardrailresponse.md
|
||||||
- docs/operations/bulkassignmemberstoguardrailglobals.md
|
|
||||||
- docs/operations/bulkassignmemberstoguardrailrequest.md
|
- docs/operations/bulkassignmemberstoguardrailrequest.md
|
||||||
- docs/operations/bulkassignmemberstoguardrailrequestbody.md
|
- docs/operations/bulkassignmemberstoguardrailrequestbody.md
|
||||||
- docs/operations/bulkassignmemberstoguardrailresponse.md
|
- docs/operations/bulkassignmemberstoguardrailresponse.md
|
||||||
- docs/operations/bulkunassignkeysfromguardrailglobals.md
|
|
||||||
- docs/operations/bulkunassignkeysfromguardrailrequest.md
|
- docs/operations/bulkunassignkeysfromguardrailrequest.md
|
||||||
- docs/operations/bulkunassignkeysfromguardrailrequestbody.md
|
- docs/operations/bulkunassignkeysfromguardrailrequestbody.md
|
||||||
- docs/operations/bulkunassignkeysfromguardrailresponse.md
|
- docs/operations/bulkunassignkeysfromguardrailresponse.md
|
||||||
- docs/operations/bulkunassignmembersfromguardrailglobals.md
|
|
||||||
- docs/operations/bulkunassignmembersfromguardrailrequest.md
|
- docs/operations/bulkunassignmembersfromguardrailrequest.md
|
||||||
- docs/operations/bulkunassignmembersfromguardrailrequestbody.md
|
- docs/operations/bulkunassignmembersfromguardrailrequestbody.md
|
||||||
- docs/operations/bulkunassignmembersfromguardrailresponse.md
|
- docs/operations/bulkunassignmembersfromguardrailresponse.md
|
||||||
@@ -521,119 +517,77 @@ generatedFiles:
|
|||||||
- docs/operations/contenttext.md
|
- docs/operations/contenttext.md
|
||||||
- docs/operations/createauthkeyscodecodechallengemethod.md
|
- docs/operations/createauthkeyscodecodechallengemethod.md
|
||||||
- docs/operations/createauthkeyscodedata.md
|
- docs/operations/createauthkeyscodedata.md
|
||||||
- docs/operations/createauthkeyscodeglobals.md
|
|
||||||
- docs/operations/createauthkeyscoderequest.md
|
- docs/operations/createauthkeyscoderequest.md
|
||||||
- docs/operations/createauthkeyscoderequestbody.md
|
|
||||||
- docs/operations/createauthkeyscoderesponse.md
|
- docs/operations/createauthkeyscoderesponse.md
|
||||||
- docs/operations/createcoinbasechargedata.md
|
- docs/operations/createcoinbasechargedata.md
|
||||||
- docs/operations/createcoinbasechargeglobals.md
|
|
||||||
- docs/operations/createcoinbasechargerequest.md
|
|
||||||
- docs/operations/createcoinbasechargeresponse.md
|
- docs/operations/createcoinbasechargeresponse.md
|
||||||
- docs/operations/createcoinbasechargesecurity.md
|
- docs/operations/createcoinbasechargesecurity.md
|
||||||
- docs/operations/createembeddingsdata.md
|
- docs/operations/createembeddingsdata.md
|
||||||
- docs/operations/createembeddingsglobals.md
|
|
||||||
- docs/operations/createembeddingsrequest.md
|
- docs/operations/createembeddingsrequest.md
|
||||||
- docs/operations/createembeddingsrequestbody.md
|
|
||||||
- docs/operations/createembeddingsresponse.md
|
- docs/operations/createembeddingsresponse.md
|
||||||
- docs/operations/createembeddingsresponsebody.md
|
- docs/operations/createembeddingsresponsebody.md
|
||||||
- docs/operations/createguardraildata.md
|
- docs/operations/createguardraildata.md
|
||||||
- docs/operations/createguardrailglobals.md
|
|
||||||
- docs/operations/createguardrailrequest.md
|
- docs/operations/createguardrailrequest.md
|
||||||
- docs/operations/createguardrailrequestbody.md
|
|
||||||
- docs/operations/createguardrailresetintervalrequest.md
|
- docs/operations/createguardrailresetintervalrequest.md
|
||||||
- docs/operations/createguardrailresetintervalresponse.md
|
- docs/operations/createguardrailresetintervalresponse.md
|
||||||
- docs/operations/createguardrailresponse.md
|
- docs/operations/createguardrailresponse.md
|
||||||
- docs/operations/createkeysdata.md
|
- docs/operations/createkeysdata.md
|
||||||
- docs/operations/createkeysglobals.md
|
|
||||||
- docs/operations/createkeyslimitreset.md
|
- docs/operations/createkeyslimitreset.md
|
||||||
- docs/operations/createkeysrequest.md
|
- docs/operations/createkeysrequest.md
|
||||||
- docs/operations/createkeysrequestbody.md
|
|
||||||
- docs/operations/createkeysresponse.md
|
- docs/operations/createkeysresponse.md
|
||||||
- docs/operations/createresponsesglobals.md
|
|
||||||
- docs/operations/createresponsesrequest.md
|
|
||||||
- docs/operations/createresponsesresponse.md
|
- docs/operations/createresponsesresponse.md
|
||||||
- docs/operations/createresponsesresponsebody.md
|
- docs/operations/createresponsesresponsebody.md
|
||||||
- docs/operations/deleteguardrailglobals.md
|
|
||||||
- docs/operations/deleteguardrailrequest.md
|
- docs/operations/deleteguardrailrequest.md
|
||||||
- docs/operations/deleteguardrailresponse.md
|
- docs/operations/deleteguardrailresponse.md
|
||||||
- docs/operations/deletekeysglobals.md
|
|
||||||
- docs/operations/deletekeysrequest.md
|
- docs/operations/deletekeysrequest.md
|
||||||
- docs/operations/deletekeysresponse.md
|
- docs/operations/deletekeysresponse.md
|
||||||
- docs/operations/embedding.md
|
- docs/operations/embedding.md
|
||||||
- docs/operations/encodingformat.md
|
- docs/operations/encodingformat.md
|
||||||
- docs/operations/exchangeauthcodeforapikeycodechallengemethod.md
|
- docs/operations/exchangeauthcodeforapikeycodechallengemethod.md
|
||||||
- docs/operations/exchangeauthcodeforapikeyglobals.md
|
|
||||||
- docs/operations/exchangeauthcodeforapikeyrequest.md
|
- docs/operations/exchangeauthcodeforapikeyrequest.md
|
||||||
- docs/operations/exchangeauthcodeforapikeyrequestbody.md
|
|
||||||
- docs/operations/exchangeauthcodeforapikeyresponse.md
|
- docs/operations/exchangeauthcodeforapikeyresponse.md
|
||||||
- docs/operations/getcreditsdata.md
|
- docs/operations/getcreditsdata.md
|
||||||
- docs/operations/getcreditsglobals.md
|
|
||||||
- docs/operations/getcreditsrequest.md
|
|
||||||
- docs/operations/getcreditsresponse.md
|
- docs/operations/getcreditsresponse.md
|
||||||
- docs/operations/getcurrentkeydata.md
|
- docs/operations/getcurrentkeydata.md
|
||||||
- docs/operations/getcurrentkeyglobals.md
|
|
||||||
- docs/operations/getcurrentkeyrequest.md
|
|
||||||
- docs/operations/getcurrentkeyresponse.md
|
- docs/operations/getcurrentkeyresponse.md
|
||||||
- docs/operations/getgenerationdata.md
|
- docs/operations/getgenerationdata.md
|
||||||
- docs/operations/getgenerationglobals.md
|
|
||||||
- docs/operations/getgenerationrequest.md
|
- docs/operations/getgenerationrequest.md
|
||||||
- docs/operations/getgenerationresponse.md
|
- docs/operations/getgenerationresponse.md
|
||||||
- docs/operations/getguardraildata.md
|
- docs/operations/getguardraildata.md
|
||||||
- docs/operations/getguardrailglobals.md
|
|
||||||
- docs/operations/getguardrailrequest.md
|
- docs/operations/getguardrailrequest.md
|
||||||
- docs/operations/getguardrailresetinterval.md
|
- docs/operations/getguardrailresetinterval.md
|
||||||
- docs/operations/getguardrailresponse.md
|
- docs/operations/getguardrailresponse.md
|
||||||
- docs/operations/getkeydata.md
|
- docs/operations/getkeydata.md
|
||||||
- docs/operations/getkeyglobals.md
|
|
||||||
- docs/operations/getkeyrequest.md
|
- docs/operations/getkeyrequest.md
|
||||||
- docs/operations/getkeyresponse.md
|
- docs/operations/getkeyresponse.md
|
||||||
- docs/operations/getmodelsglobals.md
|
|
||||||
- docs/operations/getmodelsrequest.md
|
- docs/operations/getmodelsrequest.md
|
||||||
- docs/operations/getuseractivityglobals.md
|
|
||||||
- docs/operations/getuseractivityrequest.md
|
- docs/operations/getuseractivityrequest.md
|
||||||
- docs/operations/getuseractivityresponse.md
|
- docs/operations/getuseractivityresponse.md
|
||||||
- docs/operations/imageurl.md
|
- docs/operations/imageurl.md
|
||||||
- docs/operations/input.md
|
- docs/operations/input.md
|
||||||
- docs/operations/inputunion.md
|
- docs/operations/inputunion.md
|
||||||
- docs/operations/listdata.md
|
- docs/operations/listdata.md
|
||||||
- docs/operations/listembeddingsmodelsglobals.md
|
|
||||||
- docs/operations/listembeddingsmodelsrequest.md
|
|
||||||
- docs/operations/listendpointsglobals.md
|
|
||||||
- docs/operations/listendpointsrequest.md
|
- docs/operations/listendpointsrequest.md
|
||||||
- docs/operations/listendpointsresponse.md
|
- docs/operations/listendpointsresponse.md
|
||||||
- docs/operations/listendpointszdrglobals.md
|
|
||||||
- docs/operations/listendpointszdrrequest.md
|
|
||||||
- docs/operations/listendpointszdrresponse.md
|
- docs/operations/listendpointszdrresponse.md
|
||||||
- docs/operations/listglobals.md
|
|
||||||
- docs/operations/listguardrailkeyassignmentsdata.md
|
- docs/operations/listguardrailkeyassignmentsdata.md
|
||||||
- docs/operations/listguardrailkeyassignmentsglobals.md
|
|
||||||
- docs/operations/listguardrailkeyassignmentsrequest.md
|
- docs/operations/listguardrailkeyassignmentsrequest.md
|
||||||
- docs/operations/listguardrailkeyassignmentsresponse.md
|
- docs/operations/listguardrailkeyassignmentsresponse.md
|
||||||
- docs/operations/listguardrailmemberassignmentsdata.md
|
- docs/operations/listguardrailmemberassignmentsdata.md
|
||||||
- docs/operations/listguardrailmemberassignmentsglobals.md
|
|
||||||
- docs/operations/listguardrailmemberassignmentsrequest.md
|
- docs/operations/listguardrailmemberassignmentsrequest.md
|
||||||
- docs/operations/listguardrailmemberassignmentsresponse.md
|
- docs/operations/listguardrailmemberassignmentsresponse.md
|
||||||
- docs/operations/listguardrailsdata.md
|
- docs/operations/listguardrailsdata.md
|
||||||
- docs/operations/listguardrailsglobals.md
|
|
||||||
- docs/operations/listguardrailsrequest.md
|
- docs/operations/listguardrailsrequest.md
|
||||||
- docs/operations/listguardrailsresetinterval.md
|
- docs/operations/listguardrailsresetinterval.md
|
||||||
- docs/operations/listguardrailsresponse.md
|
- docs/operations/listguardrailsresponse.md
|
||||||
- docs/operations/listkeyassignmentsdata.md
|
- docs/operations/listkeyassignmentsdata.md
|
||||||
- docs/operations/listkeyassignmentsglobals.md
|
|
||||||
- docs/operations/listkeyassignmentsrequest.md
|
- docs/operations/listkeyassignmentsrequest.md
|
||||||
- docs/operations/listkeyassignmentsresponse.md
|
- docs/operations/listkeyassignmentsresponse.md
|
||||||
- docs/operations/listmemberassignmentsdata.md
|
- docs/operations/listmemberassignmentsdata.md
|
||||||
- docs/operations/listmemberassignmentsglobals.md
|
|
||||||
- docs/operations/listmemberassignmentsrequest.md
|
- docs/operations/listmemberassignmentsrequest.md
|
||||||
- docs/operations/listmemberassignmentsresponse.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/listmodelsusersecurity.md
|
||||||
- docs/operations/listprovidersdata.md
|
- docs/operations/listprovidersdata.md
|
||||||
- docs/operations/listprovidersglobals.md
|
|
||||||
- docs/operations/listprovidersrequest.md
|
|
||||||
- docs/operations/listprovidersresponse.md
|
- docs/operations/listprovidersresponse.md
|
||||||
- docs/operations/listrequest.md
|
- docs/operations/listrequest.md
|
||||||
- docs/operations/listresponse.md
|
- docs/operations/listresponse.md
|
||||||
@@ -643,21 +597,17 @@ generatedFiles:
|
|||||||
- docs/operations/providername.md
|
- docs/operations/providername.md
|
||||||
- docs/operations/providerresponse.md
|
- docs/operations/providerresponse.md
|
||||||
- docs/operations/ratelimit.md
|
- docs/operations/ratelimit.md
|
||||||
- docs/operations/sendchatcompletionrequestglobals.md
|
|
||||||
- docs/operations/sendchatcompletionrequestrequest.md
|
|
||||||
- docs/operations/sendchatcompletionrequestresponse.md
|
- docs/operations/sendchatcompletionrequestresponse.md
|
||||||
- docs/operations/transferintent.md
|
- docs/operations/transferintent.md
|
||||||
- docs/operations/typeimageurl.md
|
- docs/operations/typeimageurl.md
|
||||||
- docs/operations/typetext.md
|
- docs/operations/typetext.md
|
||||||
- docs/operations/updateguardraildata.md
|
- docs/operations/updateguardraildata.md
|
||||||
- docs/operations/updateguardrailglobals.md
|
|
||||||
- docs/operations/updateguardrailrequest.md
|
- docs/operations/updateguardrailrequest.md
|
||||||
- docs/operations/updateguardrailrequestbody.md
|
- docs/operations/updateguardrailrequestbody.md
|
||||||
- docs/operations/updateguardrailresetintervalrequest.md
|
- docs/operations/updateguardrailresetintervalrequest.md
|
||||||
- docs/operations/updateguardrailresetintervalresponse.md
|
- docs/operations/updateguardrailresetintervalresponse.md
|
||||||
- docs/operations/updateguardrailresponse.md
|
- docs/operations/updateguardrailresponse.md
|
||||||
- docs/operations/updatekeysdata.md
|
- docs/operations/updatekeysdata.md
|
||||||
- docs/operations/updatekeysglobals.md
|
|
||||||
- docs/operations/updatekeyslimitreset.md
|
- docs/operations/updatekeyslimitreset.md
|
||||||
- docs/operations/updatekeysrequest.md
|
- docs/operations/updatekeysrequest.md
|
||||||
- docs/operations/updatekeysrequestbody.md
|
- docs/operations/updatekeysrequestbody.md
|
||||||
@@ -902,7 +852,6 @@ generatedFiles:
|
|||||||
- src/openrouter/operations/getmodels.py
|
- src/openrouter/operations/getmodels.py
|
||||||
- src/openrouter/operations/getuseractivity.py
|
- src/openrouter/operations/getuseractivity.py
|
||||||
- src/openrouter/operations/list.py
|
- src/openrouter/operations/list.py
|
||||||
- src/openrouter/operations/listembeddingsmodels.py
|
|
||||||
- src/openrouter/operations/listendpoints.py
|
- src/openrouter/operations/listendpoints.py
|
||||||
- src/openrouter/operations/listendpointszdr.py
|
- src/openrouter/operations/listendpointszdr.py
|
||||||
- src/openrouter/operations/listguardrailkeyassignments.py
|
- src/openrouter/operations/listguardrailkeyassignments.py
|
||||||
@@ -910,7 +859,6 @@ generatedFiles:
|
|||||||
- src/openrouter/operations/listguardrails.py
|
- src/openrouter/operations/listguardrails.py
|
||||||
- src/openrouter/operations/listkeyassignments.py
|
- src/openrouter/operations/listkeyassignments.py
|
||||||
- src/openrouter/operations/listmemberassignments.py
|
- src/openrouter/operations/listmemberassignments.py
|
||||||
- src/openrouter/operations/listmodelscount.py
|
|
||||||
- src/openrouter/operations/listmodelsuser.py
|
- src/openrouter/operations/listmodelsuser.py
|
||||||
- src/openrouter/operations/listproviders.py
|
- src/openrouter/operations/listproviders.py
|
||||||
- src/openrouter/operations/sendchatcompletionrequest.py
|
- src/openrouter/operations/sendchatcompletionrequest.py
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ generation:
|
|||||||
skipResponseBodyAssertions: false
|
skipResponseBodyAssertions: false
|
||||||
preApplyUnionDiscriminators: true
|
preApplyUnionDiscriminators: true
|
||||||
python:
|
python:
|
||||||
version: 0.5.1
|
version: 0.5.0
|
||||||
additionalDependencies:
|
additionalDependencies:
|
||||||
dev: {}
|
dev: {}
|
||||||
main: {}
|
main: {}
|
||||||
|
|||||||
@@ -4430,9 +4430,6 @@ components:
|
|||||||
required:
|
required:
|
||||||
- ephemeral_5m_input_tokens
|
- ephemeral_5m_input_tokens
|
||||||
- ephemeral_1h_input_tokens
|
- ephemeral_1h_input_tokens
|
||||||
inference_geo:
|
|
||||||
type: string
|
|
||||||
nullable: true
|
|
||||||
server_tool_use:
|
server_tool_use:
|
||||||
type: object
|
type: object
|
||||||
nullable: true
|
nullable: true
|
||||||
@@ -4454,7 +4451,6 @@ components:
|
|||||||
- cache_creation_input_tokens
|
- cache_creation_input_tokens
|
||||||
- cache_read_input_tokens
|
- cache_read_input_tokens
|
||||||
- cache_creation
|
- cache_creation
|
||||||
- inference_geo
|
|
||||||
- server_tool_use
|
- server_tool_use
|
||||||
- service_tier
|
- service_tier
|
||||||
required:
|
required:
|
||||||
@@ -4489,7 +4485,6 @@ components:
|
|||||||
cache_creation_input_tokens: null
|
cache_creation_input_tokens: null
|
||||||
cache_read_input_tokens: null
|
cache_read_input_tokens: null
|
||||||
cache_creation: null
|
cache_creation: null
|
||||||
inference_geo: null
|
|
||||||
server_tool_use: null
|
server_tool_use: null
|
||||||
service_tier: standard
|
service_tier: standard
|
||||||
AnthropicMessagesStreamEvent:
|
AnthropicMessagesStreamEvent:
|
||||||
@@ -4809,9 +4804,6 @@ components:
|
|||||||
required:
|
required:
|
||||||
- ephemeral_5m_input_tokens
|
- ephemeral_5m_input_tokens
|
||||||
- ephemeral_1h_input_tokens
|
- ephemeral_1h_input_tokens
|
||||||
inference_geo:
|
|
||||||
type: string
|
|
||||||
nullable: true
|
|
||||||
server_tool_use:
|
server_tool_use:
|
||||||
type: object
|
type: object
|
||||||
nullable: true
|
nullable: true
|
||||||
@@ -4833,7 +4825,6 @@ components:
|
|||||||
- cache_creation_input_tokens
|
- cache_creation_input_tokens
|
||||||
- cache_read_input_tokens
|
- cache_read_input_tokens
|
||||||
- cache_creation
|
- cache_creation
|
||||||
- inference_geo
|
|
||||||
- server_tool_use
|
- server_tool_use
|
||||||
- service_tier
|
- service_tier
|
||||||
required:
|
required:
|
||||||
@@ -6541,10 +6532,9 @@ components:
|
|||||||
- low
|
- low
|
||||||
- medium
|
- medium
|
||||||
- high
|
- high
|
||||||
- max
|
|
||||||
description: >-
|
description: >-
|
||||||
How much effort the model should put into its response. Higher effort levels may result in more thorough
|
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`.
|
analysis but take longer. Valid values are `low`, `medium`, or `high`.
|
||||||
example: medium
|
example: medium
|
||||||
description: Configuration for controlling output behavior. Currently supports the effort parameter for Claude Opus 4.5.
|
description: Configuration for controlling output behavior. Currently supports the effort parameter for Claude Opus 4.5.
|
||||||
AnthropicMessagesRequest:
|
AnthropicMessagesRequest:
|
||||||
@@ -6960,14 +6950,6 @@ components:
|
|||||||
- disabled
|
- disabled
|
||||||
required:
|
required:
|
||||||
- type
|
- type
|
||||||
- type: object
|
|
||||||
properties:
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- adaptive
|
|
||||||
required:
|
|
||||||
- type
|
|
||||||
service_tier:
|
service_tier:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
|||||||
+1
-103
@@ -4435,9 +4435,6 @@ components:
|
|||||||
required:
|
required:
|
||||||
- ephemeral_5m_input_tokens
|
- ephemeral_5m_input_tokens
|
||||||
- ephemeral_1h_input_tokens
|
- ephemeral_1h_input_tokens
|
||||||
inference_geo:
|
|
||||||
type: string
|
|
||||||
nullable: true
|
|
||||||
server_tool_use:
|
server_tool_use:
|
||||||
type: object
|
type: object
|
||||||
nullable: true
|
nullable: true
|
||||||
@@ -4460,7 +4457,6 @@ components:
|
|||||||
- cache_creation_input_tokens
|
- cache_creation_input_tokens
|
||||||
- cache_read_input_tokens
|
- cache_read_input_tokens
|
||||||
- cache_creation
|
- cache_creation
|
||||||
- inference_geo
|
|
||||||
- server_tool_use
|
- server_tool_use
|
||||||
- service_tier
|
- service_tier
|
||||||
required:
|
required:
|
||||||
@@ -4495,7 +4491,6 @@ components:
|
|||||||
cache_creation_input_tokens: null
|
cache_creation_input_tokens: null
|
||||||
cache_read_input_tokens: null
|
cache_read_input_tokens: null
|
||||||
cache_creation: null
|
cache_creation: null
|
||||||
inference_geo: null
|
|
||||||
server_tool_use: null
|
server_tool_use: null
|
||||||
service_tier: standard
|
service_tier: standard
|
||||||
AnthropicMessagesStreamEvent:
|
AnthropicMessagesStreamEvent:
|
||||||
@@ -4816,9 +4811,6 @@ components:
|
|||||||
required:
|
required:
|
||||||
- ephemeral_5m_input_tokens
|
- ephemeral_5m_input_tokens
|
||||||
- ephemeral_1h_input_tokens
|
- ephemeral_1h_input_tokens
|
||||||
inference_geo:
|
|
||||||
type: string
|
|
||||||
nullable: true
|
|
||||||
server_tool_use:
|
server_tool_use:
|
||||||
type: object
|
type: object
|
||||||
nullable: true
|
nullable: true
|
||||||
@@ -4841,7 +4833,6 @@ components:
|
|||||||
- cache_creation_input_tokens
|
- cache_creation_input_tokens
|
||||||
- cache_read_input_tokens
|
- cache_read_input_tokens
|
||||||
- cache_creation
|
- cache_creation
|
||||||
- inference_geo
|
|
||||||
- server_tool_use
|
- server_tool_use
|
||||||
- service_tier
|
- service_tier
|
||||||
required:
|
required:
|
||||||
@@ -6569,9 +6560,8 @@ components:
|
|||||||
- low
|
- low
|
||||||
- medium
|
- medium
|
||||||
- high
|
- high
|
||||||
- max
|
|
||||||
description: >-
|
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`.
|
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`, or `high`.
|
||||||
example: medium
|
example: medium
|
||||||
x-speakeasy-unknown-values: allow
|
x-speakeasy-unknown-values: allow
|
||||||
description: Configuration for controlling output behavior. Currently supports the effort parameter for Claude Opus 4.5.
|
description: Configuration for controlling output behavior. Currently supports the effort parameter for Claude Opus 4.5.
|
||||||
@@ -6993,14 +6983,6 @@ components:
|
|||||||
- disabled
|
- disabled
|
||||||
required:
|
required:
|
||||||
- type
|
- type
|
||||||
- type: object
|
|
||||||
properties:
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- adaptive
|
|
||||||
required:
|
|
||||||
- type
|
|
||||||
service_tier:
|
service_tier:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
@@ -9595,9 +9577,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ProviderOverloadedResponse'
|
$ref: '#/components/schemas/ProviderOverloadedResponse'
|
||||||
operationId: createResponses
|
operationId: createResponses
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/messages:
|
/messages:
|
||||||
post:
|
post:
|
||||||
x-speakeasy-ignore: true
|
x-speakeasy-ignore: true
|
||||||
@@ -9826,9 +9805,6 @@ paths:
|
|||||||
- type
|
- type
|
||||||
- error
|
- error
|
||||||
operationId: createMessages
|
operationId: createMessages
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/activity:
|
/activity:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -9898,9 +9874,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/credits:
|
/credits:
|
||||||
get:
|
get:
|
||||||
x-speakeasy-name-override: getCredits
|
x-speakeasy-name-override: getCredits
|
||||||
@@ -9960,9 +9933,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/credits/coinbase:
|
/credits/coinbase:
|
||||||
post:
|
post:
|
||||||
security:
|
security:
|
||||||
@@ -10085,9 +10055,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/embeddings:
|
/embeddings:
|
||||||
post:
|
post:
|
||||||
x-speakeasy-name-override: generate
|
x-speakeasy-name-override: generate
|
||||||
@@ -10292,9 +10259,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ProviderOverloadedResponse'
|
$ref: '#/components/schemas/ProviderOverloadedResponse'
|
||||||
operationId: createEmbeddings
|
operationId: createEmbeddings
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/embeddings/models:
|
/embeddings/models:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -10322,9 +10286,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
operationId: listEmbeddingsModels
|
operationId: listEmbeddingsModels
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/generation:
|
/generation:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -10723,9 +10684,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ProviderOverloadedResponse'
|
$ref: '#/components/schemas/ProviderOverloadedResponse'
|
||||||
operationId: getGeneration
|
operationId: getGeneration
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/models/count:
|
/models/count:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -10746,9 +10704,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
operationId: listModelsCount
|
operationId: listModelsCount
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/models:
|
/models:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -10803,9 +10758,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
operationId: getModels
|
operationId: getModels
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/models/user:
|
/models/user:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -10842,9 +10794,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
operationId: listModelsUser
|
operationId: listModelsUser
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/models/{author}/{slug}/endpoints:
|
/models/{author}/{slug}/endpoints:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -10887,9 +10836,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/endpoints/zdr:
|
/endpoints/zdr:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -10917,9 +10863,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
operationId: listEndpointsZdr
|
operationId: listEndpointsZdr
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/providers:
|
/providers:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -10981,9 +10924,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/keys:
|
/keys:
|
||||||
get:
|
get:
|
||||||
operationId: list
|
operationId: list
|
||||||
@@ -11427,9 +11367,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
operationId: createKeys
|
operationId: createKeys
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/keys/{hash}:
|
/keys/{hash}:
|
||||||
patch:
|
patch:
|
||||||
x-speakeasy-name-override: update
|
x-speakeasy-name-override: update
|
||||||
@@ -11927,9 +11864,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/guardrails:
|
/guardrails:
|
||||||
get:
|
get:
|
||||||
operationId: listGuardrails
|
operationId: listGuardrails
|
||||||
@@ -12302,9 +12236,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/guardrails/{id}:
|
/guardrails/{id}:
|
||||||
get:
|
get:
|
||||||
operationId: getGuardrail
|
operationId: getGuardrail
|
||||||
@@ -12722,9 +12653,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/guardrails/assignments/keys:
|
/guardrails/assignments/keys:
|
||||||
get:
|
get:
|
||||||
operationId: listKeyAssignments
|
operationId: listKeyAssignments
|
||||||
@@ -12823,9 +12751,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/guardrails/assignments/members:
|
/guardrails/assignments/members:
|
||||||
get:
|
get:
|
||||||
operationId: listMemberAssignments
|
operationId: listMemberAssignments
|
||||||
@@ -12919,9 +12844,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/guardrails/{id}/assignments/keys:
|
/guardrails/{id}/assignments/keys:
|
||||||
get:
|
get:
|
||||||
operationId: listGuardrailKeyAssignments
|
operationId: listGuardrailKeyAssignments
|
||||||
@@ -13109,9 +13031,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/guardrails/{id}/assignments/members:
|
/guardrails/{id}/assignments/members:
|
||||||
get:
|
get:
|
||||||
operationId: listGuardrailMemberAssignments
|
operationId: listGuardrailMemberAssignments
|
||||||
@@ -13295,9 +13214,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/guardrails/{id}/assignments/keys/remove:
|
/guardrails/{id}/assignments/keys/remove:
|
||||||
post:
|
post:
|
||||||
operationId: bulkUnassignKeysFromGuardrail
|
operationId: bulkUnassignKeysFromGuardrail
|
||||||
@@ -13373,9 +13289,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/guardrails/{id}/assignments/members/remove:
|
/guardrails/{id}/assignments/members/remove:
|
||||||
post:
|
post:
|
||||||
operationId: bulkUnassignMembersFromGuardrail
|
operationId: bulkUnassignMembersFromGuardrail
|
||||||
@@ -13452,9 +13365,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/key:
|
/key:
|
||||||
get:
|
get:
|
||||||
operationId: getCurrentKey
|
operationId: getCurrentKey
|
||||||
@@ -13643,9 +13553,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/auth/keys:
|
/auth/keys:
|
||||||
post:
|
post:
|
||||||
operationId: exchangeAuthCodeForAPIKey
|
operationId: exchangeAuthCodeForAPIKey
|
||||||
@@ -13724,9 +13631,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/auth/keys/code:
|
/auth/keys/code:
|
||||||
post:
|
post:
|
||||||
x-speakeasy-name-override: createAuthCode
|
x-speakeasy-name-override: createAuthCode
|
||||||
@@ -13828,9 +13732,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/InternalServerResponse'
|
$ref: '#/components/schemas/InternalServerResponse'
|
||||||
operationId: createAuthKeysCode
|
operationId: createAuthKeysCode
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
/chat/completions:
|
/chat/completions:
|
||||||
post:
|
post:
|
||||||
summary: Create a chat completion
|
summary: Create a chat completion
|
||||||
@@ -13885,9 +13786,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ChatError'
|
$ref: '#/components/schemas/ChatError'
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/AppIdentifier"
|
|
||||||
- $ref: "#/components/parameters/AppDisplayName"
|
|
||||||
servers:
|
servers:
|
||||||
- url: https://openrouter.ai/api/v1
|
- url: https://openrouter.ai/api/v1
|
||||||
description: Production server
|
description: Production server
|
||||||
|
|||||||
@@ -33,11 +33,3 @@ actions:
|
|||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
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
|
- latest
|
||||||
OpenRouter API:
|
OpenRouter API:
|
||||||
sourceNamespace: open-router-chat-completions-api
|
sourceNamespace: open-router-chat-completions-api
|
||||||
sourceRevisionDigest: sha256:9d0580abfbe319bbd1e3d51fa921b5c97134ae4ef84ee4b1254beb0e92bf4fd9
|
sourceRevisionDigest: sha256:9726bd1a602e2f5f3665445896ccad693820754350ead01d7aef39e0dedeb3dc
|
||||||
sourceBlobDigest: sha256:8555ff45ab0e3c22ae07af40cc4581ef14107b4d62c38bde3c25512fd4aae199
|
sourceBlobDigest: sha256:f8e66605c401e126a5f39b6e0272dd792182257c5162fdfbf7c5a815c516c581
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- main
|
- main
|
||||||
@@ -18,10 +18,10 @@ targets:
|
|||||||
open-router:
|
open-router:
|
||||||
source: OpenRouter API
|
source: OpenRouter API
|
||||||
sourceNamespace: open-router-chat-completions-api
|
sourceNamespace: open-router-chat-completions-api
|
||||||
sourceRevisionDigest: sha256:9d0580abfbe319bbd1e3d51fa921b5c97134ae4ef84ee4b1254beb0e92bf4fd9
|
sourceRevisionDigest: sha256:9726bd1a602e2f5f3665445896ccad693820754350ead01d7aef39e0dedeb3dc
|
||||||
sourceBlobDigest: sha256:8555ff45ab0e3c22ae07af40cc4581ef14107b4d62c38bde3c25512fd4aae199
|
sourceBlobDigest: sha256:f8e66605c401e126a5f39b6e0272dd792182257c5162fdfbf7c5a815c516c581
|
||||||
codeSamplesNamespace: open-router-python-code-samples
|
codeSamplesNamespace: open-router-python-code-samples
|
||||||
codeSamplesRevisionDigest: sha256:e44fdec134bc5f249b3e785da067ea31d1bba8f9891bca0f6c19d7ace670ab11
|
codeSamplesRevisionDigest: sha256:6719e0045ac51c8ab2461cbd23189a7b289fad9032460c92183e5845f9e43f61
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
speakeasyVersion: 1.666.0
|
speakeasyVersion: 1.666.0
|
||||||
|
|||||||
@@ -182,8 +182,6 @@ import os
|
|||||||
def main():
|
def main():
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
# Rest of application here...
|
# Rest of application here...
|
||||||
@@ -193,8 +191,6 @@ def main():
|
|||||||
async def amain():
|
async def amain():
|
||||||
|
|
||||||
async with OpenRouter(
|
async with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
# Rest of application here...
|
# Rest of application here...
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -32,8 +30,6 @@ import os
|
|||||||
async def main():
|
async def main():
|
||||||
|
|
||||||
async with OpenRouter(
|
async with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,9 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `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.BulkAssignKeysToGuardrailRequestBody](../operations/bulkassignkeystoguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
|
||||||
| `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 | |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,9 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `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.BulkAssignMembersToGuardrailRequestBody](../operations/bulkassignmemberstoguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
|
||||||
| `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 | |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,9 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `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.BulkUnassignKeysFromGuardrailRequestBody](../operations/bulkunassignkeysfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
|
||||||
| `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 | |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,9 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `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.BulkUnassignMembersFromGuardrailRequestBody](../operations/bulkunassignmembersfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
|
||||||
| `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 | |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,8 +3,10 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `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 |
|
||||||
| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
| `code_challenge` | *Optional[str]* | :heavy_minus_sign: | PKCE code challenge for enhanced security | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM |
|
||||||
| `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/>} |
|
| `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 | |
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# 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 | |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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/> |
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# 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/>} |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,8 +3,12 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| 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/> |
|
| `input` | [operations.InputUnion](../operations/inputunion.md) | :heavy_check_mark: | N/A |
|
||||||
| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
| `model` | *str* | :heavy_check_mark: | N/A |
|
||||||
| `request_body` | [operations.CreateEmbeddingsRequestBody](../operations/createembeddingsrequestbody.md) | :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 |
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# 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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,8 +3,12 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `name` | *str* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail |
|
||||||
| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage |
|
||||||
| `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/>} |
|
| `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 |
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# 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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,8 +3,10 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `name` | *str* | :heavy_check_mark: | Name for the new API key | My New API Key |
|
||||||
| `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 |
|
||||||
| `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/>} |
|
| `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 |
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# 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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# CreateResponsesGlobals
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
||||||
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
|
|
||||||
| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# 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/>} |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# DeleteGuardrailGlobals
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
||||||
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
|
|
||||||
| `x_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,6 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to delete | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# DeleteKeysGlobals
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
||||||
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
|
|
||||||
| `x_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,6 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to delete | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||||
| `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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `code` | *str* | :heavy_check_mark: | The authorization code received from the OAuth redirect | auth_code_abc123def456 |
|
||||||
| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
| `code_verifier` | *Optional[str]* | :heavy_minus_sign: | The code verifier if code_challenge was used in the authorization request | dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk |
|
||||||
| `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/>} |
|
| `code_challenge_method` | [OptionalNullable[operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod]](../operations/exchangeauthcodeforapikeycodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# 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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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/> |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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/> |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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/> |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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/> |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,8 +3,6 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| 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/> |
|
| `id` | *str* | :heavy_check_mark: | N/A |
|
||||||
| `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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,8 +3,6 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to retrieve | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,8 +3,6 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to retrieve | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||||
| `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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,9 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `category` | [Optional[operations.Category]](../operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming |
|
||||||
| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | N/A | |
|
||||||
| `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 | |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,8 +3,6 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `date_` | *Optional[str]* | :heavy_minus_sign: | Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). | 2025-08-24 |
|
||||||
| `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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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/> |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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/> |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,9 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| 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/> |
|
| `author` | *str* | :heavy_check_mark: | N/A |
|
||||||
| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
| `slug` | *str* | :heavy_check_mark: | N/A |
|
||||||
| `author` | *str* | :heavy_check_mark: | N/A |
|
|
||||||
| `slug` | *str* | :heavy_check_mark: | N/A |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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/> |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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/> |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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/> |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,10 +3,8 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `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 |
|
||||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||||
| `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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,10 +3,8 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `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 |
|
||||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||||
| `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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,9 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||||
| `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` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||||
| `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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,9 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||||
| `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` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||||
| `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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,9 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||||
| `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` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||||
| `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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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/> |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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/> |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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/> |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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/> |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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/> |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,9 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `include_disabled` | *Optional[str]* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false |
|
||||||
| `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 API keys to skip for pagination | 0 |
|
||||||
| `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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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/> |
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# 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 |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,9 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `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.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/>} |
|
||||||
| `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/>} |
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# 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,9 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| 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/> | |
|
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to update | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||||
| `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.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/>} |
|
||||||
| `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/>} |
|
|
||||||
@@ -22,8 +22,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -36,12 +34,10 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| 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/> | |
|
| `date_` | *Optional[str]* | :heavy_minus_sign: | Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). | 2025-08-24 |
|
||||||
| `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. | |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
|
|||||||
+16
-40
@@ -27,8 +27,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -41,13 +39,11 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| 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/> | |
|
| `include_disabled` | *Optional[str]* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false |
|
||||||
| `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 API keys to skip for pagination | 0 |
|
||||||
| `include_disabled` | *Optional[str]* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
@@ -75,8 +71,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -92,8 +86,6 @@ with OpenRouter(
|
|||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `name` | *str* | :heavy_check_mark: | Name for the new API key | My New API Key |
|
| `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` | *OptionalNullable[float]* | :heavy_minus_sign: | Optional spending limit for the API key in USD | 50 |
|
||||||
| `limit_reset` | [OptionalNullable[operations.CreateKeysLimitReset]](../../operations/createkeyslimitreset.md) | :heavy_minus_sign: | Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. | monthly |
|
| `limit_reset` | [OptionalNullable[operations.CreateKeysLimitReset]](../../operations/createkeyslimitreset.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 |
|
| `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true |
|
||||||
@@ -127,8 +119,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -144,8 +134,6 @@ with OpenRouter(
|
|||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to update | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `limit` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit for the API key in USD | 75 |
|
||||||
@@ -181,8 +169,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -195,12 +181,10 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to delete | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
| `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/> | |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
@@ -229,8 +213,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -243,12 +225,10 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to retrieve | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
| `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/> | |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
@@ -277,8 +257,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -291,11 +269,9 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| 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/> |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
|
|||||||
+32
-36
@@ -20,8 +20,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -36,40 +34,38 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
|
||||||
| `messages` | List[[components.Message](../../components/message.md)] | :heavy_check_mark: | N/A |
|
| `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/> |
|
| `provider` | [OptionalNullable[components.Schema0]](../../components/schema0.md) | :heavy_minus_sign: | N/A |
|
||||||
| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
| `plugins` | List[[components.Schema17](../../components/schema17.md)] | :heavy_minus_sign: | N/A |
|
||||||
| `provider` | [OptionalNullable[components.Schema0]](../../components/schema0.md) | :heavy_minus_sign: | N/A |
|
| `route` | [OptionalNullable[components.Route]](../../components/route.md) | :heavy_minus_sign: | N/A |
|
||||||
| `plugins` | List[[components.Schema17](../../components/schema17.md)] | :heavy_minus_sign: | N/A |
|
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
| `route` | [OptionalNullable[components.Route]](../../components/route.md) | :heavy_minus_sign: | N/A |
|
| `session_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
| `session_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
|
||||||
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||||
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
|
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | N/A |
|
||||||
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
|
||||||
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | N/A |
|
| `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||||
| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
|
| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||||
| `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||||
| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | N/A |
|
||||||
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||||
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | N/A |
|
| `reasoning` | [Optional[components.Reasoning]](../../components/reasoning.md) | :heavy_minus_sign: | N/A |
|
||||||
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
| `response_format` | [Optional[components.ResponseFormat]](../../components/responseformat.md) | :heavy_minus_sign: | N/A |
|
||||||
| `reasoning` | [Optional[components.Reasoning]](../../components/reasoning.md) | :heavy_minus_sign: | N/A |
|
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
|
||||||
| `response_format` | [Optional[components.ResponseFormat]](../../components/responseformat.md) | :heavy_minus_sign: | N/A |
|
| `stop` | [OptionalNullable[components.Stop]](../../components/stop.md) | :heavy_minus_sign: | N/A |
|
||||||
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
|
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
|
||||||
| `stop` | [OptionalNullable[components.Stop]](../../components/stop.md) | :heavy_minus_sign: | N/A |
|
| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../../components/chatstreamoptions.md) | :heavy_minus_sign: | N/A |
|
||||||
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
|
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||||
| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../../components/chatstreamoptions.md) | :heavy_minus_sign: | N/A |
|
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
|
||||||
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
| `tools` | List[[components.ToolDefinitionJSON](../../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
|
||||||
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
|
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||||
| `tools` | List[[components.ToolDefinitionJSON](../../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
|
| `debug` | [Optional[components.Debug]](../../components/debug.md) | :heavy_minus_sign: | N/A |
|
||||||
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
| `image_config` | Dict[str, [components.ChatGenerationParamsImageConfig](../../components/chatgenerationparamsimageconfig.md)] | :heavy_minus_sign: | N/A |
|
||||||
| `debug` | [Optional[components.Debug]](../../components/debug.md) | :heavy_minus_sign: | N/A |
|
| `modalities` | List[[components.Modality](../../components/modality.md)] | :heavy_minus_sign: | N/A |
|
||||||
| `image_config` | Dict[str, [components.ChatGenerationParamsImageConfig](../../components/chatgenerationparamsimageconfig.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. |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
|
|||||||
+11
-20
@@ -23,8 +23,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -37,11 +35,9 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| 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/> |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
@@ -68,10 +64,7 @@ from openrouter import OpenRouter, operations
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter() as open_router:
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
) as open_router:
|
|
||||||
|
|
||||||
res = open_router.credits.create_coinbase_charge(security=operations.CreateCoinbaseChargeSecurity(
|
res = open_router.credits.create_coinbase_charge(security=operations.CreateCoinbaseChargeSecurity(
|
||||||
bearer=os.getenv("OPENROUTER_BEARER", ""),
|
bearer=os.getenv("OPENROUTER_BEARER", ""),
|
||||||
@@ -84,15 +77,13 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
||||||
| `security` | [operations.CreateCoinbaseChargeSecurity](../../operations/createcoinbasechargesecurity.md) | :heavy_check_mark: | N/A |
|
| `security` | [operations.CreateCoinbaseChargeSecurity](../../operations/createcoinbasechargesecurity.md) | :heavy_check_mark: | N/A |
|
||||||
| `amount` | *float* | :heavy_check_mark: | N/A |
|
| `amount` | *float* | :heavy_check_mark: | N/A |
|
||||||
| `sender` | *str* | :heavy_check_mark: | N/A |
|
| `sender` | *str* | :heavy_check_mark: | N/A |
|
||||||
| `chain_id` | [components.ChainID](../../components/chainid.md) | :heavy_check_mark: | N/A |
|
| `chain_id` | [components.ChainID](../../components/chainid.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/> |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -37,18 +35,16 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
||||||
| `input` | [operations.InputUnion](../../operations/inputunion.md) | :heavy_check_mark: | N/A |
|
| `input` | [operations.InputUnion](../../operations/inputunion.md) | :heavy_check_mark: | N/A |
|
||||||
| `model` | *str* | :heavy_check_mark: | N/A |
|
| `model` | *str* | :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/> |
|
| `encoding_format` | [Optional[operations.EncodingFormat]](../../operations/encodingformat.md) | :heavy_minus_sign: | N/A |
|
||||||
| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
|
| `dimensions` | *Optional[int]* | :heavy_minus_sign: | N/A |
|
||||||
| `encoding_format` | [Optional[operations.EncodingFormat]](../../operations/encodingformat.md) | :heavy_minus_sign: | N/A |
|
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
| `dimensions` | *Optional[int]* | :heavy_minus_sign: | N/A |
|
| `provider` | [Optional[components.ProviderPreferences]](../../components/providerpreferences.md) | :heavy_minus_sign: | Provider routing preferences for the request. |
|
||||||
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
| `input_type` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||||
| `provider` | [Optional[components.ProviderPreferences]](../../components/providerpreferences.md) | :heavy_minus_sign: | Provider routing preferences for the request. |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||||
| `input_type` | *Optional[str]* | :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
|
### Response
|
||||||
|
|
||||||
@@ -83,8 +79,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -97,11 +91,9 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| 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/> |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -37,13 +35,11 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||||
| `author` | *str* | :heavy_check_mark: | N/A |
|
| `author` | *str* | :heavy_check_mark: | N/A |
|
||||||
| `slug` | *str* | :heavy_check_mark: | N/A |
|
| `slug` | *str* | :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/> |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
@@ -70,8 +66,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -84,11 +78,9 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| 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/> |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -36,12 +34,10 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||||
| `id` | *str* | :heavy_check_mark: | N/A |
|
| `id` | *str* | :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/> |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
|
|||||||
+76
-128
@@ -34,8 +34,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -48,13 +46,11 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| 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/> | |
|
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||||
| `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` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records 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. | |
|
||||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
|
||||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
@@ -81,8 +77,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -95,18 +89,16 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `name` | *str* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail |
|
| `name` | *str* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail |
|
||||||
| `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/> | |
|
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage |
|
||||||
| `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_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 |
|
||||||
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage |
|
| `reset_interval` | [OptionalNullable[operations.CreateGuardrailResetIntervalRequest]](../../operations/createguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
|
||||||
| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 |
|
| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [<br/>"openai",<br/>"anthropic",<br/>"deepseek"<br/>] |
|
||||||
| `reset_interval` | [OptionalNullable[operations.CreateGuardrailResetIntervalRequest]](../../operations/createguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
|
| `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/>] |
|
||||||
| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [<br/>"openai",<br/>"anthropic",<br/>"deepseek"<br/>] |
|
| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false |
|
||||||
| `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/>] |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||||
| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false |
|
|
||||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
@@ -134,8 +126,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -148,12 +138,10 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to retrieve | 550e8400-e29b-41d4-a716-446655440000 |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to retrieve | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `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/> | |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
@@ -181,8 +169,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -195,19 +181,17 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `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/> | |
|
| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the guardrail | Updated Guardrail Name |
|
||||||
| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | New description for the guardrail | Updated description |
|
||||||
| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the guardrail | Updated Guardrail Name |
|
| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit in USD | 75 |
|
||||||
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | New description for the guardrail | Updated description |
|
| `reset_interval` | [OptionalNullable[operations.UpdateGuardrailResetIntervalRequest]](../../operations/updateguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
|
||||||
| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit in USD | 75 |
|
| `allowed_providers` | List[*str*] | :heavy_minus_sign: | New list of allowed provider IDs | [<br/>"openai",<br/>"anthropic",<br/>"deepseek"<br/>] |
|
||||||
| `reset_interval` | [OptionalNullable[operations.UpdateGuardrailResetIntervalRequest]](../../operations/updateguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
|
| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [<br/>"openai/gpt-5.2"<br/>] |
|
||||||
| `allowed_providers` | List[*str*] | :heavy_minus_sign: | New list of allowed provider IDs | [<br/>"openai",<br/>"anthropic",<br/>"deepseek"<br/>] |
|
| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | true |
|
||||||
| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [<br/>"openai/gpt-5.2"<br/>] |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||||
| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | true |
|
|
||||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
@@ -236,8 +220,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -250,12 +232,10 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to delete | 550e8400-e29b-41d4-a716-446655440000 |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to delete | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `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/> | |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
@@ -283,8 +263,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -297,13 +275,11 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| 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/> | |
|
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||||
| `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` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records 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. | |
|
||||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
|
||||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
@@ -330,8 +306,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -344,13 +318,11 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| 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/> | |
|
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||||
| `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` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records 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. | |
|
||||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
|
||||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
@@ -377,8 +349,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -391,14 +361,12 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `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/> | |
|
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||||
| `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` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records 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. | |
|
||||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
|
||||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
@@ -426,8 +394,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -442,13 +408,11 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `key_hashes` | List[*str*] | :heavy_check_mark: | Array of API key hashes to assign to the guardrail | [<br/>"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"<br/>] |
|
| `key_hashes` | List[*str*] | :heavy_check_mark: | Array of API key hashes to assign to the guardrail | [<br/>"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"<br/>] |
|
||||||
| `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/> | |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
@@ -477,8 +441,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -491,14 +453,12 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `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/> | |
|
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||||
| `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` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records 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. | |
|
||||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
|
||||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
@@ -526,8 +486,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -543,13 +501,11 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `member_user_ids` | List[*str*] | :heavy_check_mark: | Array of member user IDs to assign to the guardrail | [<br/>"user_abc123",<br/>"user_def456"<br/>] |
|
| `member_user_ids` | List[*str*] | :heavy_check_mark: | Array of member user IDs to assign to the guardrail | [<br/>"user_abc123",<br/>"user_def456"<br/>] |
|
||||||
| `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/> | |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
@@ -578,8 +534,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -594,13 +548,11 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `key_hashes` | List[*str*] | :heavy_check_mark: | Array of API key hashes to unassign from the guardrail | [<br/>"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"<br/>] |
|
| `key_hashes` | List[*str*] | :heavy_check_mark: | Array of API key hashes to unassign from the guardrail | [<br/>"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"<br/>] |
|
||||||
| `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/> | |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
@@ -629,8 +581,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -646,13 +596,11 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||||
| `member_user_ids` | List[*str*] | :heavy_check_mark: | Array of member user IDs to unassign from the guardrail | [<br/>"user_abc123",<br/>"user_def456"<br/>] |
|
| `member_user_ids` | List[*str*] | :heavy_check_mark: | Array of member user IDs to unassign from the guardrail | [<br/>"user_abc123",<br/>"user_def456"<br/>] |
|
||||||
| `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/> | |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
|
|||||||
+13
-26
@@ -24,8 +24,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -38,11 +36,9 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| 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/> |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
@@ -68,8 +64,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -82,13 +76,11 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| 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/> | |
|
| `category` | [Optional[operations.Category]](../../operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming |
|
||||||
| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | N/A | |
|
||||||
| `category` | [Optional[operations.Category]](../../operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||||
| `supported_parameters` | *Optional[str]* | :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
|
### Response
|
||||||
|
|
||||||
@@ -114,10 +106,7 @@ from openrouter import OpenRouter, operations
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter() as open_router:
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
) as open_router:
|
|
||||||
|
|
||||||
res = open_router.models.list_for_user(security=operations.ListModelsUserSecurity(
|
res = open_router.models.list_for_user(security=operations.ListModelsUserSecurity(
|
||||||
bearer=os.getenv("OPENROUTER_BEARER", ""),
|
bearer=os.getenv("OPENROUTER_BEARER", ""),
|
||||||
@@ -130,12 +119,10 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||||
| `security` | [operations.ListModelsUserSecurity](../../operations/listmodelsusersecurity.md) | :heavy_check_mark: | N/A |
|
| `security` | [operations.ListModelsUserSecurity](../../operations/listmodelsusersecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
||||||
| `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/> |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
|
|||||||
+14
-22
@@ -23,8 +23,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -37,14 +35,12 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `code` | *str* | :heavy_check_mark: | The authorization code received from the OAuth redirect | auth_code_abc123def456 |
|
| `code` | *str* | :heavy_check_mark: | The authorization code received from the OAuth redirect | auth_code_abc123def456 |
|
||||||
| `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/> | |
|
| `code_verifier` | *Optional[str]* | :heavy_minus_sign: | The code verifier if code_challenge was used in the authorization request | dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk |
|
||||||
| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
| `code_challenge_method` | [OptionalNullable[operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod]](../../operations/exchangeauthcodeforapikeycodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
|
||||||
| `code_verifier` | *Optional[str]* | :heavy_minus_sign: | The code verifier if code_challenge was used in the authorization request | dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||||
| `code_challenge_method` | [OptionalNullable[operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod]](../../operations/exchangeauthcodeforapikeycodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
|
|
||||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
@@ -72,8 +68,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -86,16 +80,14 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | 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 |
|
| `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 |
|
||||||
| `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/> | |
|
| `code_challenge` | *Optional[str]* | :heavy_minus_sign: | PKCE code challenge for enhanced security | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM |
|
||||||
| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
|
| `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../../operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
|
||||||
| `code_challenge` | *Optional[str]* | :heavy_minus_sign: | PKCE code challenge for enhanced security | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM |
|
| `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 |
|
||||||
| `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../../operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
|
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional expiration time for the API key to be created | |
|
||||||
| `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
||||||
| `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 | |
|
|
||||||
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -36,11 +34,9 @@ with OpenRouter(
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| 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/> |
|
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
||||||
| `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
|
### Response
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
with OpenRouter(
|
with OpenRouter(
|
||||||
http_referer="<value>",
|
|
||||||
x_title="<value>",
|
|
||||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||||
) as open_router:
|
) as open_router:
|
||||||
|
|
||||||
@@ -40,8 +38,6 @@ with OpenRouter(
|
|||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| 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/> | |
|
|
||||||
| `input` | [Optional[components.OpenResponsesInput]](../../components/openresponsesinput.md) | :heavy_minus_sign: | Input for a response request - can be a string or array of items | [<br/>{<br/>"role": "user",<br/>"content": "What is the weather today?"<br/>}<br/>] |
|
| `input` | [Optional[components.OpenResponsesInput]](../../components/openresponsesinput.md) | :heavy_minus_sign: | Input for a response request - can be a string or array of items | [<br/>{<br/>"role": "user",<br/>"content": "What is the weather today?"<br/>}<br/>] |
|
||||||
| `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
| `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||||
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | {<br/>"user_id": "123",<br/>"session_id": "abc-def-ghi"<br/>} |
|
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | {<br/>"user_id": "123",<br/>"session_id": "abc-def-ghi"<br/>} |
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "openrouter"
|
name = "openrouter"
|
||||||
version = "0.5.1"
|
version = "0.5.0"
|
||||||
description = "Official Python Client SDK for OpenRouter."
|
description = "Official Python Client SDK for OpenRouter."
|
||||||
authors = [{ name = "OpenRouter" },]
|
authors = [{ name = "OpenRouter" },]
|
||||||
readme = "README-PYPI.md"
|
readme = "README-PYPI.md"
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
import importlib.metadata
|
import importlib.metadata
|
||||||
|
|
||||||
__title__: str = "openrouter"
|
__title__: str = "openrouter"
|
||||||
__version__: str = "0.5.1"
|
__version__: str = "0.5.0"
|
||||||
__openapi_doc_version__: str = "1.0.0"
|
__openapi_doc_version__: str = "1.0.0"
|
||||||
__gen_version__: str = "2.768.0"
|
__gen_version__: str = "2.768.0"
|
||||||
__user_agent__: str = "speakeasy-sdk/python 0.5.1 2.768.0 1.0.0 openrouter"
|
__user_agent__: str = "speakeasy-sdk/python 0.5.0 2.768.0 1.0.0 openrouter"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if __package__ is not None:
|
if __package__ is not None:
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ class Analytics(BaseSDK):
|
|||||||
def get_user_activity(
|
def get_user_activity(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
date_: Optional[str] = None,
|
date_: Optional[str] = None,
|
||||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||||
server_url: Optional[str] = None,
|
server_url: Optional[str] = None,
|
||||||
@@ -27,11 +25,6 @@ class Analytics(BaseSDK):
|
|||||||
|
|
||||||
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. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param date_: Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).
|
:param date_: Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).
|
||||||
:param retries: Override the default retry configuration for this method
|
:param retries: Override the default retry configuration for this method
|
||||||
:param server_url: Override the default server URL for this method
|
:param server_url: Override the default server URL for this method
|
||||||
@@ -49,8 +42,6 @@ class Analytics(BaseSDK):
|
|||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = operations.GetUserActivityRequest(
|
request = operations.GetUserActivityRequest(
|
||||||
http_referer=http_referer,
|
|
||||||
x_title=x_title,
|
|
||||||
date_=date_,
|
date_=date_,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -66,10 +57,6 @@ class Analytics(BaseSDK):
|
|||||||
user_agent_header="user-agent",
|
user_agent_header="user-agent",
|
||||||
accept_header_value="application/json",
|
accept_header_value="application/json",
|
||||||
http_headers=http_headers,
|
http_headers=http_headers,
|
||||||
_globals=operations.GetUserActivityGlobals(
|
|
||||||
http_referer=self.sdk_configuration.globals.http_referer,
|
|
||||||
x_title=self.sdk_configuration.globals.x_title,
|
|
||||||
),
|
|
||||||
security=self.sdk_configuration.security,
|
security=self.sdk_configuration.security,
|
||||||
allow_empty_value=None,
|
allow_empty_value=None,
|
||||||
timeout_ms=timeout_ms,
|
timeout_ms=timeout_ms,
|
||||||
@@ -137,8 +124,6 @@ class Analytics(BaseSDK):
|
|||||||
async def get_user_activity_async(
|
async def get_user_activity_async(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
date_: Optional[str] = None,
|
date_: Optional[str] = None,
|
||||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||||
server_url: Optional[str] = None,
|
server_url: Optional[str] = None,
|
||||||
@@ -149,11 +134,6 @@ class Analytics(BaseSDK):
|
|||||||
|
|
||||||
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. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param date_: Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).
|
:param date_: Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).
|
||||||
:param retries: Override the default retry configuration for this method
|
:param retries: Override the default retry configuration for this method
|
||||||
:param server_url: Override the default server URL for this method
|
:param server_url: Override the default server URL for this method
|
||||||
@@ -171,8 +151,6 @@ class Analytics(BaseSDK):
|
|||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = operations.GetUserActivityRequest(
|
request = operations.GetUserActivityRequest(
|
||||||
http_referer=http_referer,
|
|
||||||
x_title=x_title,
|
|
||||||
date_=date_,
|
date_=date_,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -188,10 +166,6 @@ class Analytics(BaseSDK):
|
|||||||
user_agent_header="user-agent",
|
user_agent_header="user-agent",
|
||||||
accept_header_value="application/json",
|
accept_header_value="application/json",
|
||||||
http_headers=http_headers,
|
http_headers=http_headers,
|
||||||
_globals=operations.GetUserActivityGlobals(
|
|
||||||
http_referer=self.sdk_configuration.globals.http_referer,
|
|
||||||
x_title=self.sdk_configuration.globals.x_title,
|
|
||||||
),
|
|
||||||
security=self.sdk_configuration.security,
|
security=self.sdk_configuration.security,
|
||||||
allow_empty_value=None,
|
allow_empty_value=None,
|
||||||
timeout_ms=timeout_ms,
|
timeout_ms=timeout_ms,
|
||||||
|
|||||||
+14
-190
@@ -16,8 +16,6 @@ class APIKeys(BaseSDK):
|
|||||||
def list(
|
def list(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
include_disabled: Optional[str] = None,
|
include_disabled: Optional[str] = None,
|
||||||
offset: Optional[str] = None,
|
offset: Optional[str] = None,
|
||||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||||
@@ -29,11 +27,6 @@ class APIKeys(BaseSDK):
|
|||||||
|
|
||||||
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. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param include_disabled: Whether to include disabled API keys in the response
|
:param include_disabled: Whether to include disabled API keys in the response
|
||||||
:param offset: Number of API keys to skip for pagination
|
:param offset: Number of API keys to skip for pagination
|
||||||
:param retries: Override the default retry configuration for this method
|
:param retries: Override the default retry configuration for this method
|
||||||
@@ -52,8 +45,6 @@ class APIKeys(BaseSDK):
|
|||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = operations.ListRequest(
|
request = operations.ListRequest(
|
||||||
http_referer=http_referer,
|
|
||||||
x_title=x_title,
|
|
||||||
include_disabled=include_disabled,
|
include_disabled=include_disabled,
|
||||||
offset=offset,
|
offset=offset,
|
||||||
)
|
)
|
||||||
@@ -70,10 +61,6 @@ class APIKeys(BaseSDK):
|
|||||||
user_agent_header="user-agent",
|
user_agent_header="user-agent",
|
||||||
accept_header_value="application/json",
|
accept_header_value="application/json",
|
||||||
http_headers=http_headers,
|
http_headers=http_headers,
|
||||||
_globals=operations.ListGlobals(
|
|
||||||
http_referer=self.sdk_configuration.globals.http_referer,
|
|
||||||
x_title=self.sdk_configuration.globals.x_title,
|
|
||||||
),
|
|
||||||
security=self.sdk_configuration.security,
|
security=self.sdk_configuration.security,
|
||||||
allow_empty_value=None,
|
allow_empty_value=None,
|
||||||
timeout_ms=timeout_ms,
|
timeout_ms=timeout_ms,
|
||||||
@@ -136,8 +123,6 @@ class APIKeys(BaseSDK):
|
|||||||
async def list_async(
|
async def list_async(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
include_disabled: Optional[str] = None,
|
include_disabled: Optional[str] = None,
|
||||||
offset: Optional[str] = None,
|
offset: Optional[str] = None,
|
||||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||||
@@ -149,11 +134,6 @@ class APIKeys(BaseSDK):
|
|||||||
|
|
||||||
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. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param include_disabled: Whether to include disabled API keys in the response
|
:param include_disabled: Whether to include disabled API keys in the response
|
||||||
:param offset: Number of API keys to skip for pagination
|
:param offset: Number of API keys to skip for pagination
|
||||||
:param retries: Override the default retry configuration for this method
|
:param retries: Override the default retry configuration for this method
|
||||||
@@ -172,8 +152,6 @@ class APIKeys(BaseSDK):
|
|||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = operations.ListRequest(
|
request = operations.ListRequest(
|
||||||
http_referer=http_referer,
|
|
||||||
x_title=x_title,
|
|
||||||
include_disabled=include_disabled,
|
include_disabled=include_disabled,
|
||||||
offset=offset,
|
offset=offset,
|
||||||
)
|
)
|
||||||
@@ -190,10 +168,6 @@ class APIKeys(BaseSDK):
|
|||||||
user_agent_header="user-agent",
|
user_agent_header="user-agent",
|
||||||
accept_header_value="application/json",
|
accept_header_value="application/json",
|
||||||
http_headers=http_headers,
|
http_headers=http_headers,
|
||||||
_globals=operations.ListGlobals(
|
|
||||||
http_referer=self.sdk_configuration.globals.http_referer,
|
|
||||||
x_title=self.sdk_configuration.globals.x_title,
|
|
||||||
),
|
|
||||||
security=self.sdk_configuration.security,
|
security=self.sdk_configuration.security,
|
||||||
allow_empty_value=None,
|
allow_empty_value=None,
|
||||||
timeout_ms=timeout_ms,
|
timeout_ms=timeout_ms,
|
||||||
@@ -257,8 +231,6 @@ class APIKeys(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
name: str,
|
name: str,
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
limit: OptionalNullable[float] = UNSET,
|
limit: OptionalNullable[float] = UNSET,
|
||||||
limit_reset: OptionalNullable[operations.CreateKeysLimitReset] = UNSET,
|
limit_reset: OptionalNullable[operations.CreateKeysLimitReset] = UNSET,
|
||||||
include_byok_in_limit: Optional[bool] = None,
|
include_byok_in_limit: Optional[bool] = None,
|
||||||
@@ -273,11 +245,6 @@ class APIKeys(BaseSDK):
|
|||||||
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. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||||
|
|
||||||
:param name: Name for the new API key
|
:param name: Name for the new API key
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param limit: Optional spending limit for the API key in USD
|
:param limit: Optional spending limit for the API key in USD
|
||||||
:param limit_reset: 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.
|
:param limit_reset: 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.
|
||||||
:param include_byok_in_limit: Whether to include BYOK usage in the limit
|
:param include_byok_in_limit: Whether to include BYOK usage in the limit
|
||||||
@@ -298,15 +265,11 @@ class APIKeys(BaseSDK):
|
|||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = operations.CreateKeysRequest(
|
request = operations.CreateKeysRequest(
|
||||||
http_referer=http_referer,
|
name=name,
|
||||||
x_title=x_title,
|
limit=limit,
|
||||||
request_body=operations.CreateKeysRequestBody(
|
limit_reset=limit_reset,
|
||||||
name=name,
|
include_byok_in_limit=include_byok_in_limit,
|
||||||
limit=limit,
|
expires_at=expires_at,
|
||||||
limit_reset=limit_reset,
|
|
||||||
include_byok_in_limit=include_byok_in_limit,
|
|
||||||
expires_at=expires_at,
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
req = self._build_request(
|
req = self._build_request(
|
||||||
@@ -321,17 +284,9 @@ class APIKeys(BaseSDK):
|
|||||||
user_agent_header="user-agent",
|
user_agent_header="user-agent",
|
||||||
accept_header_value="application/json",
|
accept_header_value="application/json",
|
||||||
http_headers=http_headers,
|
http_headers=http_headers,
|
||||||
_globals=operations.CreateKeysGlobals(
|
|
||||||
http_referer=self.sdk_configuration.globals.http_referer,
|
|
||||||
x_title=self.sdk_configuration.globals.x_title,
|
|
||||||
),
|
|
||||||
security=self.sdk_configuration.security,
|
security=self.sdk_configuration.security,
|
||||||
get_serialized_body=lambda: utils.serialize_request_body(
|
get_serialized_body=lambda: utils.serialize_request_body(
|
||||||
request.request_body,
|
request, False, False, "json", operations.CreateKeysRequest
|
||||||
False,
|
|
||||||
False,
|
|
||||||
"json",
|
|
||||||
operations.CreateKeysRequestBody,
|
|
||||||
),
|
),
|
||||||
allow_empty_value=None,
|
allow_empty_value=None,
|
||||||
timeout_ms=timeout_ms,
|
timeout_ms=timeout_ms,
|
||||||
@@ -400,8 +355,6 @@ class APIKeys(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
name: str,
|
name: str,
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
limit: OptionalNullable[float] = UNSET,
|
limit: OptionalNullable[float] = UNSET,
|
||||||
limit_reset: OptionalNullable[operations.CreateKeysLimitReset] = UNSET,
|
limit_reset: OptionalNullable[operations.CreateKeysLimitReset] = UNSET,
|
||||||
include_byok_in_limit: Optional[bool] = None,
|
include_byok_in_limit: Optional[bool] = None,
|
||||||
@@ -416,11 +369,6 @@ class APIKeys(BaseSDK):
|
|||||||
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. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||||
|
|
||||||
:param name: Name for the new API key
|
:param name: Name for the new API key
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param limit: Optional spending limit for the API key in USD
|
:param limit: Optional spending limit for the API key in USD
|
||||||
:param limit_reset: 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.
|
:param limit_reset: 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.
|
||||||
:param include_byok_in_limit: Whether to include BYOK usage in the limit
|
:param include_byok_in_limit: Whether to include BYOK usage in the limit
|
||||||
@@ -441,15 +389,11 @@ class APIKeys(BaseSDK):
|
|||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = operations.CreateKeysRequest(
|
request = operations.CreateKeysRequest(
|
||||||
http_referer=http_referer,
|
name=name,
|
||||||
x_title=x_title,
|
limit=limit,
|
||||||
request_body=operations.CreateKeysRequestBody(
|
limit_reset=limit_reset,
|
||||||
name=name,
|
include_byok_in_limit=include_byok_in_limit,
|
||||||
limit=limit,
|
expires_at=expires_at,
|
||||||
limit_reset=limit_reset,
|
|
||||||
include_byok_in_limit=include_byok_in_limit,
|
|
||||||
expires_at=expires_at,
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
req = self._build_request_async(
|
req = self._build_request_async(
|
||||||
@@ -464,17 +408,9 @@ class APIKeys(BaseSDK):
|
|||||||
user_agent_header="user-agent",
|
user_agent_header="user-agent",
|
||||||
accept_header_value="application/json",
|
accept_header_value="application/json",
|
||||||
http_headers=http_headers,
|
http_headers=http_headers,
|
||||||
_globals=operations.CreateKeysGlobals(
|
|
||||||
http_referer=self.sdk_configuration.globals.http_referer,
|
|
||||||
x_title=self.sdk_configuration.globals.x_title,
|
|
||||||
),
|
|
||||||
security=self.sdk_configuration.security,
|
security=self.sdk_configuration.security,
|
||||||
get_serialized_body=lambda: utils.serialize_request_body(
|
get_serialized_body=lambda: utils.serialize_request_body(
|
||||||
request.request_body,
|
request, False, False, "json", operations.CreateKeysRequest
|
||||||
False,
|
|
||||||
False,
|
|
||||||
"json",
|
|
||||||
operations.CreateKeysRequestBody,
|
|
||||||
),
|
),
|
||||||
allow_empty_value=None,
|
allow_empty_value=None,
|
||||||
timeout_ms=timeout_ms,
|
timeout_ms=timeout_ms,
|
||||||
@@ -543,8 +479,6 @@ class APIKeys(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
hash: str,
|
hash: str,
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
name: Optional[str] = None,
|
name: Optional[str] = None,
|
||||||
disabled: Optional[bool] = None,
|
disabled: Optional[bool] = None,
|
||||||
limit: OptionalNullable[float] = UNSET,
|
limit: OptionalNullable[float] = UNSET,
|
||||||
@@ -560,11 +494,6 @@ class APIKeys(BaseSDK):
|
|||||||
Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||||
|
|
||||||
:param hash: The hash identifier of the API key to update
|
:param hash: The hash identifier of the API key to update
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param name: New name for the API key
|
:param name: New name for the API key
|
||||||
:param disabled: Whether to disable the API key
|
:param disabled: Whether to disable the API key
|
||||||
:param limit: New spending limit for the API key in USD
|
:param limit: New spending limit for the API key in USD
|
||||||
@@ -586,8 +515,6 @@ class APIKeys(BaseSDK):
|
|||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = operations.UpdateKeysRequest(
|
request = operations.UpdateKeysRequest(
|
||||||
http_referer=http_referer,
|
|
||||||
x_title=x_title,
|
|
||||||
hash=hash,
|
hash=hash,
|
||||||
request_body=operations.UpdateKeysRequestBody(
|
request_body=operations.UpdateKeysRequestBody(
|
||||||
name=name,
|
name=name,
|
||||||
@@ -610,10 +537,6 @@ class APIKeys(BaseSDK):
|
|||||||
user_agent_header="user-agent",
|
user_agent_header="user-agent",
|
||||||
accept_header_value="application/json",
|
accept_header_value="application/json",
|
||||||
http_headers=http_headers,
|
http_headers=http_headers,
|
||||||
_globals=operations.UpdateKeysGlobals(
|
|
||||||
http_referer=self.sdk_configuration.globals.http_referer,
|
|
||||||
x_title=self.sdk_configuration.globals.x_title,
|
|
||||||
),
|
|
||||||
security=self.sdk_configuration.security,
|
security=self.sdk_configuration.security,
|
||||||
get_serialized_body=lambda: utils.serialize_request_body(
|
get_serialized_body=lambda: utils.serialize_request_body(
|
||||||
request.request_body,
|
request.request_body,
|
||||||
@@ -694,8 +617,6 @@ class APIKeys(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
hash: str,
|
hash: str,
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
name: Optional[str] = None,
|
name: Optional[str] = None,
|
||||||
disabled: Optional[bool] = None,
|
disabled: Optional[bool] = None,
|
||||||
limit: OptionalNullable[float] = UNSET,
|
limit: OptionalNullable[float] = UNSET,
|
||||||
@@ -711,11 +632,6 @@ class APIKeys(BaseSDK):
|
|||||||
Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||||
|
|
||||||
:param hash: The hash identifier of the API key to update
|
:param hash: The hash identifier of the API key to update
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param name: New name for the API key
|
:param name: New name for the API key
|
||||||
:param disabled: Whether to disable the API key
|
:param disabled: Whether to disable the API key
|
||||||
:param limit: New spending limit for the API key in USD
|
:param limit: New spending limit for the API key in USD
|
||||||
@@ -737,8 +653,6 @@ class APIKeys(BaseSDK):
|
|||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = operations.UpdateKeysRequest(
|
request = operations.UpdateKeysRequest(
|
||||||
http_referer=http_referer,
|
|
||||||
x_title=x_title,
|
|
||||||
hash=hash,
|
hash=hash,
|
||||||
request_body=operations.UpdateKeysRequestBody(
|
request_body=operations.UpdateKeysRequestBody(
|
||||||
name=name,
|
name=name,
|
||||||
@@ -761,10 +675,6 @@ class APIKeys(BaseSDK):
|
|||||||
user_agent_header="user-agent",
|
user_agent_header="user-agent",
|
||||||
accept_header_value="application/json",
|
accept_header_value="application/json",
|
||||||
http_headers=http_headers,
|
http_headers=http_headers,
|
||||||
_globals=operations.UpdateKeysGlobals(
|
|
||||||
http_referer=self.sdk_configuration.globals.http_referer,
|
|
||||||
x_title=self.sdk_configuration.globals.x_title,
|
|
||||||
),
|
|
||||||
security=self.sdk_configuration.security,
|
security=self.sdk_configuration.security,
|
||||||
get_serialized_body=lambda: utils.serialize_request_body(
|
get_serialized_body=lambda: utils.serialize_request_body(
|
||||||
request.request_body,
|
request.request_body,
|
||||||
@@ -845,8 +755,6 @@ class APIKeys(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
hash: str,
|
hash: str,
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||||
server_url: Optional[str] = None,
|
server_url: Optional[str] = None,
|
||||||
timeout_ms: Optional[int] = None,
|
timeout_ms: Optional[int] = None,
|
||||||
@@ -857,11 +765,6 @@ class APIKeys(BaseSDK):
|
|||||||
Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||||
|
|
||||||
:param hash: The hash identifier of the API key to delete
|
:param hash: The hash identifier of the API key to delete
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param retries: Override the default retry configuration for this method
|
:param retries: Override the default retry configuration for this method
|
||||||
:param server_url: Override the default server URL for this method
|
:param server_url: Override the default server URL for this method
|
||||||
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
||||||
@@ -878,8 +781,6 @@ class APIKeys(BaseSDK):
|
|||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = operations.DeleteKeysRequest(
|
request = operations.DeleteKeysRequest(
|
||||||
http_referer=http_referer,
|
|
||||||
x_title=x_title,
|
|
||||||
hash=hash,
|
hash=hash,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -895,10 +796,6 @@ class APIKeys(BaseSDK):
|
|||||||
user_agent_header="user-agent",
|
user_agent_header="user-agent",
|
||||||
accept_header_value="application/json",
|
accept_header_value="application/json",
|
||||||
http_headers=http_headers,
|
http_headers=http_headers,
|
||||||
_globals=operations.DeleteKeysGlobals(
|
|
||||||
http_referer=self.sdk_configuration.globals.http_referer,
|
|
||||||
x_title=self.sdk_configuration.globals.x_title,
|
|
||||||
),
|
|
||||||
security=self.sdk_configuration.security,
|
security=self.sdk_configuration.security,
|
||||||
allow_empty_value=None,
|
allow_empty_value=None,
|
||||||
timeout_ms=timeout_ms,
|
timeout_ms=timeout_ms,
|
||||||
@@ -967,8 +864,6 @@ class APIKeys(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
hash: str,
|
hash: str,
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||||
server_url: Optional[str] = None,
|
server_url: Optional[str] = None,
|
||||||
timeout_ms: Optional[int] = None,
|
timeout_ms: Optional[int] = None,
|
||||||
@@ -979,11 +874,6 @@ class APIKeys(BaseSDK):
|
|||||||
Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||||
|
|
||||||
:param hash: The hash identifier of the API key to delete
|
:param hash: The hash identifier of the API key to delete
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param retries: Override the default retry configuration for this method
|
:param retries: Override the default retry configuration for this method
|
||||||
:param server_url: Override the default server URL for this method
|
:param server_url: Override the default server URL for this method
|
||||||
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
||||||
@@ -1000,8 +890,6 @@ class APIKeys(BaseSDK):
|
|||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = operations.DeleteKeysRequest(
|
request = operations.DeleteKeysRequest(
|
||||||
http_referer=http_referer,
|
|
||||||
x_title=x_title,
|
|
||||||
hash=hash,
|
hash=hash,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1017,10 +905,6 @@ class APIKeys(BaseSDK):
|
|||||||
user_agent_header="user-agent",
|
user_agent_header="user-agent",
|
||||||
accept_header_value="application/json",
|
accept_header_value="application/json",
|
||||||
http_headers=http_headers,
|
http_headers=http_headers,
|
||||||
_globals=operations.DeleteKeysGlobals(
|
|
||||||
http_referer=self.sdk_configuration.globals.http_referer,
|
|
||||||
x_title=self.sdk_configuration.globals.x_title,
|
|
||||||
),
|
|
||||||
security=self.sdk_configuration.security,
|
security=self.sdk_configuration.security,
|
||||||
allow_empty_value=None,
|
allow_empty_value=None,
|
||||||
timeout_ms=timeout_ms,
|
timeout_ms=timeout_ms,
|
||||||
@@ -1089,8 +973,6 @@ class APIKeys(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
hash: str,
|
hash: str,
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||||
server_url: Optional[str] = None,
|
server_url: Optional[str] = None,
|
||||||
timeout_ms: Optional[int] = None,
|
timeout_ms: Optional[int] = None,
|
||||||
@@ -1101,11 +983,6 @@ class APIKeys(BaseSDK):
|
|||||||
Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||||
|
|
||||||
:param hash: The hash identifier of the API key to retrieve
|
:param hash: The hash identifier of the API key to retrieve
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param retries: Override the default retry configuration for this method
|
:param retries: Override the default retry configuration for this method
|
||||||
:param server_url: Override the default server URL for this method
|
:param server_url: Override the default server URL for this method
|
||||||
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
||||||
@@ -1122,8 +999,6 @@ class APIKeys(BaseSDK):
|
|||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = operations.GetKeyRequest(
|
request = operations.GetKeyRequest(
|
||||||
http_referer=http_referer,
|
|
||||||
x_title=x_title,
|
|
||||||
hash=hash,
|
hash=hash,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1139,10 +1014,6 @@ class APIKeys(BaseSDK):
|
|||||||
user_agent_header="user-agent",
|
user_agent_header="user-agent",
|
||||||
accept_header_value="application/json",
|
accept_header_value="application/json",
|
||||||
http_headers=http_headers,
|
http_headers=http_headers,
|
||||||
_globals=operations.GetKeyGlobals(
|
|
||||||
http_referer=self.sdk_configuration.globals.http_referer,
|
|
||||||
x_title=self.sdk_configuration.globals.x_title,
|
|
||||||
),
|
|
||||||
security=self.sdk_configuration.security,
|
security=self.sdk_configuration.security,
|
||||||
allow_empty_value=None,
|
allow_empty_value=None,
|
||||||
timeout_ms=timeout_ms,
|
timeout_ms=timeout_ms,
|
||||||
@@ -1211,8 +1082,6 @@ class APIKeys(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
hash: str,
|
hash: str,
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||||
server_url: Optional[str] = None,
|
server_url: Optional[str] = None,
|
||||||
timeout_ms: Optional[int] = None,
|
timeout_ms: Optional[int] = None,
|
||||||
@@ -1223,11 +1092,6 @@ class APIKeys(BaseSDK):
|
|||||||
Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
||||||
|
|
||||||
:param hash: The hash identifier of the API key to retrieve
|
:param hash: The hash identifier of the API key to retrieve
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param retries: Override the default retry configuration for this method
|
:param retries: Override the default retry configuration for this method
|
||||||
:param server_url: Override the default server URL for this method
|
:param server_url: Override the default server URL for this method
|
||||||
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
||||||
@@ -1244,8 +1108,6 @@ class APIKeys(BaseSDK):
|
|||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = operations.GetKeyRequest(
|
request = operations.GetKeyRequest(
|
||||||
http_referer=http_referer,
|
|
||||||
x_title=x_title,
|
|
||||||
hash=hash,
|
hash=hash,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1261,10 +1123,6 @@ class APIKeys(BaseSDK):
|
|||||||
user_agent_header="user-agent",
|
user_agent_header="user-agent",
|
||||||
accept_header_value="application/json",
|
accept_header_value="application/json",
|
||||||
http_headers=http_headers,
|
http_headers=http_headers,
|
||||||
_globals=operations.GetKeyGlobals(
|
|
||||||
http_referer=self.sdk_configuration.globals.http_referer,
|
|
||||||
x_title=self.sdk_configuration.globals.x_title,
|
|
||||||
),
|
|
||||||
security=self.sdk_configuration.security,
|
security=self.sdk_configuration.security,
|
||||||
allow_empty_value=None,
|
allow_empty_value=None,
|
||||||
timeout_ms=timeout_ms,
|
timeout_ms=timeout_ms,
|
||||||
@@ -1332,8 +1190,6 @@ class APIKeys(BaseSDK):
|
|||||||
def get_current_key_metadata(
|
def get_current_key_metadata(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||||
server_url: Optional[str] = None,
|
server_url: Optional[str] = None,
|
||||||
timeout_ms: Optional[int] = None,
|
timeout_ms: Optional[int] = None,
|
||||||
@@ -1343,11 +1199,6 @@ class APIKeys(BaseSDK):
|
|||||||
|
|
||||||
Get information on the API key associated with the current authentication session
|
Get information on the API key associated with the current authentication session
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param retries: Override the default retry configuration for this method
|
:param retries: Override the default retry configuration for this method
|
||||||
:param server_url: Override the default server URL for this method
|
:param server_url: Override the default server URL for this method
|
||||||
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
||||||
@@ -1362,28 +1213,18 @@ class APIKeys(BaseSDK):
|
|||||||
base_url = server_url
|
base_url = server_url
|
||||||
else:
|
else:
|
||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = operations.GetCurrentKeyRequest(
|
|
||||||
http_referer=http_referer,
|
|
||||||
x_title=x_title,
|
|
||||||
)
|
|
||||||
|
|
||||||
req = self._build_request(
|
req = self._build_request(
|
||||||
method="GET",
|
method="GET",
|
||||||
path="/key",
|
path="/key",
|
||||||
base_url=base_url,
|
base_url=base_url,
|
||||||
url_variables=url_variables,
|
url_variables=url_variables,
|
||||||
request=request,
|
request=None,
|
||||||
request_body_required=False,
|
request_body_required=False,
|
||||||
request_has_path_params=False,
|
request_has_path_params=False,
|
||||||
request_has_query_params=True,
|
request_has_query_params=True,
|
||||||
user_agent_header="user-agent",
|
user_agent_header="user-agent",
|
||||||
accept_header_value="application/json",
|
accept_header_value="application/json",
|
||||||
http_headers=http_headers,
|
http_headers=http_headers,
|
||||||
_globals=operations.GetCurrentKeyGlobals(
|
|
||||||
http_referer=self.sdk_configuration.globals.http_referer,
|
|
||||||
x_title=self.sdk_configuration.globals.x_title,
|
|
||||||
),
|
|
||||||
security=self.sdk_configuration.security,
|
security=self.sdk_configuration.security,
|
||||||
allow_empty_value=None,
|
allow_empty_value=None,
|
||||||
timeout_ms=timeout_ms,
|
timeout_ms=timeout_ms,
|
||||||
@@ -1441,8 +1282,6 @@ class APIKeys(BaseSDK):
|
|||||||
async def get_current_key_metadata_async(
|
async def get_current_key_metadata_async(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
||||||
server_url: Optional[str] = None,
|
server_url: Optional[str] = None,
|
||||||
timeout_ms: Optional[int] = None,
|
timeout_ms: Optional[int] = None,
|
||||||
@@ -1452,11 +1291,6 @@ class APIKeys(BaseSDK):
|
|||||||
|
|
||||||
Get information on the API key associated with the current authentication session
|
Get information on the API key associated with the current authentication session
|
||||||
|
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param retries: Override the default retry configuration for this method
|
:param retries: Override the default retry configuration for this method
|
||||||
:param server_url: Override the default server URL for this method
|
:param server_url: Override the default server URL for this method
|
||||||
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
||||||
@@ -1471,28 +1305,18 @@ class APIKeys(BaseSDK):
|
|||||||
base_url = server_url
|
base_url = server_url
|
||||||
else:
|
else:
|
||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = operations.GetCurrentKeyRequest(
|
|
||||||
http_referer=http_referer,
|
|
||||||
x_title=x_title,
|
|
||||||
)
|
|
||||||
|
|
||||||
req = self._build_request_async(
|
req = self._build_request_async(
|
||||||
method="GET",
|
method="GET",
|
||||||
path="/key",
|
path="/key",
|
||||||
base_url=base_url,
|
base_url=base_url,
|
||||||
url_variables=url_variables,
|
url_variables=url_variables,
|
||||||
request=request,
|
request=None,
|
||||||
request_body_required=False,
|
request_body_required=False,
|
||||||
request_has_path_params=False,
|
request_has_path_params=False,
|
||||||
request_has_query_params=True,
|
request_has_query_params=True,
|
||||||
user_agent_header="user-agent",
|
user_agent_header="user-agent",
|
||||||
accept_header_value="application/json",
|
accept_header_value="application/json",
|
||||||
http_headers=http_headers,
|
http_headers=http_headers,
|
||||||
_globals=operations.GetCurrentKeyGlobals(
|
|
||||||
http_referer=self.sdk_configuration.globals.http_referer,
|
|
||||||
x_title=self.sdk_configuration.globals.x_title,
|
|
||||||
),
|
|
||||||
security=self.sdk_configuration.security,
|
security=self.sdk_configuration.security,
|
||||||
allow_empty_value=None,
|
allow_empty_value=None,
|
||||||
timeout_ms=timeout_ms,
|
timeout_ms=timeout_ms,
|
||||||
|
|||||||
+84
-150
@@ -21,8 +21,6 @@ class Chat(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
provider: OptionalNullable[
|
provider: OptionalNullable[
|
||||||
Union[components.Schema0, components.Schema0TypedDict]
|
Union[components.Schema0, components.Schema0TypedDict]
|
||||||
] = UNSET,
|
] = UNSET,
|
||||||
@@ -83,11 +81,6 @@ class Chat(BaseSDK):
|
|||||||
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||||
|
|
||||||
:param messages:
|
:param messages:
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param provider:
|
:param provider:
|
||||||
:param plugins:
|
:param plugins:
|
||||||
:param route:
|
:param route:
|
||||||
@@ -128,8 +121,6 @@ class Chat(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
provider: OptionalNullable[
|
provider: OptionalNullable[
|
||||||
Union[components.Schema0, components.Schema0TypedDict]
|
Union[components.Schema0, components.Schema0TypedDict]
|
||||||
] = UNSET,
|
] = UNSET,
|
||||||
@@ -190,11 +181,6 @@ class Chat(BaseSDK):
|
|||||||
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||||
|
|
||||||
:param messages:
|
:param messages:
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param provider:
|
:param provider:
|
||||||
:param plugins:
|
:param plugins:
|
||||||
:param route:
|
:param route:
|
||||||
@@ -234,8 +220,6 @@ class Chat(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
provider: OptionalNullable[
|
provider: OptionalNullable[
|
||||||
Union[components.Schema0, components.Schema0TypedDict]
|
Union[components.Schema0, components.Schema0TypedDict]
|
||||||
] = UNSET,
|
] = UNSET,
|
||||||
@@ -296,11 +280,6 @@ class Chat(BaseSDK):
|
|||||||
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||||
|
|
||||||
:param messages:
|
:param messages:
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param provider:
|
:param provider:
|
||||||
:param plugins:
|
:param plugins:
|
||||||
:param route:
|
:param route:
|
||||||
@@ -345,52 +324,48 @@ class Chat(BaseSDK):
|
|||||||
else:
|
else:
|
||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = operations.SendChatCompletionRequestRequest(
|
request = components.ChatGenerationParams(
|
||||||
http_referer=http_referer,
|
provider=utils.get_pydantic_model(
|
||||||
x_title=x_title,
|
provider, OptionalNullable[components.Schema0]
|
||||||
chat_generation_params=components.ChatGenerationParams(
|
|
||||||
provider=utils.get_pydantic_model(
|
|
||||||
provider, OptionalNullable[components.Schema0]
|
|
||||||
),
|
|
||||||
plugins=utils.get_pydantic_model(
|
|
||||||
plugins, Optional[List[components.Schema17]]
|
|
||||||
),
|
|
||||||
route=route,
|
|
||||||
user=user,
|
|
||||||
session_id=session_id,
|
|
||||||
messages=utils.get_pydantic_model(messages, List[components.Message]),
|
|
||||||
model=model,
|
|
||||||
models=models,
|
|
||||||
frequency_penalty=frequency_penalty,
|
|
||||||
logit_bias=logit_bias,
|
|
||||||
logprobs=logprobs,
|
|
||||||
top_logprobs=top_logprobs,
|
|
||||||
max_completion_tokens=max_completion_tokens,
|
|
||||||
max_tokens=max_tokens,
|
|
||||||
metadata=metadata,
|
|
||||||
presence_penalty=presence_penalty,
|
|
||||||
reasoning=utils.get_pydantic_model(
|
|
||||||
reasoning, Optional[components.Reasoning]
|
|
||||||
),
|
|
||||||
response_format=utils.get_pydantic_model(
|
|
||||||
response_format, Optional[components.ResponseFormat]
|
|
||||||
),
|
|
||||||
seed=seed,
|
|
||||||
stop=stop,
|
|
||||||
stream=stream,
|
|
||||||
stream_options=utils.get_pydantic_model(
|
|
||||||
stream_options, OptionalNullable[components.ChatStreamOptions]
|
|
||||||
),
|
|
||||||
temperature=temperature,
|
|
||||||
tool_choice=tool_choice,
|
|
||||||
tools=utils.get_pydantic_model(
|
|
||||||
tools, Optional[List[components.ToolDefinitionJSON]]
|
|
||||||
),
|
|
||||||
top_p=top_p,
|
|
||||||
debug=utils.get_pydantic_model(debug, Optional[components.Debug]),
|
|
||||||
image_config=image_config,
|
|
||||||
modalities=modalities,
|
|
||||||
),
|
),
|
||||||
|
plugins=utils.get_pydantic_model(
|
||||||
|
plugins, Optional[List[components.Schema17]]
|
||||||
|
),
|
||||||
|
route=route,
|
||||||
|
user=user,
|
||||||
|
session_id=session_id,
|
||||||
|
messages=utils.get_pydantic_model(messages, List[components.Message]),
|
||||||
|
model=model,
|
||||||
|
models=models,
|
||||||
|
frequency_penalty=frequency_penalty,
|
||||||
|
logit_bias=logit_bias,
|
||||||
|
logprobs=logprobs,
|
||||||
|
top_logprobs=top_logprobs,
|
||||||
|
max_completion_tokens=max_completion_tokens,
|
||||||
|
max_tokens=max_tokens,
|
||||||
|
metadata=metadata,
|
||||||
|
presence_penalty=presence_penalty,
|
||||||
|
reasoning=utils.get_pydantic_model(
|
||||||
|
reasoning, Optional[components.Reasoning]
|
||||||
|
),
|
||||||
|
response_format=utils.get_pydantic_model(
|
||||||
|
response_format, Optional[components.ResponseFormat]
|
||||||
|
),
|
||||||
|
seed=seed,
|
||||||
|
stop=stop,
|
||||||
|
stream=stream,
|
||||||
|
stream_options=utils.get_pydantic_model(
|
||||||
|
stream_options, OptionalNullable[components.ChatStreamOptions]
|
||||||
|
),
|
||||||
|
temperature=temperature,
|
||||||
|
tool_choice=tool_choice,
|
||||||
|
tools=utils.get_pydantic_model(
|
||||||
|
tools, Optional[List[components.ToolDefinitionJSON]]
|
||||||
|
),
|
||||||
|
top_p=top_p,
|
||||||
|
debug=utils.get_pydantic_model(debug, Optional[components.Debug]),
|
||||||
|
image_config=image_config,
|
||||||
|
modalities=modalities,
|
||||||
)
|
)
|
||||||
|
|
||||||
req = self._build_request(
|
req = self._build_request(
|
||||||
@@ -405,17 +380,9 @@ class Chat(BaseSDK):
|
|||||||
user_agent_header="user-agent",
|
user_agent_header="user-agent",
|
||||||
accept_header_value="text/event-stream" if stream else "application/json",
|
accept_header_value="text/event-stream" if stream else "application/json",
|
||||||
http_headers=http_headers,
|
http_headers=http_headers,
|
||||||
_globals=operations.SendChatCompletionRequestGlobals(
|
|
||||||
http_referer=self.sdk_configuration.globals.http_referer,
|
|
||||||
x_title=self.sdk_configuration.globals.x_title,
|
|
||||||
),
|
|
||||||
security=self.sdk_configuration.security,
|
security=self.sdk_configuration.security,
|
||||||
get_serialized_body=lambda: utils.serialize_request_body(
|
get_serialized_body=lambda: utils.serialize_request_body(
|
||||||
request.chat_generation_params,
|
request, False, False, "json", components.ChatGenerationParams
|
||||||
False,
|
|
||||||
False,
|
|
||||||
"json",
|
|
||||||
components.ChatGenerationParams,
|
|
||||||
),
|
),
|
||||||
allow_empty_value=None,
|
allow_empty_value=None,
|
||||||
timeout_ms=timeout_ms,
|
timeout_ms=timeout_ms,
|
||||||
@@ -493,8 +460,6 @@ class Chat(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
provider: OptionalNullable[
|
provider: OptionalNullable[
|
||||||
Union[components.Schema0, components.Schema0TypedDict]
|
Union[components.Schema0, components.Schema0TypedDict]
|
||||||
] = UNSET,
|
] = UNSET,
|
||||||
@@ -555,11 +520,6 @@ class Chat(BaseSDK):
|
|||||||
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||||
|
|
||||||
:param messages:
|
:param messages:
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param provider:
|
:param provider:
|
||||||
:param plugins:
|
:param plugins:
|
||||||
:param route:
|
:param route:
|
||||||
@@ -600,8 +560,6 @@ class Chat(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
provider: OptionalNullable[
|
provider: OptionalNullable[
|
||||||
Union[components.Schema0, components.Schema0TypedDict]
|
Union[components.Schema0, components.Schema0TypedDict]
|
||||||
] = UNSET,
|
] = UNSET,
|
||||||
@@ -662,11 +620,6 @@ class Chat(BaseSDK):
|
|||||||
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||||
|
|
||||||
:param messages:
|
:param messages:
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param provider:
|
:param provider:
|
||||||
:param plugins:
|
:param plugins:
|
||||||
:param route:
|
:param route:
|
||||||
@@ -706,8 +659,6 @@ class Chat(BaseSDK):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
messages: Union[List[components.Message], List[components.MessageTypedDict]],
|
||||||
http_referer: Optional[str] = None,
|
|
||||||
x_title: Optional[str] = None,
|
|
||||||
provider: OptionalNullable[
|
provider: OptionalNullable[
|
||||||
Union[components.Schema0, components.Schema0TypedDict]
|
Union[components.Schema0, components.Schema0TypedDict]
|
||||||
] = UNSET,
|
] = UNSET,
|
||||||
@@ -768,11 +719,6 @@ class Chat(BaseSDK):
|
|||||||
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
||||||
|
|
||||||
:param messages:
|
:param messages:
|
||||||
:param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
||||||
This is used to track API usage per application.
|
|
||||||
|
|
||||||
:param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
||||||
|
|
||||||
:param provider:
|
:param provider:
|
||||||
:param plugins:
|
:param plugins:
|
||||||
:param route:
|
:param route:
|
||||||
@@ -817,52 +763,48 @@ class Chat(BaseSDK):
|
|||||||
else:
|
else:
|
||||||
base_url = self._get_url(base_url, url_variables)
|
base_url = self._get_url(base_url, url_variables)
|
||||||
|
|
||||||
request = operations.SendChatCompletionRequestRequest(
|
request = components.ChatGenerationParams(
|
||||||
http_referer=http_referer,
|
provider=utils.get_pydantic_model(
|
||||||
x_title=x_title,
|
provider, OptionalNullable[components.Schema0]
|
||||||
chat_generation_params=components.ChatGenerationParams(
|
|
||||||
provider=utils.get_pydantic_model(
|
|
||||||
provider, OptionalNullable[components.Schema0]
|
|
||||||
),
|
|
||||||
plugins=utils.get_pydantic_model(
|
|
||||||
plugins, Optional[List[components.Schema17]]
|
|
||||||
),
|
|
||||||
route=route,
|
|
||||||
user=user,
|
|
||||||
session_id=session_id,
|
|
||||||
messages=utils.get_pydantic_model(messages, List[components.Message]),
|
|
||||||
model=model,
|
|
||||||
models=models,
|
|
||||||
frequency_penalty=frequency_penalty,
|
|
||||||
logit_bias=logit_bias,
|
|
||||||
logprobs=logprobs,
|
|
||||||
top_logprobs=top_logprobs,
|
|
||||||
max_completion_tokens=max_completion_tokens,
|
|
||||||
max_tokens=max_tokens,
|
|
||||||
metadata=metadata,
|
|
||||||
presence_penalty=presence_penalty,
|
|
||||||
reasoning=utils.get_pydantic_model(
|
|
||||||
reasoning, Optional[components.Reasoning]
|
|
||||||
),
|
|
||||||
response_format=utils.get_pydantic_model(
|
|
||||||
response_format, Optional[components.ResponseFormat]
|
|
||||||
),
|
|
||||||
seed=seed,
|
|
||||||
stop=stop,
|
|
||||||
stream=stream,
|
|
||||||
stream_options=utils.get_pydantic_model(
|
|
||||||
stream_options, OptionalNullable[components.ChatStreamOptions]
|
|
||||||
),
|
|
||||||
temperature=temperature,
|
|
||||||
tool_choice=tool_choice,
|
|
||||||
tools=utils.get_pydantic_model(
|
|
||||||
tools, Optional[List[components.ToolDefinitionJSON]]
|
|
||||||
),
|
|
||||||
top_p=top_p,
|
|
||||||
debug=utils.get_pydantic_model(debug, Optional[components.Debug]),
|
|
||||||
image_config=image_config,
|
|
||||||
modalities=modalities,
|
|
||||||
),
|
),
|
||||||
|
plugins=utils.get_pydantic_model(
|
||||||
|
plugins, Optional[List[components.Schema17]]
|
||||||
|
),
|
||||||
|
route=route,
|
||||||
|
user=user,
|
||||||
|
session_id=session_id,
|
||||||
|
messages=utils.get_pydantic_model(messages, List[components.Message]),
|
||||||
|
model=model,
|
||||||
|
models=models,
|
||||||
|
frequency_penalty=frequency_penalty,
|
||||||
|
logit_bias=logit_bias,
|
||||||
|
logprobs=logprobs,
|
||||||
|
top_logprobs=top_logprobs,
|
||||||
|
max_completion_tokens=max_completion_tokens,
|
||||||
|
max_tokens=max_tokens,
|
||||||
|
metadata=metadata,
|
||||||
|
presence_penalty=presence_penalty,
|
||||||
|
reasoning=utils.get_pydantic_model(
|
||||||
|
reasoning, Optional[components.Reasoning]
|
||||||
|
),
|
||||||
|
response_format=utils.get_pydantic_model(
|
||||||
|
response_format, Optional[components.ResponseFormat]
|
||||||
|
),
|
||||||
|
seed=seed,
|
||||||
|
stop=stop,
|
||||||
|
stream=stream,
|
||||||
|
stream_options=utils.get_pydantic_model(
|
||||||
|
stream_options, OptionalNullable[components.ChatStreamOptions]
|
||||||
|
),
|
||||||
|
temperature=temperature,
|
||||||
|
tool_choice=tool_choice,
|
||||||
|
tools=utils.get_pydantic_model(
|
||||||
|
tools, Optional[List[components.ToolDefinitionJSON]]
|
||||||
|
),
|
||||||
|
top_p=top_p,
|
||||||
|
debug=utils.get_pydantic_model(debug, Optional[components.Debug]),
|
||||||
|
image_config=image_config,
|
||||||
|
modalities=modalities,
|
||||||
)
|
)
|
||||||
|
|
||||||
req = self._build_request_async(
|
req = self._build_request_async(
|
||||||
@@ -877,17 +819,9 @@ class Chat(BaseSDK):
|
|||||||
user_agent_header="user-agent",
|
user_agent_header="user-agent",
|
||||||
accept_header_value="text/event-stream" if stream else "application/json",
|
accept_header_value="text/event-stream" if stream else "application/json",
|
||||||
http_headers=http_headers,
|
http_headers=http_headers,
|
||||||
_globals=operations.SendChatCompletionRequestGlobals(
|
|
||||||
http_referer=self.sdk_configuration.globals.http_referer,
|
|
||||||
x_title=self.sdk_configuration.globals.x_title,
|
|
||||||
),
|
|
||||||
security=self.sdk_configuration.security,
|
security=self.sdk_configuration.security,
|
||||||
get_serialized_body=lambda: utils.serialize_request_body(
|
get_serialized_body=lambda: utils.serialize_request_body(
|
||||||
request.chat_generation_params,
|
request, False, False, "json", components.ChatGenerationParams
|
||||||
False,
|
|
||||||
False,
|
|
||||||
"json",
|
|
||||||
components.ChatGenerationParams,
|
|
||||||
),
|
),
|
||||||
allow_empty_value=None,
|
allow_empty_value=None,
|
||||||
timeout_ms=timeout_ms,
|
timeout_ms=timeout_ms,
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user