Compare commits

...
10 Commits
Author SHA1 Message Date
OpenRouter Team 88bc51d136 Commits included in this export:
- b867adcde6b64f3f2a11c4626254b39098e4b0b4
  - 21912c097b4066d109766c6b4492826595cd57c5
  - bc1ed85adc976a4634ca8a41b82e4fc2c39a864f
  - d145c89c941937a312ed1357590d2bfda9a3603d
  - 12f05b5dee397ead47cfcd545a7a2e3c7ff57524
  - dd28f75a19a015809797c7abf3f8758f7c37262e
  - c96e569781e07ab44172d9c69940ec17bafd81f4
  - c9d5a90e3c2b5077a2bdd49773f1a46d1a5a79c7
  - 58b08f87116ceab9076de2fdc0a4c74c919b44c4

GitOrigin-RevId: b867adcde6b64f3f2a11c4626254b39098e4b0b4
2026-01-27 02:53:21 +00:00
robert-j-yandGitHub 0c791b04d1 chore: sync from monorepo (#36) 2026-01-21 17:28:27 -08:00
OpenRouter Team 5f2c0ee2ea Project import generated by Copybara.
GitOrigin-RevId: 2592bdc8b4b7c695a3d689390aedc9a42914acc8
2026-01-22 01:26:28 +00:00
robert-j-yandGitHub 5832c0495b chore: regenerate SDK with version 0.1.2 (#34) 2026-01-21 13:47:48 -08:00
Robert Yeakel f5dfc30997 chore: regenerate SDK with version 0.1.2 2026-01-21 13:45:46 -08:00
Shashank GoyalandGitHub a56ffbf5f3 Update speakeasy gen.yaml (#33) 2026-01-21 16:17:11 -05:00
Shashank Goyal cc2b002c5c Update speakeasy gen.yaml 2026-01-21 16:16:16 -05:00
Shashank Goyal 9774c726fd Bring project back to correct version number 2026-01-21 16:03:44 -05:00
Matt AppersonandGitHub 3a40848aab fix: update OpenAPI spec with router field (#32) 2026-01-13 20:40:08 -05:00
Matt AppersonandGitHub f190e3f950 feat: fix types and add reasoning_details to chat responses (#27) 2025-12-16 16:16:22 -05:00
275 changed files with 21376 additions and 4216 deletions
+351 -73
View File
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
management:
docChecksum: e929ecf569d79ab96a315332a4855566
docChecksum: 342e7e8ea9cb2b7ff1c1860e18d58822
docVersion: 1.0.0
speakeasyVersion: 1.666.0
generationVersion: 2.768.0
releaseVersion: 0.0.22
configChecksum: 0afda3910a58a8d797ac6674fa858711
releaseVersion: 0.2.0
configChecksum: 65a367d36e219e834a1176c8ec421a0a
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
@@ -29,6 +29,7 @@ features:
globalServerURLs: 3.2.0
globals: 3.0.0
groups: 3.0.1
ignores: 3.0.1
methodArguments: 1.0.2
methodSecurity: 3.0.1
nameOverrides: 3.0.1
@@ -52,6 +53,7 @@ generatedFiles:
- docs/components/architecture.md
- docs/components/assistantmessage.md
- docs/components/assistantmessagecontent.md
- docs/components/assistantmessageimageurl.md
- docs/components/badgatewayresponseerrordata.md
- docs/components/badrequestresponseerrordata.md
- docs/components/chainid.md
@@ -59,22 +61,19 @@ generatedFiles:
- docs/components/chaterrorerror.md
- docs/components/chatgenerationparams.md
- docs/components/chatgenerationparamsdatacollection.md
- docs/components/chatgenerationparamsengine.md
- docs/components/chatgenerationparamsimageconfig.md
- docs/components/chatgenerationparamsmaxprice.md
- docs/components/chatgenerationparamspdf.md
- docs/components/chatgenerationparamspdfengine.md
- docs/components/chatgenerationparamspluginautorouter.md
- docs/components/chatgenerationparamspluginfileparser.md
- docs/components/chatgenerationparamspluginmoderation.md
- docs/components/chatgenerationparamspluginresponsehealing.md
- docs/components/chatgenerationparamspluginunion.md
- docs/components/chatgenerationparamspluginweb.md
- docs/components/chatgenerationparamspreferredmaxlatency.md
- docs/components/chatgenerationparamspreferredmaxlatencyunion.md
- docs/components/chatgenerationparamspreferredminthroughput.md
- docs/components/chatgenerationparamspreferredminthroughputunion.md
- docs/components/chatgenerationparamsprovider.md
- docs/components/chatgenerationparamsresponseformatjsonobject.md
- docs/components/chatgenerationparamsresponseformatpython.md
- docs/components/chatgenerationparamsresponseformattext.md
- docs/components/chatgenerationparamsresponseformatunion.md
- docs/components/chatgenerationparamsroute.md
- docs/components/chatgenerationparamsstop.md
- docs/components/chatgenerationtokenusage.md
- docs/components/chatmessagecontentitem.md
- docs/components/chatmessagecontentitemaudio.md
@@ -82,12 +81,14 @@ generatedFiles:
- docs/components/chatmessagecontentitemcachecontrol.md
- docs/components/chatmessagecontentitemimage.md
- docs/components/chatmessagecontentitemimagedetail.md
- docs/components/chatmessagecontentitemimageimageurl.md
- docs/components/chatmessagecontentitemtext.md
- docs/components/chatmessagecontentitemvideo.md
- docs/components/chatmessagecontentitemvideoinputvideo.md
- docs/components/chatmessagecontentitemvideovideourl.md
- docs/components/chatmessagetokenlogprob.md
- docs/components/chatmessagetokenlogprobs.md
- docs/components/chatmessagetokenlogprobtoplogprob.md
- docs/components/chatmessagetoolcall.md
- docs/components/chatmessagetoolcallfunction.md
- docs/components/chatresponse.md
@@ -103,18 +104,7 @@ generatedFiles:
- docs/components/chatstreamoptions.md
- docs/components/code.md
- docs/components/codeenum.md
- docs/components/completionchoice.md
- docs/components/completioncreateparams.md
- docs/components/completioncreateparamsresponseformatjsonobject.md
- docs/components/completioncreateparamsresponseformatpython.md
- docs/components/completioncreateparamsresponseformattext.md
- docs/components/completioncreateparamsresponseformatunion.md
- docs/components/completioncreateparamsstop.md
- docs/components/completionfinishreason.md
- docs/components/completionlogprobs.md
- docs/components/completionresponse.md
- docs/components/completiontokensdetails.md
- docs/components/completionusage.md
- docs/components/costdetails.md
- docs/components/createchargerequest.md
- docs/components/datacollection.md
@@ -123,27 +113,30 @@ generatedFiles:
- docs/components/edgenetworktimeoutresponseerrordata.md
- docs/components/effort.md
- docs/components/endpointstatus.md
- docs/components/engine.md
- docs/components/filecitation.md
- docs/components/filecitationtype.md
- docs/components/filepath.md
- docs/components/filepathtype.md
- docs/components/forbiddenresponseerrordata.md
- docs/components/idautorouter.md
- docs/components/idfileparser.md
- docs/components/idmoderation.md
- docs/components/idresponsehealing.md
- docs/components/idweb.md
- docs/components/ignore.md
- docs/components/image.md
- docs/components/imagegenerationstatus.md
- docs/components/imageurl.md
- docs/components/inputmodality.md
- docs/components/inputtokensdetails.md
- docs/components/instructtype.md
- docs/components/internalserverresponseerrordata.md
- docs/components/jsonschemaconfig.md
- docs/components/listendpointsresponse.md
- docs/components/logprob.md
- docs/components/message.md
- docs/components/messagecontent.md
- docs/components/messagedeveloper.md
- docs/components/modality.md
- docs/components/model.md
- docs/components/modelarchitecture.md
- docs/components/modelarchitectureinstructtype.md
@@ -155,7 +148,6 @@ generatedFiles:
- docs/components/namedtoolchoicefunction.md
- docs/components/notfoundresponseerrordata.md
- docs/components/object.md
- docs/components/only.md
- docs/components/openairesponsesannotation.md
- docs/components/openairesponsesincludable.md
- docs/components/openairesponsesincompletedetails.md
@@ -199,14 +191,17 @@ generatedFiles:
- docs/components/openairesponsestoolchoiceunion.md
- docs/components/openairesponsestruncation.md
- docs/components/openresponseseasyinputmessage.md
- docs/components/openresponseseasyinputmessagecontent1.md
- docs/components/openresponseseasyinputmessagecontent2.md
- docs/components/openresponseseasyinputmessagecontentinputimage.md
- docs/components/openresponseseasyinputmessagecontenttype.md
- docs/components/openresponseseasyinputmessagecontentunion1.md
- docs/components/openresponseseasyinputmessagecontentunion2.md
- docs/components/openresponseseasyinputmessagedetail.md
- docs/components/openresponseseasyinputmessageroleassistant.md
- docs/components/openresponseseasyinputmessageroledeveloper.md
- docs/components/openresponseseasyinputmessagerolesystem.md
- docs/components/openresponseseasyinputmessageroleunion.md
- docs/components/openresponseseasyinputmessageroleuser.md
- docs/components/openresponseseasyinputmessagetype.md
- docs/components/openresponseseasyinputmessagetypemessage.md
- docs/components/openresponseserrorevent.md
- docs/components/openresponseserroreventtype.md
- docs/components/openresponsesfunctioncalloutput.md
@@ -224,12 +219,15 @@ generatedFiles:
- docs/components/openresponsesinput.md
- docs/components/openresponsesinput1.md
- docs/components/openresponsesinputmessageitem.md
- docs/components/openresponsesinputmessageitemcontent.md
- docs/components/openresponsesinputmessageitemcontentinputimage.md
- docs/components/openresponsesinputmessageitemcontenttype.md
- docs/components/openresponsesinputmessageitemcontentunion.md
- docs/components/openresponsesinputmessageitemdetail.md
- docs/components/openresponsesinputmessageitemroledeveloper.md
- docs/components/openresponsesinputmessageitemrolesystem.md
- docs/components/openresponsesinputmessageitemroleunion.md
- docs/components/openresponsesinputmessageitemroleuser.md
- docs/components/openresponsesinputmessageitemtype.md
- docs/components/openresponsesinputmessageitemtypemessage.md
- docs/components/openresponseslogprobs.md
- docs/components/openresponsesnonstreamingresponse.md
- docs/components/openresponsesnonstreamingresponsetoolfunction.md
@@ -254,17 +252,19 @@ generatedFiles:
- docs/components/openresponsesreasoningsummarytextdoneeventtype.md
- docs/components/openresponsesreasoningtype.md
- docs/components/openresponsesrequest.md
- docs/components/openresponsesrequestengine.md
- docs/components/openresponsesrequestignore.md
- docs/components/openresponsesrequestimageconfig.md
- docs/components/openresponsesrequestmaxprice.md
- docs/components/openresponsesrequestpdf.md
- docs/components/openresponsesrequestpdfengine.md
- docs/components/openresponsesrequestonly.md
- docs/components/openresponsesrequestorder.md
- docs/components/openresponsesrequestpluginautorouter.md
- docs/components/openresponsesrequestpluginfileparser.md
- docs/components/openresponsesrequestpluginmoderation.md
- docs/components/openresponsesrequestpluginresponsehealing.md
- docs/components/openresponsesrequestpluginunion.md
- docs/components/openresponsesrequestpluginweb.md
- docs/components/openresponsesrequestprovider.md
- docs/components/openresponsesrequestroute.md
- docs/components/openresponsesrequestsort.md
- docs/components/openresponsesrequesttoolfunction.md
- docs/components/openresponsesrequesttoolunion.md
- docs/components/openresponsesrequesttype.md
@@ -300,7 +300,6 @@ generatedFiles:
- docs/components/openresponseswebsearchtool.md
- docs/components/openresponseswebsearchtoolfilters.md
- docs/components/openresponseswebsearchtooltype.md
- docs/components/order.md
- docs/components/outputitemimagegenerationcall.md
- docs/components/outputitemimagegenerationcalltype.md
- docs/components/outputmessage.md
@@ -316,15 +315,37 @@ generatedFiles:
- docs/components/parameter.md
- docs/components/part1.md
- docs/components/part2.md
- docs/components/partition.md
- docs/components/payloadtoolargeresponseerrordata.md
- docs/components/paymentrequiredresponseerrordata.md
- docs/components/pdf.md
- docs/components/pdfengine.md
- docs/components/pdfparserengine.md
- docs/components/pdfparseroptions.md
- docs/components/percentilelatencycutoffs.md
- docs/components/percentilestats.md
- docs/components/percentilethroughputcutoffs.md
- docs/components/perrequestlimits.md
- docs/components/preferredmaxlatency.md
- docs/components/preferredminthroughput.md
- docs/components/pricing.md
- docs/components/prompt.md
- docs/components/prompttokensdetails.md
- docs/components/providername.md
- docs/components/provideroverloadedresponseerrordata.md
- docs/components/providerpreferences.md
- docs/components/providerpreferencesignore.md
- docs/components/providerpreferencesmaxprice.md
- docs/components/providerpreferencesonly.md
- docs/components/providerpreferencesorder.md
- docs/components/providerpreferencespartition.md
- docs/components/providerpreferencesprovidersort.md
- docs/components/providerpreferencesprovidersortconfig.md
- docs/components/providerpreferencessortunion.md
- docs/components/providersort.md
- docs/components/providersortconfig.md
- docs/components/providersortconfigenum.md
- docs/components/providersortconfigunion.md
- docs/components/providersortunion.md
- docs/components/publicendpoint.md
- docs/components/publicendpointquantization.md
- docs/components/publicpricing.md
@@ -338,7 +359,11 @@ generatedFiles:
- docs/components/reasoningtextcontent.md
- docs/components/reasoningtextcontenttype.md
- docs/components/requesttimeoutresponseerrordata.md
- docs/components/responseformat.md
- docs/components/responseformatjsonobject.md
- docs/components/responseformatjsonschema.md
- docs/components/responseformatpython.md
- docs/components/responseformattext.md
- docs/components/responseformattextconfig.md
- docs/components/responseformattextgrammar.md
- docs/components/responseinputaudio.md
@@ -352,7 +377,10 @@ generatedFiles:
- docs/components/responseinputimagetype.md
- docs/components/responseinputtext.md
- docs/components/responseinputtexttype.md
- docs/components/responseinputvideo.md
- docs/components/responseinputvideotype.md
- docs/components/responseoutputtext.md
- docs/components/responseoutputtexttoplogprob.md
- docs/components/responseoutputtexttype.md
- docs/components/responseserrorfield.md
- docs/components/responsesformatjsonobject.md
@@ -373,6 +401,7 @@ generatedFiles:
- docs/components/responsesoutputitemfunctioncallstatusunion.md
- docs/components/responsesoutputitemfunctioncalltype.md
- docs/components/responsesoutputitemreasoning.md
- docs/components/responsesoutputitemreasoningformat.md
- docs/components/responsesoutputitemreasoningstatuscompleted.md
- docs/components/responsesoutputitemreasoningstatusincomplete.md
- docs/components/responsesoutputitemreasoningstatusinprogress.md
@@ -386,6 +415,7 @@ generatedFiles:
- docs/components/responsesoutputmessagestatusinprogress.md
- docs/components/responsesoutputmessagestatusunion.md
- docs/components/responsesoutputmessagetype.md
- docs/components/responsesoutputmodality.md
- docs/components/responsessearchcontextsize.md
- docs/components/responseswebsearchcalloutput.md
- docs/components/responseswebsearchcalloutputtype.md
@@ -393,13 +423,19 @@ generatedFiles:
- docs/components/responseswebsearchuserlocationtype.md
- docs/components/responsetextconfig.md
- docs/components/responsetextconfigverbosity.md
- docs/components/route.md
- docs/components/schema0.md
- docs/components/schema0enum.md
- docs/components/schema2.md
- docs/components/schema2reasoningencrypted.md
- docs/components/schema2reasoningsummary.md
- docs/components/schema2reasoningtext.md
- docs/components/schema4.md
- docs/components/security.md
- docs/components/servicetier.md
- docs/components/serviceunavailableresponseerrordata.md
- docs/components/sort.md
- docs/components/streamoptions.md
- docs/components/sortenum.md
- docs/components/stop.md
- docs/components/systemmessage.md
- docs/components/systemmessagecontent.md
- docs/components/tokenizer.md
@@ -409,7 +445,6 @@ generatedFiles:
- docs/components/toolresponsemessage.md
- docs/components/toolresponsemessagecontent.md
- docs/components/toomanyrequestsresponseerrordata.md
- docs/components/toplogprob.md
- docs/components/topproviderinfo.md
- docs/components/truncation.md
- docs/components/ttl.md
@@ -440,6 +475,7 @@ generatedFiles:
- docs/components/variables.md
- docs/components/videourl1.md
- docs/components/videourl2.md
- docs/components/websearchengine.md
- docs/components/websearchpreviewtooluserlocation.md
- docs/components/websearchpreviewtooluserlocationtype.md
- docs/components/websearchstatus.md
@@ -461,7 +497,20 @@ generatedFiles:
- docs/models/internal/globals.md
- docs/models/utils/retryconfig.md
- docs/operations/apitype.md
- docs/operations/bulkassignkeystoguardrailrequest.md
- docs/operations/bulkassignkeystoguardrailrequestbody.md
- docs/operations/bulkassignkeystoguardrailresponse.md
- docs/operations/bulkassignmemberstoguardrailrequest.md
- docs/operations/bulkassignmemberstoguardrailrequestbody.md
- docs/operations/bulkassignmemberstoguardrailresponse.md
- docs/operations/bulkunassignkeysfromguardrailrequest.md
- docs/operations/bulkunassignkeysfromguardrailrequestbody.md
- docs/operations/bulkunassignkeysfromguardrailresponse.md
- docs/operations/bulkunassignmembersfromguardrailrequest.md
- docs/operations/bulkunassignmembersfromguardrailrequestbody.md
- docs/operations/bulkunassignmembersfromguardrailresponse.md
- docs/operations/calldata.md
- docs/operations/category.md
- docs/operations/content.md
- docs/operations/contentimageurl.md
- docs/operations/contenttext.md
@@ -473,16 +522,22 @@ generatedFiles:
- docs/operations/createcoinbasechargeresponse.md
- docs/operations/createcoinbasechargesecurity.md
- docs/operations/createembeddingsdata.md
- docs/operations/createembeddingsprovider.md
- docs/operations/createembeddingsrequest.md
- docs/operations/createembeddingsresponse.md
- docs/operations/createembeddingsresponsebody.md
- docs/operations/createguardraildata.md
- docs/operations/createguardrailrequest.md
- docs/operations/createguardrailresetintervalrequest.md
- docs/operations/createguardrailresetintervalresponse.md
- docs/operations/createguardrailresponse.md
- docs/operations/createkeysdata.md
- docs/operations/createkeyslimitreset.md
- docs/operations/createkeysrequest.md
- docs/operations/createkeysresponse.md
- docs/operations/createresponsesresponse.md
- docs/operations/createresponsesresponsebody.md
- docs/operations/deleteguardrailrequest.md
- docs/operations/deleteguardrailresponse.md
- docs/operations/deletekeysrequest.md
- docs/operations/deletekeysresponse.md
- docs/operations/embedding.md
@@ -497,18 +552,16 @@ generatedFiles:
- docs/operations/getgenerationdata.md
- docs/operations/getgenerationrequest.md
- docs/operations/getgenerationresponse.md
- docs/operations/getguardraildata.md
- docs/operations/getguardrailrequest.md
- docs/operations/getguardrailresetinterval.md
- docs/operations/getguardrailresponse.md
- docs/operations/getkeydata.md
- docs/operations/getkeyrequest.md
- docs/operations/getkeyresponse.md
- docs/operations/getmodelsrequest.md
- docs/operations/getparametersdata.md
- docs/operations/getparametersprovider.md
- docs/operations/getparametersrequest.md
- docs/operations/getparametersresponse.md
- docs/operations/getparameterssecurity.md
- docs/operations/getuseractivityrequest.md
- docs/operations/getuseractivityresponse.md
- docs/operations/ignore.md
- docs/operations/imageurl.md
- docs/operations/input.md
- docs/operations/inputunion.md
@@ -516,23 +569,41 @@ generatedFiles:
- docs/operations/listendpointsrequest.md
- docs/operations/listendpointsresponse.md
- docs/operations/listendpointszdrresponse.md
- docs/operations/listguardrailkeyassignmentsdata.md
- docs/operations/listguardrailkeyassignmentsrequest.md
- docs/operations/listguardrailkeyassignmentsresponse.md
- docs/operations/listguardrailmemberassignmentsdata.md
- docs/operations/listguardrailmemberassignmentsrequest.md
- docs/operations/listguardrailmemberassignmentsresponse.md
- docs/operations/listguardrailsdata.md
- docs/operations/listguardrailsrequest.md
- docs/operations/listguardrailsresetinterval.md
- docs/operations/listguardrailsresponse.md
- docs/operations/listkeyassignmentsdata.md
- docs/operations/listkeyassignmentsrequest.md
- docs/operations/listkeyassignmentsresponse.md
- docs/operations/listmemberassignmentsdata.md
- docs/operations/listmemberassignmentsrequest.md
- docs/operations/listmemberassignmentsresponse.md
- docs/operations/listmodelsusersecurity.md
- docs/operations/listprovidersdata.md
- docs/operations/listprovidersresponse.md
- docs/operations/listrequest.md
- docs/operations/listresponse.md
- docs/operations/maxprice.md
- docs/operations/metadata.md
- docs/operations/object.md
- docs/operations/objectembedding.md
- docs/operations/only.md
- docs/operations/order.md
- docs/operations/ratelimit.md
- docs/operations/sendchatcompletionrequestresponse.md
- docs/operations/supportedparameter.md
- docs/operations/transferintent.md
- docs/operations/typeimageurl.md
- docs/operations/typetext.md
- docs/operations/updateguardraildata.md
- docs/operations/updateguardrailrequest.md
- docs/operations/updateguardrailrequestbody.md
- docs/operations/updateguardrailresetintervalrequest.md
- docs/operations/updateguardrailresetintervalresponse.md
- docs/operations/updateguardrailresponse.md
- docs/operations/updatekeysdata.md
- docs/operations/updatekeyslimitreset.md
- docs/operations/updatekeysrequest.md
@@ -543,14 +614,13 @@ generatedFiles:
- docs/sdks/analytics/README.md
- docs/sdks/apikeys/README.md
- docs/sdks/chat/README.md
- docs/sdks/completions/README.md
- docs/sdks/credits/README.md
- docs/sdks/embeddings/README.md
- docs/sdks/endpoints/README.md
- docs/sdks/generations/README.md
- docs/sdks/guardrails/README.md
- docs/sdks/models/README.md
- docs/sdks/oauth/README.md
- docs/sdks/parameters/README.md
- docs/sdks/providers/README.md
- docs/sdks/responses/README.md
- py.typed
@@ -567,9 +637,9 @@ generatedFiles:
- src/openrouter/basesdk.py
- src/openrouter/beta.py
- src/openrouter/chat.py
- src/openrouter/completions.py
- src/openrouter/components/__init__.py
- src/openrouter/components/_schema0.py
- src/openrouter/components/_schema2.py
- src/openrouter/components/activityitem.py
- src/openrouter/components/assistantmessage.py
- src/openrouter/components/badgatewayresponseerrordata.py
@@ -594,11 +664,6 @@ generatedFiles:
- src/openrouter/components/chatstreamingmessagetoolcall.py
- src/openrouter/components/chatstreamingresponsechunk.py
- src/openrouter/components/chatstreamoptions.py
- src/openrouter/components/completionchoice.py
- src/openrouter/components/completioncreateparams.py
- src/openrouter/components/completionlogprobs.py
- src/openrouter/components/completionresponse.py
- src/openrouter/components/completionusage.py
- src/openrouter/components/createchargerequest.py
- src/openrouter/components/datacollection.py
- src/openrouter/components/defaultparameters.py
@@ -667,10 +732,20 @@ generatedFiles:
- src/openrouter/components/parameter.py
- src/openrouter/components/payloadtoolargeresponseerrordata.py
- src/openrouter/components/paymentrequiredresponseerrordata.py
- src/openrouter/components/pdfparserengine.py
- src/openrouter/components/pdfparseroptions.py
- src/openrouter/components/percentilelatencycutoffs.py
- src/openrouter/components/percentilestats.py
- src/openrouter/components/percentilethroughputcutoffs.py
- src/openrouter/components/perrequestlimits.py
- src/openrouter/components/preferredmaxlatency.py
- src/openrouter/components/preferredminthroughput.py
- src/openrouter/components/providername.py
- src/openrouter/components/provideroverloadedresponseerrordata.py
- src/openrouter/components/providerpreferences.py
- src/openrouter/components/providersort.py
- src/openrouter/components/providersortconfig.py
- src/openrouter/components/providersortunion.py
- src/openrouter/components/publicendpoint.py
- src/openrouter/components/publicpricing.py
- src/openrouter/components/quantization.py
@@ -685,6 +760,7 @@ generatedFiles:
- src/openrouter/components/responseinputfile.py
- src/openrouter/components/responseinputimage.py
- src/openrouter/components/responseinputtext.py
- src/openrouter/components/responseinputvideo.py
- src/openrouter/components/responseoutputtext.py
- src/openrouter/components/responseserrorfield.py
- src/openrouter/components/responsesformatjsonobject.py
@@ -696,6 +772,7 @@ generatedFiles:
- src/openrouter/components/responsesoutputitemfunctioncall.py
- src/openrouter/components/responsesoutputitemreasoning.py
- src/openrouter/components/responsesoutputmessage.py
- src/openrouter/components/responsesoutputmodality.py
- src/openrouter/components/responsessearchcontextsize.py
- src/openrouter/components/responseswebsearchcalloutput.py
- src/openrouter/components/responseswebsearchuserlocation.py
@@ -712,6 +789,7 @@ generatedFiles:
- src/openrouter/components/unprocessableentityresponseerrordata.py
- src/openrouter/components/urlcitation.py
- src/openrouter/components/usermessage.py
- src/openrouter/components/websearchengine.py
- src/openrouter/components/websearchpreviewtooluserlocation.py
- src/openrouter/components/websearchstatus.py
- src/openrouter/credits.py
@@ -738,6 +816,7 @@ generatedFiles:
- src/openrouter/errors/unauthorizedresponse_error.py
- src/openrouter/errors/unprocessableentityresponse_error.py
- src/openrouter/generations.py
- src/openrouter/guardrails.py
- src/openrouter/httpclient.py
- src/openrouter/models/__init__.py
- src/openrouter/models/internal/__init__.py
@@ -745,28 +824,39 @@ generatedFiles:
- src/openrouter/models_.py
- src/openrouter/oauth.py
- src/openrouter/operations/__init__.py
- src/openrouter/operations/bulkassignkeystoguardrail.py
- src/openrouter/operations/bulkassignmemberstoguardrail.py
- src/openrouter/operations/bulkunassignkeysfromguardrail.py
- src/openrouter/operations/bulkunassignmembersfromguardrail.py
- src/openrouter/operations/createauthkeyscode.py
- src/openrouter/operations/createcoinbasecharge.py
- src/openrouter/operations/createembeddings.py
- src/openrouter/operations/createguardrail.py
- src/openrouter/operations/createkeys.py
- src/openrouter/operations/createresponses.py
- src/openrouter/operations/deleteguardrail.py
- src/openrouter/operations/deletekeys.py
- src/openrouter/operations/exchangeauthcodeforapikey.py
- src/openrouter/operations/getcredits.py
- src/openrouter/operations/getcurrentkey.py
- src/openrouter/operations/getgeneration.py
- src/openrouter/operations/getguardrail.py
- src/openrouter/operations/getkey.py
- src/openrouter/operations/getmodels.py
- src/openrouter/operations/getparameters.py
- src/openrouter/operations/getuseractivity.py
- src/openrouter/operations/list.py
- src/openrouter/operations/listendpoints.py
- src/openrouter/operations/listendpointszdr.py
- src/openrouter/operations/listguardrailkeyassignments.py
- src/openrouter/operations/listguardrailmemberassignments.py
- src/openrouter/operations/listguardrails.py
- src/openrouter/operations/listkeyassignments.py
- src/openrouter/operations/listmemberassignments.py
- src/openrouter/operations/listmodelsuser.py
- src/openrouter/operations/listproviders.py
- src/openrouter/operations/sendchatcompletionrequest.py
- src/openrouter/operations/updateguardrail.py
- src/openrouter/operations/updatekeys.py
- src/openrouter/parameters.py
- src/openrouter/providers.py
- src/openrouter/py.typed
- src/openrouter/responses.py
@@ -798,7 +888,7 @@ examples:
application/json: {"store": false, "service_tier": "auto", "stream": false}
responses:
"200":
application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "output": [{"id": "msg-abc123", "role": "assistant", "type": "message", "content": [{"type": "output_text", "text": "Hello! How can I help you today?"}]}], "error": null, "incomplete_details": null, "temperature": null, "top_p": null, "instructions": null, "metadata": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true}
application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "status": "completed", "completed_at": 2510.63, "output": [{"id": "msg-abc123", "role": "assistant", "type": "message", "content": [{"type": "output_text", "text": "Hello! How can I help you today?"}]}], "error": null, "incomplete_details": null, "temperature": null, "top_p": null, "presence_penalty": 7468.94, "frequency_penalty": 3967.09, "instructions": null, "metadata": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -911,7 +1001,7 @@ examples:
id: "<id>"
responses:
"200":
application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions"}}
application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions", "router": "openrouter/auto"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"402":
@@ -953,6 +1043,8 @@ examples:
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
listEndpoints:
speakeasy-default-list-endpoints:
parameters:
@@ -961,7 +1053,7 @@ examples:
slug: "<value>"
responses:
"200":
application/json: {"data": {"id": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "architecture": {"tokenizer": "GPT", "instruct_type": "chatml", "modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "endpoints": [{"name": "OpenAI: GPT-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "uptime_last_30m": 99.5, "supports_implicit_caching": true}]}}
application/json: {"data": {"id": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "architecture": {"tokenizer": "GPT", "instruct_type": "chatml", "modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "endpoints": [{"name": "OpenAI: GPT-4", "model_id": "openai/gpt-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "uptime_last_30m": 99.5, "supports_implicit_caching": true, "latency_last_30m": {"p50": 0.25, "p75": 0.35, "p90": 0.48, "p99": 0.85}, "throughput_last_30m": {"p50": 45.2, "p75": 38.5, "p90": 28.3, "p99": 15.1}}]}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
@@ -970,7 +1062,7 @@ examples:
speakeasy-default-list-endpoints-zdr:
responses:
"200":
application/json: {"data": [{"name": "OpenAI: GPT-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens"], "uptime_last_30m": 99.5, "supports_implicit_caching": true}]}
application/json: {"data": [{"name": "OpenAI: GPT-4", "model_id": "openai/gpt-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens"], "uptime_last_30m": 99.5, "supports_implicit_caching": true, "latency_last_30m": {"p50": 25.5, "p75": 35.2, "p90": 48.7, "p99": 85.3}, "throughput_last_30m": {"p50": 25.5, "p75": 35.2, "p90": 48.7, "p99": 85.3}}]}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
getParameters:
@@ -1003,7 +1095,7 @@ examples:
offset: "0"
responses:
"200":
application/json: {"data": [{"hash": "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", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z"}]}
application/json: {"data": [{"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z"}]}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"429":
@@ -1016,7 +1108,7 @@ examples:
application/json: {"name": "My New API Key"}
responses:
"201":
application/json: {"data": {"hash": "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", "name": "My New API Key", "label": "My New API Key", "disabled": false, "limit": 50, "limit_remaining": 50, "limit_reset": "monthly", "include_byok_in_limit": true, "usage": 0, "usage_daily": 0, "usage_weekly": 0, "usage_monthly": 0, "byok_usage": 0, "byok_usage_daily": 0, "byok_usage_weekly": 0, "byok_usage_monthly": 0, "created_at": "2025-08-24T10:30:00Z", "updated_at": null}, "key": "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"}
application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My New API Key", "label": "My New API Key", "disabled": false, "limit": 50, "limit_remaining": 50, "limit_reset": "monthly", "include_byok_in_limit": true, "usage": 0, "usage_daily": 0, "usage_weekly": 0, "usage_monthly": 0, "byok_usage": 0, "byok_usage_daily": 0, "byok_usage_weekly": 0, "byok_usage_monthly": 0, "created_at": "2025-08-24T10:30:00Z", "updated_at": null}, "key": "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"}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -1029,12 +1121,12 @@ examples:
speakeasy-default-update-keys:
parameters:
path:
hash: "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"
hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
requestBody:
application/json: {}
responses:
"200":
application/json: {"data": {"hash": "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", "name": "Updated API Key Name", "label": "Updated API Key Name", "disabled": false, "limit": 75, "limit_remaining": 49.5, "limit_reset": "daily", "include_byok_in_limit": true, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T16:00:00Z"}}
application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "Updated API Key Name", "label": "Updated API Key Name", "disabled": false, "limit": 75, "limit_remaining": 49.5, "limit_reset": "daily", "include_byok_in_limit": true, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T16:00:00Z"}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -1049,7 +1141,7 @@ examples:
speakeasy-default-delete-keys:
parameters:
path:
hash: "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"
hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
responses:
"200":
application/json: {"deleted": true}
@@ -1065,10 +1157,10 @@ examples:
speakeasy-default-get-key:
parameters:
path:
hash: "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"
hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
responses:
"200":
application/json: {"data": {"hash": "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", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z"}}
application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
@@ -1081,7 +1173,7 @@ examples:
speakeasy-default-get-current-key:
responses:
"200":
application/json: {"data": {"label": "sk-or-v1-au78b3456789012345678901234567890", "limit": 100, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "is_free_tier": false, "is_provisioning_key": false, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "rate_limit": {"requests": 1000, "interval": "1h", "note": "This field is deprecated and safe to ignore."}}}
application/json: {"data": {"label": "sk-or-v1-au7...890", "limit": 100, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "is_free_tier": false, "is_provisioning_key": false, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "rate_limit": {"requests": 1000, "interval": "1h", "note": "This field is deprecated and safe to ignore."}}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
@@ -1134,4 +1226,190 @@ examples:
application/json: {"error": {"code": "<value>", "message": "<value>"}}
"500":
application/json: {"error": {"code": "<value>", "message": "<value>"}}
listGuardrails:
speakeasy-default-list-guardrails:
responses:
"200":
application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 1}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
createGuardrail:
speakeasy-default-create-guardrail:
requestBody:
application/json: {"name": "My New Guardrail"}
responses:
"201":
application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "My New Guardrail", "created_at": "2025-08-24T10:30:00Z"}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
getGuardrail:
speakeasy-default-get-guardrail:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
responses:
"200":
application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail", "created_at": "2025-08-24T10:30:00Z"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
updateGuardrail:
speakeasy-default-update-guardrail:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
requestBody:
application/json: {}
responses:
"200":
application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Updated Guardrail Name", "created_at": "2025-08-24T10:30:00Z"}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
deleteGuardrail:
speakeasy-default-delete-guardrail:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
responses:
"200":
application/json: {"deleted": true}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
listKeyAssignments:
speakeasy-default-list-key-assignments:
responses:
"200":
application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "key_hash": "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "key_name": "Production Key", "key_label": "prod-key", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 25}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
listMemberAssignments:
speakeasy-default-list-member-assignments:
responses:
"200":
application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "user_id": "user_abc123", "organization_id": "org_xyz789", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 10}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
listGuardrailKeyAssignments:
speakeasy-default-list-guardrail-key-assignments:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
responses:
"200":
application/json: {"data": [], "total_count": 25}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
bulkAssignKeysToGuardrail:
speakeasy-default-bulk-assign-keys-to-guardrail:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
requestBody:
application/json: {"key_hashes": ["c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"]}
responses:
"200":
application/json: {"assigned_count": 3}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
listGuardrailMemberAssignments:
speakeasy-default-list-guardrail-member-assignments:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
responses:
"200":
application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "user_id": "user_abc123", "organization_id": "org_xyz789", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 10}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
bulkAssignMembersToGuardrail:
speakeasy-default-bulk-assign-members-to-guardrail:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
requestBody:
application/json: {"member_user_ids": ["user_abc123", "user_def456"]}
responses:
"200":
application/json: {"assigned_count": 2}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
bulkUnassignKeysFromGuardrail:
speakeasy-default-bulk-unassign-keys-from-guardrail:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
requestBody:
application/json: {"key_hashes": ["c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"]}
responses:
"200":
application/json: {"unassigned_count": 3}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
bulkUnassignMembersFromGuardrail:
speakeasy-default-bulk-unassign-members-from-guardrail:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
requestBody:
application/json: {"member_user_ids": ["user_abc123", "user_def456"]}
responses:
"200":
application/json: {"unassigned_count": 2}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
+3 -1
View File
@@ -31,7 +31,7 @@ generation:
skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true
python:
version: 0.0.22
version: 0.2.0
additionalDependencies:
dev: {}
main: {}
@@ -39,6 +39,8 @@ python:
- id
- object
- input
- models
- hash
asyncMode: both
authors:
- OpenRouter
Regular → Executable
+5539 -706
View File
File diff suppressed because it is too large Load Diff
+10
View File
@@ -0,0 +1,10 @@
lintVersion: 1.0.0
defaultRuleset: openrouter
rulesets:
openrouter:
rulesets:
- speakeasy-recommended
- speakeasy-generation
rules:
oas3-missing-example:
severity: "off"
+5520 -693
View File
File diff suppressed because it is too large Load Diff
+7 -7
View File
@@ -2,14 +2,14 @@ speakeasyVersion: 1.666.0
sources:
-OAS:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:f1b59b9b643de5e20d6e3299a8274783d8c0854615876f5d7f6f081814842695
sourceBlobDigest: sha256:ee1f2422281b3ed5b38951c74636ad192c9bb160f216069c1f7931ccc4e52553
sourceRevisionDigest: sha256:01256c8494de6bfc13c36d82ae316a6a13d402194f844618bcd4d59e34f325f3
sourceBlobDigest: sha256:4c80e48fd5e1cd030e68d664eb93984b4d5946867252ff1755a2bd2a05eccd4e
tags:
- latest
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:b128cdb6be96021e55feea5e2dcb6e7438de706138fcde4f871b14877885445b
sourceBlobDigest: sha256:8b15f72eaabbd77f4642be28a2861fd1cfd5d8cfe96e72fb8a76832387c64fab
sourceRevisionDigest: sha256:5ba48c1ff7f13c2c5d9ab558e9ecd4638b65c12dd9c4e0cff7fb337674e94ceb
sourceBlobDigest: sha256:082db9694677b85116bda99811c8b957f96d1c493a3c606643479a65dad79730
tags:
- latest
- 1.0.0
@@ -17,10 +17,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:b128cdb6be96021e55feea5e2dcb6e7438de706138fcde4f871b14877885445b
sourceBlobDigest: sha256:8b15f72eaabbd77f4642be28a2861fd1cfd5d8cfe96e72fb8a76832387c64fab
sourceRevisionDigest: sha256:5ba48c1ff7f13c2c5d9ab558e9ecd4638b65c12dd9c4e0cff7fb337674e94ceb
sourceBlobDigest: sha256:082db9694677b85116bda99811c8b957f96d1c493a3c606643479a65dad79730
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:92747cd4c744e6671784b73c124d89adc662799d11caf5e6573880f6bfb52405
codeSamplesRevisionDigest: sha256:bfe86dbe763c7e6164cdcddd56ddda61a8981ca5b5dc0aa7cd97bbbb4a44142a
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.666.0
+3 -1
View File
@@ -10,4 +10,6 @@
| `name` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `tool_calls` | List[[components.ChatMessageToolCall](../components/chatmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `reasoning_details` | List[[components.Schema2](../components/schema2.md)] | :heavy_minus_sign: | N/A |
| `images` | List[[components.Image](../components/image.md)] | :heavy_minus_sign: | N/A |
@@ -1,8 +1,8 @@
# GetParametersSecurity
# AssistantMessageImageURL
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `bearer` | *str* | :heavy_check_mark: | N/A |
| `url` | *str* | :heavy_check_mark: | N/A |
+6 -4
View File
@@ -7,7 +7,7 @@
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `provider` | [OptionalNullable[components.ChatGenerationParamsProvider]](../components/chatgenerationparamsprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. |
| `plugins` | List[[components.ChatGenerationParamsPluginUnion](../components/chatgenerationparamspluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. |
| `route` | [OptionalNullable[components.ChatGenerationParamsRoute]](../components/chatgenerationparamsroute.md) | :heavy_minus_sign: | Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria. |
| `route` | [OptionalNullable[components.Route]](../components/route.md) | :heavy_minus_sign: | N/A |
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. |
| `messages` | List[[components.Message](../components/message.md)] | :heavy_check_mark: | N/A |
@@ -22,13 +22,15 @@
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | N/A |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `reasoning` | [Optional[components.Reasoning]](../components/reasoning.md) | :heavy_minus_sign: | N/A |
| `response_format` | [Optional[components.ChatGenerationParamsResponseFormatUnion]](../components/chatgenerationparamsresponseformatunion.md) | :heavy_minus_sign: | N/A |
| `response_format` | [Optional[components.ResponseFormat]](../components/responseformat.md) | :heavy_minus_sign: | N/A |
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `stop` | [OptionalNullable[components.ChatGenerationParamsStop]](../components/chatgenerationparamsstop.md) | :heavy_minus_sign: | N/A |
| `stop` | [OptionalNullable[components.Stop]](../components/stop.md) | :heavy_minus_sign: | N/A |
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../components/chatstreamoptions.md) | :heavy_minus_sign: | N/A |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `tools` | List[[components.ToolDefinitionJSON](../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `debug` | [Optional[components.Debug]](../components/debug.md) | :heavy_minus_sign: | N/A |
| `debug` | [Optional[components.Debug]](../components/debug.md) | :heavy_minus_sign: | N/A |
| `image_config` | Dict[str, [components.ChatGenerationParamsImageConfig](../components/chatgenerationparamsimageconfig.md)] | :heavy_minus_sign: | N/A |
| `modalities` | List[[components.Modality](../components/modality.md)] | :heavy_minus_sign: | N/A |
@@ -1,4 +1,4 @@
# CompletionCreateParamsStop
# ChatGenerationParamsImageConfig
## Supported Types
@@ -9,9 +9,9 @@
value: str = /* values here */
```
### `List[str]`
### `float`
```python
value: List[str] = /* values here */
value: float = /* values here */
```
@@ -0,0 +1,10 @@
# ChatGenerationParamsPluginAutoRouter
## Fields
| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `id` | *Literal["auto-router"]* | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `allowed_models` | List[*str*] | :heavy_minus_sign: | N/A |
@@ -3,9 +3,8 @@
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `id` | *Literal["file-parser"]* | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `max_files` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `pdf` | [Optional[components.ChatGenerationParamsPdf]](../components/chatgenerationparamspdf.md) | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `id` | *Literal["file-parser"]* | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `pdf` | [Optional[components.Pdf]](../components/pdf.md) | :heavy_minus_sign: | N/A |
@@ -3,6 +3,12 @@
## Supported Types
### `components.ChatGenerationParamsPluginAutoRouter`
```python
value: components.ChatGenerationParamsPluginAutoRouter = /* values here */
```
### `components.ChatGenerationParamsPluginModeration`
```python
@@ -3,10 +3,10 @@
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `id` | *Literal["web"]* | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `max_results` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `engine` | [Optional[components.ChatGenerationParamsEngine]](../components/chatgenerationparamsengine.md) | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
| `id` | *Literal["web"]* | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `max_results` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `engine` | [Optional[components.Engine]](../components/engine.md) | :heavy_minus_sign: | N/A |
@@ -0,0 +1,11 @@
# ChatGenerationParamsPreferredMaxLatency
## Fields
| Field | Type | Required | Description |
| ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| `p50` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p75` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p90` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p99` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,17 @@
# ChatGenerationParamsPreferredMaxLatencyUnion
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `components.ChatGenerationParamsPreferredMaxLatency`
```python
value: components.ChatGenerationParamsPreferredMaxLatency = /* values here */
```
@@ -0,0 +1,11 @@
# ChatGenerationParamsPreferredMinThroughput
## Fields
| Field | Type | Required | Description |
| ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| `p50` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p75` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p90` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p99` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,17 @@
# ChatGenerationParamsPreferredMinThroughputUnion
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `components.ChatGenerationParamsPreferredMinThroughput`
```python
value: components.ChatGenerationParamsPreferredMinThroughput = /* values here */
```
+15 -15
View File
@@ -3,18 +3,18 @@
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> |
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. |
| `data_collection` | [OptionalNullable[components.ChatGenerationParamsDataCollection]](../components/chatgenerationparamsdatacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/><br/>- deny: use only providers which do not collect user data. |
| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `order` | List[[components.Schema0](../components/schema0.md)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. |
| `only` | List[[components.Schema0](../components/schema0.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. |
| `ignore` | List[[components.Schema0](../components/schema0.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. |
| `quantizations` | List[[components.Quantizations](../components/quantizations.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. |
| `sort` | [OptionalNullable[components.Sort]](../components/sort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. |
| `max_price` | [Optional[components.ChatGenerationParamsMaxPrice]](../components/chatgenerationparamsmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. |
| `min_throughput` | *OptionalNullable[float]* | :heavy_minus_sign: | The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used. |
| `max_latency` | *OptionalNullable[float]* | :heavy_minus_sign: | The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used. |
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> |
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. |
| `data_collection` | [OptionalNullable[components.ChatGenerationParamsDataCollection]](../components/chatgenerationparamsdatacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/><br/>- deny: use only providers which do not collect user data. |
| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `order` | List[[components.Schema0](../components/schema0.md)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. |
| `only` | List[[components.Schema0](../components/schema0.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. |
| `ignore` | List[[components.Schema0](../components/schema0.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. |
| `quantizations` | List[[components.Quantizations](../components/quantizations.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. |
| `sort` | [OptionalNullable[components.ProviderSortUnion]](../components/providersortunion.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. |
| `max_price` | [Optional[components.ChatGenerationParamsMaxPrice]](../components/chatgenerationparamsmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. |
| `preferred_min_throughput` | [OptionalNullable[components.ChatGenerationParamsPreferredMinThroughputUnion]](../components/chatgenerationparamspreferredminthroughputunion.md) | :heavy_minus_sign: | Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. |
| `preferred_max_latency` | [OptionalNullable[components.ChatGenerationParamsPreferredMaxLatencyUnion]](../components/chatgenerationparamspreferredmaxlatencyunion.md) | :heavy_minus_sign: | Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. |
@@ -1,35 +0,0 @@
# ChatGenerationParamsResponseFormatUnion
## Supported Types
### `components.ChatGenerationParamsResponseFormatText`
```python
value: components.ChatGenerationParamsResponseFormatText = /* values here */
```
### `components.ChatGenerationParamsResponseFormatJSONObject`
```python
value: components.ChatGenerationParamsResponseFormatJSONObject = /* values here */
```
### `components.ResponseFormatJSONSchema`
```python
value: components.ResponseFormatJSONSchema = /* values here */
```
### `components.ResponseFormatTextGrammar`
```python
value: components.ResponseFormatTextGrammar = /* values here */
```
### `components.ChatGenerationParamsResponseFormatPython`
```python
value: components.ChatGenerationParamsResponseFormatPython = /* values here */
```
@@ -3,7 +3,7 @@
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `type` | *Literal["image_url"]* | :heavy_check_mark: | N/A |
| `image_url` | [components.ImageURL](../components/imageurl.md) | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `type` | *Literal["image_url"]* | :heavy_check_mark: | N/A |
| `image_url` | [components.ChatMessageContentItemImageImageURL](../components/chatmessagecontentitemimageimageurl.md) | :heavy_check_mark: | N/A |
@@ -1,4 +1,4 @@
# ImageURL
# ChatMessageContentItemImageImageURL
## Fields
+6 -6
View File
@@ -3,9 +3,9 @@
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
| `token` | *str* | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
| `top_logprobs` | List[[components.TopLogprob](../components/toplogprob.md)] | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `token` | *str* | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
| `top_logprobs` | List[[components.ChatMessageTokenLogprobTopLogprob](../components/chatmessagetokenlogprobtoplogprob.md)] | :heavy_check_mark: | N/A |
@@ -0,0 +1,10 @@
# ChatMessageTokenLogprobTopLogprob
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `token` | *str* | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
+2 -1
View File
@@ -9,4 +9,5 @@
| `content` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `tool_calls` | List[[components.ChatStreamingMessageToolCall](../components/chatstreamingmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
| `tool_calls` | List[[components.ChatStreamingMessageToolCall](../components/chatstreamingmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
| `reasoning_details` | List[[components.Schema2](../components/schema2.md)] | :heavy_minus_sign: | N/A |
-13
View File
@@ -1,13 +0,0 @@
# CompletionChoice
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `text` | *str* | :heavy_check_mark: | N/A |
| `index` | *float* | :heavy_check_mark: | N/A |
| `logprobs` | [Nullable[components.CompletionLogprobs]](../components/completionlogprobs.md) | :heavy_check_mark: | N/A |
| `finish_reason` | [Nullable[components.CompletionFinishReason]](../components/completionfinishreason.md) | :heavy_check_mark: | N/A |
| `native_finish_reason` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
-28
View File
@@ -1,28 +0,0 @@
# CompletionCreateParams
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
| `prompt` | [components.Prompt](../components/prompt.md) | :heavy_check_mark: | N/A |
| `best_of` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `echo` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | N/A |
| `logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `stop` | [OptionalNullable[components.CompletionCreateParamsStop]](../components/completioncreateparamsstop.md) | :heavy_minus_sign: | N/A |
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `stream_options` | [OptionalNullable[components.StreamOptions]](../components/streamoptions.md) | :heavy_minus_sign: | N/A |
| `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | N/A |
| `response_format` | [OptionalNullable[components.CompletionCreateParamsResponseFormatUnion]](../components/completioncreateparamsresponseformatunion.md) | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# CompletionCreateParamsResponseFormatJSONObject
## Fields
| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `type` | *Literal["json_object"]* | :heavy_check_mark: | N/A |
@@ -1,8 +0,0 @@
# CompletionCreateParamsResponseFormatPython
## Fields
| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `type` | *Literal["python"]* | :heavy_check_mark: | N/A |
@@ -1,8 +0,0 @@
# CompletionCreateParamsResponseFormatText
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
@@ -1,35 +0,0 @@
# CompletionCreateParamsResponseFormatUnion
## Supported Types
### `components.CompletionCreateParamsResponseFormatText`
```python
value: components.CompletionCreateParamsResponseFormatText = /* values here */
```
### `components.CompletionCreateParamsResponseFormatJSONObject`
```python
value: components.CompletionCreateParamsResponseFormatJSONObject = /* values here */
```
### `components.ResponseFormatJSONSchema`
```python
value: components.ResponseFormatJSONSchema = /* values here */
```
### `components.ResponseFormatTextGrammar`
```python
value: components.ResponseFormatTextGrammar = /* values here */
```
### `components.CompletionCreateParamsResponseFormatPython`
```python
value: components.CompletionCreateParamsResponseFormatPython = /* values here */
```
-10
View File
@@ -1,10 +0,0 @@
# CompletionFinishReason
## Values
| Name | Value |
| ---------------- | ---------------- |
| `STOP` | stop |
| `LENGTH` | length |
| `CONTENT_FILTER` | content_filter |
-11
View File
@@ -1,11 +0,0 @@
# CompletionLogprobs
## Fields
| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `tokens` | List[*str*] | :heavy_check_mark: | N/A |
| `token_logprobs` | List[*float*] | :heavy_check_mark: | N/A |
| `top_logprobs` | List[Dict[str, *float*]] | :heavy_check_mark: | N/A |
| `text_offset` | List[*float*] | :heavy_check_mark: | N/A |
-15
View File
@@ -1,15 +0,0 @@
# CompletionResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `id` | *str* | :heavy_check_mark: | N/A |
| `object` | *Literal["text_completion"]* | :heavy_check_mark: | N/A |
| `created` | *float* | :heavy_check_mark: | N/A |
| `model` | *str* | :heavy_check_mark: | N/A |
| `provider` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `system_fingerprint` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `choices` | List[[components.CompletionChoice](../components/completionchoice.md)] | :heavy_check_mark: | N/A |
| `usage` | [Optional[components.CompletionUsage]](../components/completionusage.md) | :heavy_minus_sign: | N/A |
-10
View File
@@ -1,10 +0,0 @@
# CompletionUsage
## Fields
| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `prompt_tokens` | *float* | :heavy_check_mark: | N/A |
| `completion_tokens` | *float* | :heavy_check_mark: | N/A |
| `total_tokens` | *float* | :heavy_check_mark: | N/A |
+5 -5
View File
@@ -5,9 +5,9 @@
| Name | Value |
| --------- | --------- |
| `NONE` | none |
| `MINIMAL` | minimal |
| `LOW` | low |
| `MEDIUM` | medium |
| `XHIGH` | xhigh |
| `HIGH` | high |
| `XHIGH` | xhigh |
| `MEDIUM` | medium |
| `LOW` | low |
| `MINIMAL` | minimal |
| `NONE` | none |
+9
View File
@@ -0,0 +1,9 @@
# Engine
## Values
| Name | Value |
| -------- | -------- |
| `NATIVE` | native |
| `EXA` | exa |
+8
View File
@@ -0,0 +1,8 @@
# IDAutoRouter
## Values
| Name | Value |
| ------------- | ------------- |
| `AUTO_ROUTER` | auto-router |
+8
View File
@@ -0,0 +1,8 @@
# Image
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `image_url` | [components.AssistantMessageImageURL](../components/assistantmessageimageurl.md) | :heavy_check_mark: | N/A |
+11
View File
@@ -0,0 +1,11 @@
# Logprob
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `token` | *str* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `top_logprobs` | List[[components.ResponseOutputTextTopLogprob](../components/responseoutputtexttoplogprob.md)] | :heavy_check_mark: | N/A |
+9
View File
@@ -0,0 +1,9 @@
# Modality
## Values
| Name | Value |
| ------- | ------- |
| `TEXT` | text |
| `IMAGE` | image |
+2 -1
View File
@@ -19,4 +19,5 @@ Information about an AI model available on OpenRouter
| `top_provider` | [components.TopProviderInfo](../components/topproviderinfo.md) | :heavy_check_mark: | Information about the top provider for this model | {<br/>"context_length": 8192,<br/>"max_completion_tokens": 4096,<br/>"is_moderated": true<br/>} |
| `per_request_limits` | [Nullable[components.PerRequestLimits]](../components/perrequestlimits.md) | :heavy_check_mark: | Per-request token limits | {<br/>"prompt_tokens": 1000,<br/>"completion_tokens": 1000<br/>} |
| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | List of supported parameters for this model | |
| `default_parameters` | [Nullable[components.DefaultParameters]](../components/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {<br/>"temperature": 0.7,<br/>"top_p": 0.9,<br/>"frequency_penalty": 0<br/>} |
| `default_parameters` | [Nullable[components.DefaultParameters]](../components/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {<br/>"temperature": 0.7,<br/>"top_p": 0.9,<br/>"frequency_penalty": 0<br/>} |
| `expiration_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 |
@@ -3,8 +3,8 @@
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `type` | [Optional[components.OpenResponsesEasyInputMessageType]](../components/openresponseseasyinputmessagetype.md) | :heavy_minus_sign: | N/A |
| `role` | [components.OpenResponsesEasyInputMessageRoleUnion](../components/openresponseseasyinputmessageroleunion.md) | :heavy_check_mark: | N/A |
| `content` | [components.OpenResponsesEasyInputMessageContent2](../components/openresponseseasyinputmessagecontent2.md) | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `type` | [Optional[components.OpenResponsesEasyInputMessageTypeMessage]](../components/openresponseseasyinputmessagetypemessage.md) | :heavy_minus_sign: | N/A |
| `role` | [components.OpenResponsesEasyInputMessageRoleUnion](../components/openresponseseasyinputmessageroleunion.md) | :heavy_check_mark: | N/A |
| `content` | [components.OpenResponsesEasyInputMessageContentUnion2](../components/openresponseseasyinputmessagecontentunion2.md) | :heavy_check_mark: | N/A |
@@ -1,17 +0,0 @@
# OpenResponsesEasyInputMessageContent2
## Supported Types
### `List[components.OpenResponsesEasyInputMessageContent1]`
```python
value: List[components.OpenResponsesEasyInputMessageContent1] = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,12 @@
# OpenResponsesEasyInputMessageContentInputImage
Image input content item
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `type` | [components.OpenResponsesEasyInputMessageContentType](../components/openresponseseasyinputmessagecontenttype.md) | :heavy_check_mark: | N/A |
| `detail` | [components.OpenResponsesEasyInputMessageDetail](../components/openresponseseasyinputmessagedetail.md) | :heavy_check_mark: | N/A |
| `image_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,8 @@
# OpenResponsesEasyInputMessageContentType
## Values
| Name | Value |
| ------------- | ------------- |
| `INPUT_IMAGE` | input_image |
@@ -1,4 +1,4 @@
# OpenResponsesInputMessageItemContent
# OpenResponsesEasyInputMessageContentUnion1
## Supported Types
@@ -9,10 +9,10 @@
value: components.ResponseInputText = /* values here */
```
### `components.ResponseInputImage`
### `components.OpenResponsesEasyInputMessageContentInputImage`
```python
value: components.ResponseInputImage = /* values here */
value: components.OpenResponsesEasyInputMessageContentInputImage = /* values here */
```
### `components.ResponseInputFile`
@@ -27,3 +27,9 @@ value: components.ResponseInputFile = /* values here */
value: components.ResponseInputAudio = /* values here */
```
### `components.ResponseInputVideo`
```python
value: components.ResponseInputVideo = /* values here */
```
@@ -0,0 +1,17 @@
# OpenResponsesEasyInputMessageContentUnion2
## Supported Types
### `List[components.OpenResponsesEasyInputMessageContentUnion1]`
```python
value: List[components.OpenResponsesEasyInputMessageContentUnion1] = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,10 @@
# OpenResponsesEasyInputMessageDetail
## Values
| Name | Value |
| ------ | ------ |
| `AUTO` | auto |
| `HIGH` | high |
| `LOW` | low |
@@ -1,4 +1,4 @@
# OpenResponsesInputMessageItemType
# OpenResponsesEasyInputMessageTypeMessage
## Values
@@ -3,9 +3,9 @@
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `type` | [Optional[components.OpenResponsesInputMessageItemType]](../components/openresponsesinputmessageitemtype.md) | :heavy_minus_sign: | N/A |
| `role` | [components.OpenResponsesInputMessageItemRoleUnion](../components/openresponsesinputmessageitemroleunion.md) | :heavy_check_mark: | N/A |
| `content` | List[[components.OpenResponsesInputMessageItemContent](../components/openresponsesinputmessageitemcontent.md)] | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `type` | [Optional[components.OpenResponsesInputMessageItemTypeMessage]](../components/openresponsesinputmessageitemtypemessage.md) | :heavy_minus_sign: | N/A |
| `role` | [components.OpenResponsesInputMessageItemRoleUnion](../components/openresponsesinputmessageitemroleunion.md) | :heavy_check_mark: | N/A |
| `content` | List[[components.OpenResponsesInputMessageItemContentUnion](../components/openresponsesinputmessageitemcontentunion.md)] | :heavy_check_mark: | N/A |
@@ -0,0 +1,12 @@
# OpenResponsesInputMessageItemContentInputImage
Image input content item
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `type` | [components.OpenResponsesInputMessageItemContentType](../components/openresponsesinputmessageitemcontenttype.md) | :heavy_check_mark: | N/A |
| `detail` | [components.OpenResponsesInputMessageItemDetail](../components/openresponsesinputmessageitemdetail.md) | :heavy_check_mark: | N/A |
| `image_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,8 @@
# OpenResponsesInputMessageItemContentType
## Values
| Name | Value |
| ------------- | ------------- |
| `INPUT_IMAGE` | input_image |
@@ -1,4 +1,4 @@
# OpenResponsesEasyInputMessageContent1
# OpenResponsesInputMessageItemContentUnion
## Supported Types
@@ -9,10 +9,10 @@
value: components.ResponseInputText = /* values here */
```
### `components.ResponseInputImage`
### `components.OpenResponsesInputMessageItemContentInputImage`
```python
value: components.ResponseInputImage = /* values here */
value: components.OpenResponsesInputMessageItemContentInputImage = /* values here */
```
### `components.ResponseInputFile`
@@ -27,3 +27,9 @@ value: components.ResponseInputFile = /* values here */
value: components.ResponseInputAudio = /* values here */
```
### `components.ResponseInputVideo`
```python
value: components.ResponseInputVideo = /* values here */
```
@@ -0,0 +1,10 @@
# OpenResponsesInputMessageItemDetail
## Values
| Name | Value |
| ------ | ------ |
| `AUTO` | auto |
| `HIGH` | high |
| `LOW` | low |
@@ -1,4 +1,4 @@
# OpenResponsesEasyInputMessageType
# OpenResponsesInputMessageItemTypeMessage
## Values
@@ -11,7 +11,8 @@ Complete non-streaming response from the Responses API
| `object` | [components.Object](../components/object.md) | :heavy_check_mark: | N/A | |
| `created_at` | *float* | :heavy_check_mark: | N/A | |
| `model` | *str* | :heavy_check_mark: | N/A | |
| `status` | [Optional[components.OpenAIResponsesResponseStatus]](../components/openairesponsesresponsestatus.md) | :heavy_minus_sign: | N/A | |
| `status` | [components.OpenAIResponsesResponseStatus](../components/openairesponsesresponsestatus.md) | :heavy_check_mark: | N/A | |
| `completed_at` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `output` | List[[components.ResponsesOutputItem](../components/responsesoutputitem.md)] | :heavy_check_mark: | N/A | |
| `user` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `output_text` | *Optional[str]* | :heavy_minus_sign: | N/A | |
@@ -19,12 +20,14 @@ Complete non-streaming response from the Responses API
| `safety_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `error` | [Nullable[components.ResponsesErrorField]](../components/responseserrorfield.md) | :heavy_check_mark: | Error information returned from the API | {<br/>"code": "rate_limit_exceeded",<br/>"message": "Rate limit exceeded. Please try again later."<br/>} |
| `incomplete_details` | [Nullable[components.OpenAIResponsesIncompleteDetails]](../components/openairesponsesincompletedetails.md) | :heavy_check_mark: | N/A | |
| `usage` | [Optional[components.OpenResponsesUsage]](../components/openresponsesusage.md) | :heavy_minus_sign: | Token usage information for the response | {<br/>"input_tokens": 10,<br/>"output_tokens": 25,<br/>"total_tokens": 35,<br/>"input_tokens_details": {<br/>"cached_tokens": 0<br/>},<br/>"output_tokens_details": {<br/>"reasoning_tokens": 0<br/>},<br/>"cost": 0.0012,<br/>"cost_details": {<br/>"upstream_inference_cost": null,<br/>"upstream_inference_input_cost": 0.0008,<br/>"upstream_inference_output_cost": 0.0004<br/>}<br/>} |
| `usage` | [OptionalNullable[components.OpenResponsesUsage]](../components/openresponsesusage.md) | :heavy_minus_sign: | Token usage information for the response | {<br/>"input_tokens": 10,<br/>"output_tokens": 25,<br/>"total_tokens": 35,<br/>"input_tokens_details": {<br/>"cached_tokens": 0<br/>},<br/>"output_tokens_details": {<br/>"reasoning_tokens": 0<br/>},<br/>"cost": 0.0012,<br/>"cost_details": {<br/>"upstream_inference_cost": null,<br/>"upstream_inference_input_cost": 0.0008,<br/>"upstream_inference_output_cost": 0.0004<br/>}<br/>} |
| `max_tool_calls` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `top_logprobs` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `max_output_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `temperature` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `top_p` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `presence_penalty` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `frequency_penalty` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `instructions` | [Nullable[components.OpenAIResponsesInputUnion]](../components/openairesponsesinputunion.md) | :heavy_check_mark: | N/A | |
| `metadata` | Dict[str, *str*] | :heavy_check_mark: | 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/>} |
| `tools` | List[[components.OpenResponsesNonStreamingResponseToolUnion](../components/openresponsesnonstreamingresponsetoolunion.md)] | :heavy_check_mark: | N/A | |
@@ -3,10 +3,11 @@
## Values
| Name | Value |
| --------------------- | --------------------- |
| `UNKNOWN` | unknown |
| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
| `XAI_RESPONSES_V1` | xai-responses-v1 |
| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
| `GOOGLE_GEMINI_V1` | google-gemini-v1 |
| Name | Value |
| --------------------------- | --------------------------- |
| `UNKNOWN` | unknown |
| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
| `AZURE_OPENAI_RESPONSES_V1` | azure-openai-responses-v1 |
| `XAI_RESPONSES_V1` | xai-responses-v1 |
| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
| `GOOGLE_GEMINI_V1` | google-gemini-v1 |
+6 -1
View File
@@ -20,7 +20,13 @@ Request schema for Responses endpoint
| `max_output_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
| `max_tool_calls` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `top_k` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `image_config` | Dict[str, [components.OpenResponsesRequestImageConfig](../components/openresponsesrequestimageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. | {<br/>"aspect_ratio": "16:9"<br/>} |
| `modalities` | List[[components.ResponsesOutputModality](../components/responsesoutputmodality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [<br/>"text",<br/>"image"<br/>] |
| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `previous_response_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `prompt` | [OptionalNullable[components.OpenAIResponsesPrompt]](../components/openairesponsesprompt.md) | :heavy_minus_sign: | N/A | |
@@ -33,6 +39,5 @@ Request schema for Responses endpoint
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
| `provider` | [OptionalNullable[components.OpenResponsesRequestProvider]](../components/openresponsesrequestprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
| `plugins` | List[[components.OpenResponsesRequestPluginUnion](../components/openresponsesrequestpluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
| `route` | [OptionalNullable[components.OpenResponsesRequestRoute]](../components/openresponsesrequestroute.md) | :heavy_minus_sign: | Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria. | |
| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. | |
| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. | |
@@ -0,0 +1,17 @@
# OpenResponsesRequestIgnore
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,17 @@
# OpenResponsesRequestImageConfig
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `float`
```python
value: float = /* values here */
```
@@ -0,0 +1,17 @@
# OpenResponsesRequestOnly
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,17 @@
# OpenResponsesRequestOrder
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,10 @@
# OpenResponsesRequestPluginAutoRouter
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | [components.IDAutoRouter](../components/idautorouter.md) | :heavy_check_mark: | N/A | |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the auto-router plugin for this request. Defaults to true. | |
| `allowed_models` | List[*str*] | :heavy_minus_sign: | List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list. | [<br/>"anthropic/*",<br/>"openai/gpt-4o",<br/>"google/*"<br/>] |
@@ -3,9 +3,8 @@
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `id` | [components.IDFileParser](../components/idfileparser.md) | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the file-parser plugin for this request. Defaults to true. |
| `max_files` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `pdf` | [Optional[components.OpenResponsesRequestPdf]](../components/openresponsesrequestpdf.md) | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `id` | [components.IDFileParser](../components/idfileparser.md) | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the file-parser plugin for this request. Defaults to true. |
| `pdf` | [Optional[components.PDFParserOptions]](../components/pdfparseroptions.md) | :heavy_minus_sign: | Options for PDF parsing. |
@@ -3,6 +3,12 @@
## Supported Types
### `components.OpenResponsesRequestPluginAutoRouter`
```python
value: components.OpenResponsesRequestPluginAutoRouter = /* values here */
```
### `components.OpenResponsesRequestPluginModeration`
```python
@@ -3,10 +3,10 @@
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `id` | [components.IDWeb](../components/idweb.md) | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the web-search plugin for this request. Defaults to true. |
| `max_results` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `engine` | [Optional[components.OpenResponsesRequestEngine]](../components/openresponsesrequestengine.md) | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `id` | [components.IDWeb](../components/idweb.md) | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the web-search plugin for this request. Defaults to true. |
| `max_results` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `engine` | [Optional[components.WebSearchEngine]](../components/websearchengine.md) | :heavy_minus_sign: | The search engine to use for web search. |
+15 -15
View File
@@ -5,18 +5,18 @@ When multiple model providers are available, optionally indicate your routing pr
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> | |
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. | |
| `data_collection` | [OptionalNullable[components.DataCollection]](../components/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/><br/>- deny: use only providers which do not collect user data. | allow |
| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true |
| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true |
| `order` | List[[components.Order](../components/order.md)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. | |
| `only` | List[[components.Only](../components/only.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | |
| `ignore` | List[[components.Ignore](../components/ignore.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | |
| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | |
| `sort` | [OptionalNullable[components.ProviderSort]](../components/providersort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | price |
| `max_price` | [Optional[components.OpenResponsesRequestMaxPrice]](../components/openresponsesrequestmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | |
| `min_throughput` | *OptionalNullable[float]* | :heavy_minus_sign: | The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used. | 100 |
| `max_latency` | *OptionalNullable[float]* | :heavy_minus_sign: | The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used. | 5 |
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> | |
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. | |
| `data_collection` | [OptionalNullable[components.DataCollection]](../components/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/><br/>- deny: use only providers which do not collect user data. | allow |
| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true |
| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true |
| `order` | List[[components.OpenResponsesRequestOrder](../components/openresponsesrequestorder.md)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. | |
| `only` | List[[components.OpenResponsesRequestOnly](../components/openresponsesrequestonly.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | |
| `ignore` | List[[components.OpenResponsesRequestIgnore](../components/openresponsesrequestignore.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | |
| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | |
| `sort` | [OptionalNullable[components.OpenResponsesRequestSort]](../components/openresponsesrequestsort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | price |
| `max_price` | [Optional[components.OpenResponsesRequestMaxPrice]](../components/openresponsesrequestmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | |
| `preferred_min_throughput` | [OptionalNullable[components.PreferredMinThroughput]](../components/preferredminthroughput.md) | :heavy_minus_sign: | Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 100 |
| `preferred_max_latency` | [OptionalNullable[components.PreferredMaxLatency]](../components/preferredmaxlatency.md) | :heavy_minus_sign: | Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 5 |
@@ -0,0 +1,25 @@
# OpenResponsesRequestSort
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
## Supported Types
### `components.ProviderSort`
```python
value: components.ProviderSort = /* values here */
```
### `components.ProviderSortConfig`
```python
value: components.ProviderSortConfig = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
+2 -1
View File
@@ -7,4 +7,5 @@
| ------------ | ------------ |
| `TEXT` | text |
| `IMAGE` | image |
| `EMBEDDINGS` | embeddings |
| `EMBEDDINGS` | embeddings |
| `AUDIO` | audio |
+1
View File
@@ -26,5 +26,6 @@
| `PARALLEL_TOOL_CALLS` | parallel_tool_calls |
| `INCLUDE_REASONING` | include_reasoning |
| `REASONING` | reasoning |
| `REASONING_EFFORT` | reasoning_effort |
| `WEB_SEARCH_OPTIONS` | web_search_options |
| `VERBOSITY` | verbosity |
+9
View File
@@ -0,0 +1,9 @@
# Partition
## Values
| Name | Value |
| ------- | ------- |
| `MODEL` | model |
| `NONE` | none |
+8
View File
@@ -0,0 +1,8 @@
# Pdf
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| `engine` | [Optional[components.PdfEngine]](../components/pdfengine.md) | :heavy_minus_sign: | N/A |
+10
View File
@@ -0,0 +1,10 @@
# PdfEngine
## Values
| Name | Value |
| ------------- | ------------- |
| `MISTRAL_OCR` | mistral-ocr |
| `PDF_TEXT` | pdf-text |
| `NATIVE` | native |
+12
View File
@@ -0,0 +1,12 @@
# PDFParserEngine
The engine to use for parsing PDF files.
## Values
| Name | Value |
| ------------- | ------------- |
| `MISTRAL_OCR` | mistral-ocr |
| `PDF_TEXT` | pdf-text |
| `NATIVE` | native |
+10
View File
@@ -0,0 +1,10 @@
# PDFParserOptions
Options for PDF parsing.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `engine` | [Optional[components.PDFParserEngine]](../components/pdfparserengine.md) | :heavy_minus_sign: | The engine to use for parsing PDF files. |
@@ -0,0 +1,13 @@
# PercentileLatencyCutoffs
Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
## Fields
| Field | Type | Required | Description |
| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- |
| `p50` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p50 latency (seconds) |
| `p75` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p75 latency (seconds) |
| `p90` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p90 latency (seconds) |
| `p99` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p99 latency (seconds) |
+13
View File
@@ -0,0 +1,13 @@
# PercentileStats
Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.
## Fields
| Field | Type | Required | Description | Example |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `p50` | *float* | :heavy_check_mark: | Median (50th percentile) | 25.5 |
| `p75` | *float* | :heavy_check_mark: | 75th percentile | 35.2 |
| `p90` | *float* | :heavy_check_mark: | 90th percentile | 48.7 |
| `p99` | *float* | :heavy_check_mark: | 99th percentile | 85.3 |
@@ -0,0 +1,13 @@
# PercentileThroughputCutoffs
Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
## Fields
| Field | Type | Required | Description |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `p50` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p50 throughput (tokens/sec) |
| `p75` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p75 throughput (tokens/sec) |
| `p90` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p90 throughput (tokens/sec) |
| `p99` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p99 throughput (tokens/sec) |
+25
View File
@@ -0,0 +1,25 @@
# PreferredMaxLatency
Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `components.PercentileLatencyCutoffs`
```python
value: components.PercentileLatencyCutoffs = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
+25
View File
@@ -0,0 +1,25 @@
# PreferredMinThroughput
Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `components.PercentileThroughputCutoffs`
```python
value: components.PercentileThroughputCutoffs = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
+1
View File
@@ -12,6 +12,7 @@
| `image_token` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
| `image_output` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
| `audio` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
| `audio_output` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
| `web_search` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
-29
View File
@@ -1,29 +0,0 @@
# Prompt
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `List[str]`
```python
value: List[str] = /* values here */
```
### `List[float]`
```python
value: List[float] = /* values here */
```
### `List[List[float]]`
```python
value: List[List[float]] = /* values here */
```
+6 -5
View File
@@ -3,8 +3,9 @@
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `cached_tokens` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `audio_tokens` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `video_tokens` | *Optional[float]* | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- |
| `cached_tokens` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `cache_write_tokens` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `audio_tokens` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `video_tokens` | *Optional[float]* | :heavy_minus_sign: | N/A |
+3 -2
View File
@@ -31,12 +31,12 @@
| `FIREWORKS` | Fireworks |
| `FRIENDLI` | Friendli |
| `GMI_CLOUD` | GMICloud |
| `GO_POMELO` | GoPomelo |
| `GOOGLE` | Google |
| `GOOGLE_AI_STUDIO` | Google AI Studio |
| `GROQ` | Groq |
| `HYPERBOLIC` | Hyperbolic |
| `INCEPTION` | Inception |
| `INCEPTRON` | Inceptron |
| `INFERENCE_NET` | InferenceNet |
| `INFERMATIC` | Infermatic |
| `INFLECTION` | Inflection |
@@ -61,13 +61,14 @@
| `PHALA` | Phala |
| `RELACE` | Relace |
| `SAMBA_NOVA` | SambaNova |
| `SEED` | Seed |
| `SILICON_FLOW` | SiliconFlow |
| `SOURCEFUL` | Sourceful |
| `STEALTH` | Stealth |
| `STREAM_LAKE` | StreamLake |
| `SWITCHPOINT` | Switchpoint |
| `TARGON` | Targon |
| `TOGETHER` | Together |
| `UPSTAGE` | Upstage |
| `VENICE` | Venice |
| `WAND_B` | WandB |
| `XIAOMI` | Xiaomi |
+22
View File
@@ -0,0 +1,22 @@
# ProviderPreferences
Provider routing preferences for the request.
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> | |
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. | |
| `data_collection` | [OptionalNullable[components.DataCollection]](../components/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/><br/>- deny: use only providers which do not collect user data. | allow |
| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true |
| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true |
| `order` | List[[components.ProviderPreferencesOrder](../components/providerpreferencesorder.md)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. | |
| `only` | List[[components.ProviderPreferencesOnly](../components/providerpreferencesonly.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | |
| `ignore` | List[[components.ProviderPreferencesIgnore](../components/providerpreferencesignore.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | |
| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | |
| `sort` | [OptionalNullable[components.ProviderPreferencesSortUnion]](../components/providerpreferencessortunion.md) | :heavy_minus_sign: | N/A | |
| `max_price` | [Optional[components.ProviderPreferencesMaxPrice]](../components/providerpreferencesmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | |
| `preferred_min_throughput` | [OptionalNullable[components.PreferredMinThroughput]](../components/preferredminthroughput.md) | :heavy_minus_sign: | Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 100 |
| `preferred_max_latency` | [OptionalNullable[components.PreferredMaxLatency]](../components/preferredmaxlatency.md) | :heavy_minus_sign: | Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 5 |
@@ -0,0 +1,17 @@
# ProviderPreferencesIgnore
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,14 @@
# ProviderPreferencesMaxPrice
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
| `prompt` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
| `completion` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
| `image` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
| `audio` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
| `request` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
@@ -0,0 +1,17 @@
# ProviderPreferencesOnly
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,17 @@
# ProviderPreferencesOrder
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,9 @@
# ProviderPreferencesPartition
## Values
| Name | Value |
| ------- | ------- |
| `MODEL` | model |
| `NONE` | none |
@@ -0,0 +1,10 @@
# ProviderPreferencesProviderSort
## Values
| Name | Value |
| ------------ | ------------ |
| `PRICE` | price |
| `THROUGHPUT` | throughput |
| `LATENCY` | latency |
@@ -0,0 +1,9 @@
# ProviderPreferencesProviderSortConfig
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `by` | [OptionalNullable[components.ProviderSort]](../components/providersort.md) | :heavy_minus_sign: | N/A | price |
| `partition` | [OptionalNullable[components.ProviderPreferencesPartition]](../components/providerpreferencespartition.md) | :heavy_minus_sign: | N/A | |
@@ -0,0 +1,25 @@
# ProviderPreferencesSortUnion
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
## Supported Types
### `components.ProviderPreferencesProviderSort`
```python
value: components.ProviderPreferencesProviderSort = /* values here */
```
### `components.ProviderSortConfigUnion`
```python
value: components.ProviderSortConfigUnion = /* values here */
```
### `components.SortEnum`
```python
value: components.SortEnum = /* values here */
```
-2
View File
@@ -1,7 +1,5 @@
# ProviderSort
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
## Values
+9
View File
@@ -0,0 +1,9 @@
# ProviderSortConfig
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| `by` | [OptionalNullable[components.ProviderSort]](../components/providersort.md) | :heavy_minus_sign: | N/A | price |
| `partition` | [OptionalNullable[components.Partition]](../components/partition.md) | :heavy_minus_sign: | N/A | |
+10
View File
@@ -0,0 +1,10 @@
# ProviderSortConfigEnum
## Values
| Name | Value |
| ------------ | ------------ |
| `PRICE` | price |
| `THROUGHPUT` | throughput |
| `LATENCY` | latency |
@@ -0,0 +1,17 @@
# ProviderSortConfigUnion
## Supported Types
### `components.ProviderPreferencesProviderSortConfig`
```python
value: components.ProviderPreferencesProviderSortConfig = /* values here */
```
### `components.ProviderSortConfigEnum`
```python
value: components.ProviderSortConfigEnum = /* values here */
```
+17
View File
@@ -0,0 +1,17 @@
# ProviderSortUnion
## Supported Types
### `components.ProviderSort`
```python
value: components.ProviderSort = /* values here */
```
### `components.ProviderSortConfig`
```python
value: components.ProviderSortConfig = /* values here */
```
+18 -15
View File
@@ -5,18 +5,21 @@ Information about a specific model endpoint
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `name` | *str* | :heavy_check_mark: | N/A | |
| `model_name` | *str* | :heavy_check_mark: | N/A | |
| `context_length` | *float* | :heavy_check_mark: | N/A | |
| `pricing` | [components.Pricing](../components/pricing.md) | :heavy_check_mark: | N/A | |
| `provider_name` | [components.ProviderName](../components/providername.md) | :heavy_check_mark: | N/A | OpenAI |
| `tag` | *str* | :heavy_check_mark: | N/A | |
| `quantization` | [Nullable[components.PublicEndpointQuantization]](../components/publicendpointquantization.md) | :heavy_check_mark: | N/A | fp16 |
| `max_completion_tokens` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `max_prompt_tokens` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | N/A | |
| `status` | [Optional[components.EndpointStatus]](../components/endpointstatus.md) | :heavy_minus_sign: | N/A | 0 |
| `uptime_last_30m` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `supports_implicit_caching` | *bool* | :heavy_check_mark: | N/A | |
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | *str* | :heavy_check_mark: | N/A | |
| `model_id` | *str* | :heavy_check_mark: | The unique identifier for the model (permaslug) | openai/gpt-4 |
| `model_name` | *str* | :heavy_check_mark: | N/A | |
| `context_length` | *float* | :heavy_check_mark: | N/A | |
| `pricing` | [components.Pricing](../components/pricing.md) | :heavy_check_mark: | N/A | |
| `provider_name` | [components.ProviderName](../components/providername.md) | :heavy_check_mark: | N/A | OpenAI |
| `tag` | *str* | :heavy_check_mark: | N/A | |
| `quantization` | [Nullable[components.PublicEndpointQuantization]](../components/publicendpointquantization.md) | :heavy_check_mark: | N/A | fp16 |
| `max_completion_tokens` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `max_prompt_tokens` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | N/A | |
| `status` | [Optional[components.EndpointStatus]](../components/endpointstatus.md) | :heavy_minus_sign: | N/A | 0 |
| `uptime_last_30m` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `supports_implicit_caching` | *bool* | :heavy_check_mark: | N/A | |
| `latency_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. | |
| `throughput_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | N/A | |

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