Compare commits

..
Author SHA1 Message Date
speakeasy-github[bot]andspeakeasy-bot 7f812f831d empty commit to trigger [run-tests] workflow 2025-12-04 00:24:18 +00:00
speakeasybot 95cb1260c7 ## Python SDK Changes:
* `open_router.beta.responses.send()`:  `request` **Changed** **Breaking** ⚠️
* `open_router.embeddings.generate()`:  `response.status[200].content[text/event-stream` **Removed** **Breaking** ⚠️
* `open_router.chat.send()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `response.choices.[].message.content.[array].[]` **Changed** **Breaking** ⚠️
* `open_router.credits.get_credits()`:  `response.data` **Added**
* `open_router.parameters.get_parameters()`:  `request.provider` **Changed**
* `open_router.completions.generate()`:  `response` **Changed**
2025-12-04 00:24:10 +00:00
312 changed files with 12326 additions and 31864 deletions
+1 -3
View File
@@ -1,9 +1,7 @@
{
"permissions": {
"allow": [
"Bash(python3:*)",
"Bash(git push:*)",
"Bash(gh pr create:*)"
"Bash(python3:*)"
],
"deny": [],
"ask": []
+84 -382
View File
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
management:
docChecksum: b46bf86766cf18470329da1fb2271f4e
docChecksum: d2e69fbbac1477d094fdfc212c13670c
docVersion: 1.0.0
speakeasyVersion: 1.666.0
generationVersion: 2.768.0
releaseVersion: 0.3.2
configChecksum: 684039465cd4c6f0105466ef2833908d
speakeasyVersion: 1.668.0
generationVersion: 2.770.0
releaseVersion: 0.1.0
configChecksum: fa0d13fb5fd38982a589d64e64b0d87d
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
@@ -29,7 +29,6 @@ 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
@@ -53,27 +52,17 @@ 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
- docs/components/chatcompletionfinishreason.md
- docs/components/chaterrorerror.md
- docs/components/chatgenerationparams.md
- docs/components/chatgenerationparamsdatacollection.md
- docs/components/chatgenerationparamsimageconfig.md
- docs/components/chatgenerationparamsmaxprice.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/chatgenerationparamsstop.md
- docs/components/chatgenerationtokenusage.md
- docs/components/chatmessagecontentitem.md
- docs/components/chatmessagecontentitemaudio.md
@@ -81,14 +70,12 @@ 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
@@ -104,7 +91,18 @@ 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
@@ -119,24 +117,23 @@ generatedFiles:
- 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/image.md
- docs/components/ignore.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/maxprice.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
@@ -148,6 +145,7 @@ 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
@@ -191,17 +189,14 @@ generatedFiles:
- docs/components/openairesponsestoolchoiceunion.md
- docs/components/openairesponsestruncation.md
- docs/components/openresponseseasyinputmessage.md
- docs/components/openresponseseasyinputmessagecontentinputimage.md
- docs/components/openresponseseasyinputmessagecontenttype.md
- docs/components/openresponseseasyinputmessagecontentunion1.md
- docs/components/openresponseseasyinputmessagecontentunion2.md
- docs/components/openresponseseasyinputmessagedetail.md
- docs/components/openresponseseasyinputmessagecontent1.md
- docs/components/openresponseseasyinputmessagecontent2.md
- docs/components/openresponseseasyinputmessageroleassistant.md
- docs/components/openresponseseasyinputmessageroledeveloper.md
- docs/components/openresponseseasyinputmessagerolesystem.md
- docs/components/openresponseseasyinputmessageroleunion.md
- docs/components/openresponseseasyinputmessageroleuser.md
- docs/components/openresponseseasyinputmessagetypemessage.md
- docs/components/openresponseseasyinputmessagetype.md
- docs/components/openresponseserrorevent.md
- docs/components/openresponseserroreventtype.md
- docs/components/openresponsesfunctioncalloutput.md
@@ -219,15 +214,12 @@ generatedFiles:
- docs/components/openresponsesinput.md
- docs/components/openresponsesinput1.md
- docs/components/openresponsesinputmessageitem.md
- docs/components/openresponsesinputmessageitemcontentinputimage.md
- docs/components/openresponsesinputmessageitemcontenttype.md
- docs/components/openresponsesinputmessageitemcontentunion.md
- docs/components/openresponsesinputmessageitemdetail.md
- docs/components/openresponsesinputmessageitemcontent.md
- docs/components/openresponsesinputmessageitemroledeveloper.md
- docs/components/openresponsesinputmessageitemrolesystem.md
- docs/components/openresponsesinputmessageitemroleunion.md
- docs/components/openresponsesinputmessageitemroleuser.md
- docs/components/openresponsesinputmessageitemtypemessage.md
- docs/components/openresponsesinputmessageitemtype.md
- docs/components/openresponseslogprobs.md
- docs/components/openresponsesnonstreamingresponse.md
- docs/components/openresponsesnonstreamingresponsetoolfunction.md
@@ -252,19 +244,6 @@ generatedFiles:
- docs/components/openresponsesreasoningsummarytextdoneeventtype.md
- docs/components/openresponsesreasoningtype.md
- docs/components/openresponsesrequest.md
- docs/components/openresponsesrequestignore.md
- docs/components/openresponsesrequestimageconfig.md
- docs/components/openresponsesrequestmaxprice.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/openresponsesrequestsort.md
- docs/components/openresponsesrequesttoolfunction.md
- docs/components/openresponsesrequesttoolunion.md
- docs/components/openresponsesrequesttype.md
@@ -300,6 +279,7 @@ 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
@@ -315,42 +295,27 @@ 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/plugin.md
- docs/components/pluginfileparser.md
- docs/components/pluginmoderation.md
- docs/components/pluginresponsehealing.md
- docs/components/pluginweb.md
- docs/components/pricing.md
- docs/components/prompt.md
- docs/components/prompttokensdetails.md
- docs/components/provider.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
- docs/components/quantization.md
- docs/components/quantizations.md
- docs/components/reason.md
- docs/components/reasoning.md
- docs/components/reasoningsummarytext.md
@@ -359,11 +324,7 @@ 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
@@ -377,10 +338,7 @@ 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
@@ -401,7 +359,6 @@ 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
@@ -415,7 +372,6 @@ 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
@@ -423,19 +379,10 @@ 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/sortenum.md
- docs/components/stop.md
- docs/components/streamoptions.md
- docs/components/systemmessage.md
- docs/components/systemmessagecontent.md
- docs/components/tokenizer.md
@@ -445,6 +392,7 @@ 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
@@ -475,7 +423,6 @@ 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
@@ -497,20 +444,7 @@ 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
@@ -522,22 +456,15 @@ 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
@@ -552,16 +479,18 @@ 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
@@ -569,43 +498,23 @@ 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/providername.md
- docs/operations/providerresponse.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
@@ -616,13 +525,14 @@ 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
@@ -639,9 +549,8 @@ 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
@@ -666,6 +575,11 @@ 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
@@ -734,20 +648,10 @@ 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
@@ -762,7 +666,6 @@ 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
@@ -774,7 +677,6 @@ 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
@@ -791,7 +693,6 @@ 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
@@ -818,7 +719,6 @@ 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
@@ -826,39 +726,28 @@ 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
@@ -887,10 +776,10 @@ examples:
createResponses:
speakeasy-default-create-responses:
requestBody:
application/json: {"store": false, "service_tier": "auto", "stream": false}
application/json: {"input": [{"type": "message", "role": "user", "content": "Hello, how are you?"}], "tools": [{"type": "function", "name": "get_current_weather", "description": "Get the current weather in a given location", "parameters": {"type": "object", "properties": {"location": {"type": "string"}}}}], "model": "anthropic/claude-4.5-sonnet-20250929", "temperature": 0.7, "top_p": 0.9, "store": false, "service_tier": "auto", "stream": false}
responses:
"200":
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}
application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "status": "completed", "output": [{"id": "msg-abc123", "role": "assistant", "type": "message", "status": "completed", "content": [{"type": "output_text", "text": "Hello! How can I help you today?", "annotations": []}]}], "error": null, "incomplete_details": null, "usage": {"input_tokens": 10, "input_tokens_details": {"cached_tokens": 0}, "output_tokens": 25, "output_tokens_details": {"reasoning_tokens": 0}, "total_tokens": 35}, "max_output_tokens": null, "temperature": null, "top_p": null, "instructions": null, "metadata": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -962,7 +851,7 @@ examples:
createEmbeddings:
speakeasy-default-create-embeddings:
requestBody:
application/json: {"input": "<value>", "model": "Taurus"}
application/json: {"input": "<value>", "model": "Taurus", "provider": {"data_collection": "allow", "zdr": true, "enforce_distillable_text": true, "order": ["OpenAI"], "only": ["OpenAI"], "ignore": ["OpenAI"], "quantizations": ["fp16"], "sort": "price"}}
responses:
"200":
application/json: {"object": "list", "data": [], "model": "Land Cruiser"}
@@ -991,7 +880,7 @@ examples:
speakeasy-default-list-embeddings-models:
responses:
"200":
application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]}
application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "pricing": {"prompt": "0.00003", "completion": "0.00006", "request": "0", "image": "0"}, "context_length": 8192, "architecture": {"tokenizer": "GPT", "instruct_type": "chatml", "modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"context_length": 8192, "max_completion_tokens": 4096, "is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"500":
@@ -1003,7 +892,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", "router": "openrouter/auto", "provider_responses": []}}
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"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"402":
@@ -1031,7 +920,7 @@ examples:
speakeasy-default-get-models:
responses:
"200":
application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]}
application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "pricing": {"prompt": "0.00003", "completion": "0.00006", "request": "0", "image": "0"}, "context_length": 8192, "architecture": {"tokenizer": "GPT", "instruct_type": "chatml", "modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"context_length": 8192, "max_completion_tokens": 4096, "is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"500":
@@ -1040,13 +929,11 @@ examples:
speakeasy-default-list-models-user:
responses:
"200":
application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]}
application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "pricing": {"prompt": "0.00003", "completion": "0.00006", "request": "0", "image": "0"}, "context_length": 8192, "architecture": {"tokenizer": "GPT", "instruct_type": "chatml", "modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"context_length": 8192, "max_completion_tokens": 4096, "is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]}
"401":
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:
@@ -1055,7 +942,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_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}}]}}
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", "request": "0", "image": "0"}, "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"], "status": -3, "uptime_last_30m": 99.5, "supports_implicit_caching": true}]}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
@@ -1064,7 +951,7 @@ examples:
speakeasy-default-list-endpoints-zdr:
responses:
"200":
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}}]}
application/json: {"data": [{"name": "OpenAI: GPT-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006", "request": "0", "image": "0"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens"], "status": 0, "uptime_last_30m": 99.5, "supports_implicit_caching": true}]}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
getParameters:
@@ -1086,7 +973,7 @@ examples:
speakeasy-default-list-providers:
responses:
"200":
application/json: {"data": [{"name": "OpenAI", "slug": "openai", "privacy_policy_url": "https://openai.com/privacy"}]}
application/json: {"data": [{"name": "OpenAI", "slug": "openai", "privacy_policy_url": "https://openai.com/privacy", "terms_of_service_url": "https://openai.com/terms", "status_page_url": "https://status.openai.com"}]}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
list:
@@ -1097,7 +984,7 @@ examples:
offset: "0"
responses:
"200":
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"}]}
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", "expires_at": "2027-12-31T23:59:59Z"}]}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"429":
@@ -1107,10 +994,10 @@ examples:
createKeys:
speakeasy-default-create-keys:
requestBody:
application/json: {"name": "My New API Key"}
application/json: {"name": "My New API Key", "limit": 50, "limit_reset": "monthly", "include_byok_in_limit": true, "expires_at": "2027-12-31T23:59:59Z"}
responses:
"201":
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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"}
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, "expires_at": "2027-12-31T23:59:59Z"}, "key": "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"}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -1123,12 +1010,12 @@ examples:
speakeasy-default-update-keys:
parameters:
path:
hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
hash: "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"
requestBody:
application/json: {}
application/json: {"name": "Updated API Key Name", "disabled": false, "limit": 75, "limit_reset": "daily", "include_byok_in_limit": true}
responses:
"200":
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"}}
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", "expires_at": null}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -1143,7 +1030,7 @@ examples:
speakeasy-default-delete-keys:
parameters:
path:
hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
hash: "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"
responses:
"200":
application/json: {"deleted": true}
@@ -1159,10 +1046,10 @@ examples:
speakeasy-default-get-key:
parameters:
path:
hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
hash: "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"
responses:
"200":
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"}}
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", "expires_at": "2027-12-31T23:59:59Z"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
@@ -1175,7 +1062,7 @@ examples:
speakeasy-default-get-current-key:
responses:
"200":
application/json: {"data": {"label": "sk-or-v1-au7...890", "limit": 100, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "is_free_tier": false, "is_provisioning_key": false, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "rate_limit": {"requests": 1000, "interval": "1h", "note": "This field is deprecated and safe to ignore."}}}
application/json: {"data": {"label": "sk-or-v1-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, "expires_at": "2027-12-31T23:59:59Z", "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":
@@ -1183,7 +1070,7 @@ examples:
exchangeAuthCodeForAPIKey:
speakeasy-default-exchange-auth-code-for-API-key:
requestBody:
application/json: {"code": "auth_code_abc123def456"}
application/json: {"code": "auth_code_abc123def456", "code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", "code_challenge_method": "S256"}
responses:
"200":
application/json: {"key": "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", "user_id": "user_2yOPcMpKoQhcd4bVgSMlELRaIah"}
@@ -1196,7 +1083,7 @@ examples:
createAuthKeysCode:
speakeasy-default-create-auth-keys-code:
requestBody:
application/json: {"callback_url": "https://myapp.com/auth/callback"}
application/json: {"callback_url": "https://myapp.com/auth/callback", "code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM", "code_challenge_method": "S256", "limit": 100}
responses:
"200":
application/json: {"data": {"id": "auth_code_xyz789", "app_id": 12345, "created_at": "2025-08-24T10:30:00Z"}}
@@ -1228,190 +1115,5 @@ 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
releaseNotes: "## Python SDK Changes:\n* `open_router.beta.responses.send()`: `request` **Changed** **Breaking** :warning:\n* `open_router.embeddings.generate()`: `response.status[200].content[text/event-stream` **Removed** **Breaking** :warning:\n* `open_router.chat.send()`: \n * `request` **Changed** **Breaking** :warning:\n * `response.choices.[].message.content.[array].[]` **Changed** **Breaking** :warning:\n* `open_router.credits.get_credits()`: `response.data` **Added**\n* `open_router.parameters.get_parameters()`: `request.provider` **Changed**\n* `open_router.completions.generate()`: `response` **Changed**\n"
+5 -9
View File
@@ -6,7 +6,7 @@ generation:
sdkClassName: OpenRouter
maintainOpenAPIOrder: true
usageSnippets:
optionalPropertyRendering: never
optionalPropertyRendering: withExample
sdkInitStyle: constructor
useClassNamesForArrayFields: true
fixes:
@@ -24,14 +24,13 @@ generation:
sdkHooksConfigAccess: true
schemas:
allOfMergeStrategy: shallowMerge
requestBodyFieldName: ""
requestBodyFieldName: body
tests:
generateTests: false
generateNewTests: true
skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true
python:
version: 0.3.2
version: 0.1.0
additionalDependencies:
dev: {}
main: {}
@@ -39,8 +38,6 @@ python:
- id
- object
- input
- models
- hash
asyncMode: both
authors:
- OpenRouter
@@ -60,12 +57,11 @@ python:
imports:
option: openapi
paths:
callbacks: callbacks
callbacks: ""
errors: errors
operations: operations
shared: components
webhooks: webhooks
inferSSEOverload: true
webhooks: ""
inferUnionDiscriminators: true
inputModelSuffix: input
legacyPyright: false
+677 -6033
View File
File diff suppressed because it is too large Load Diff
-10
View File
@@ -1,10 +0,0 @@
lintVersion: 1.0.0
defaultRuleset: openrouter
rulesets:
openrouter:
rulesets:
- speakeasy-recommended
- speakeasy-generation
rules:
oas3-missing-example:
severity: "off"
+8367 -13656
View File
File diff suppressed because it is too large Load Diff
@@ -1,35 +0,0 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Add HTTP-Referer and X-Title as global parameters
version: 0.0.0
actions:
# Add global parameters for app identification
- target: $
description: Add x-speakeasy-globals for HTTP-Referer and X-Title headers
update:
x-speakeasy-globals:
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
# Add component parameters
- target: $.components
description: Add parameters for app identification headers
update:
parameters:
AppIdentifier:
name: HTTP-Referer
in: header
schema:
type: string
description: |
The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
AppDisplayName:
name: X-Title
in: header
schema:
type: string
description: |
The app display name allows you to customize how your app appears in OpenRouter's dashboard.
@@ -1,10 +0,0 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Add open enums
version: 0.0.0
actions:
- target: $..[?length(@.enum) > 1]
description: Automatically open all enums that have length > 1
update:
x-speakeasy-unknown-values: allow
@@ -1,15 +0,0 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Remove RSS+XML response schemas and related parameters
version: 0.0.0
actions:
- target: $..responses.*.content["application/rss+xml"]
description: Remove application/rss+xml response schemas
remove: true
- target: $..parameters[?@.name == "use_rss"]
description: Remove use_rss parameter
remove: true
- target: $..parameters[?@.name == "use_rss_chat_links"]
description: Remove use_rss_chat_links parameter
remove: true
+13 -26
View File
@@ -1,51 +1,38 @@
speakeasyVersion: 1.666.0
speakeasyVersion: 1.668.0
sources:
-OAS:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:01256c8494de6bfc13c36d82ae316a6a13d402194f844618bcd4d59e34f325f3
sourceBlobDigest: sha256:4c80e48fd5e1cd030e68d664eb93984b4d5946867252ff1755a2bd2a05eccd4e
sourceRevisionDigest: sha256:697f956356ab0195b9a9b9a5106e4ac979caa551709b3614c723df972c661829
sourceBlobDigest: sha256:a286a09ceced7f78a685731aef81d1498b89a6a46f3794219dc93fa2d822853b
tags:
- latest
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:6e8165360ec62cc8b776111afb2e6d8c17e5dd46f2be6e124138a8296e2c7046
sourceBlobDigest: sha256:373dfa5b56ef18b9cdc55a2ad1a5d8b377deabfcc028ab7f940f525b3a3ca9c9
tags:
- latest
- main
- 1.0.0
- speakeasy-sdk-regen-1763684529
targets:
open-router:
source: OpenRouter API
source: -OAS
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:6e8165360ec62cc8b776111afb2e6d8c17e5dd46f2be6e124138a8296e2c7046
sourceBlobDigest: sha256:373dfa5b56ef18b9cdc55a2ad1a5d8b377deabfcc028ab7f940f525b3a3ca9c9
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:0441c6e25f98818e2b2398041d3a974e3f26897c151a3fabfccbc2206640751a
sourceRevisionDigest: sha256:697f956356ab0195b9a9b9a5106e4ac979caa551709b3614c723df972c661829
sourceBlobDigest: sha256:a286a09ceced7f78a685731aef81d1498b89a6a46f3794219dc93fa2d822853b
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.666.0
speakeasyVersion: latest
sources:
OpenRouter API:
-OAS:
inputs:
- location: .speakeasy/in.openapi.yaml
overlays:
- location: .speakeasy/overlays/open-enums.overlay.yaml
- location: .speakeasy/overlays/remove-rss-responses.overlay.yaml
- location: .speakeasy/overlays/add-headers.overlay.yaml
- location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api:main
output: .speakeasy/out.openapi.yaml
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
location: registry.speakeasyapi.dev/openrouter/sdk/-oas
targets:
open-router:
target: python
source: OpenRouter API
source: -OAS
publish:
pypi:
token: $pypi_token
codeSamples:
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-python-code-samples
location: registry.speakeasyapi.dev/openrouter/sdk/-oas-python-code-samples
labelOverride:
fixedValue: Python (SDK)
blocking: false
+6 -10
View File
@@ -1,26 +1,22 @@
workflowVersion: 1.0.0
speakeasyVersion: 1.666.0
speakeasyVersion: latest
sources:
OpenRouter API:
-OAS:
inputs:
- location: .speakeasy/in.openapi.yaml
overlays:
- location: .speakeasy/overlays/open-enums.overlay.yaml
- location: .speakeasy/overlays/remove-rss-responses.overlay.yaml
- location: .speakeasy/overlays/add-headers.overlay.yaml
- location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api:main
output: .speakeasy/out.openapi.yaml
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
location: registry.speakeasyapi.dev/openrouter/sdk/-oas
targets:
open-router:
target: python
source: OpenRouter API
source: -OAS
publish:
pypi:
token: $pypi_token
codeSamples:
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-python-code-samples
location: registry.speakeasyapi.dev/openrouter/sdk/-oas-python-code-samples
labelOverride:
fixedValue: Python (SDK)
blocking: false
+11 -1
View File
@@ -8,4 +8,14 @@ Based on:
### Generated
- [python v0.0.16] .
### Releases
- [PyPI v0.0.16] https://pypi.org/project/openrouter/0.0.16 - .
- [PyPI v0.0.16] https://pypi.org/project/openrouter/0.0.16 - .
## 2025-12-04 00:22:56
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.668.0 (2.770.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.1.0] .
### Releases
- [PyPI v0.1.0] https://pypi.org/project/openrouter/0.1.0 - .
+110 -2
View File
@@ -9,7 +9,61 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.beta.responses.send(service_tier="auto", stream=False)
res = open_router.beta.responses.send(input=[
{
"type": "message",
"role": "user",
"content": "Hello, how are you?",
},
], metadata={
"user_id": "123",
"session_id": "abc-def-ghi",
}, tools=[
{
"type": "function",
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
},
},
},
},
], model="anthropic/claude-4.5-sonnet-20250929", text={
"format_": {
"type": "text",
},
"verbosity": "medium",
}, reasoning={
"summary": "auto",
"enabled": True,
}, temperature=0.7, top_p=0.9, prompt={
"id": "<id>",
"variables": {
"key": {
"type": "input_text",
"text": "Hello, how can I help you?",
},
},
}, service_tier="auto", truncation="auto", stream=False, provider={
"data_collection": "allow",
"zdr": True,
"enforce_distillable_text": True,
"order": [
"OpenAI",
],
"only": [
"OpenAI",
],
"ignore": [
"OpenAI",
],
"quantizations": None,
"sort": "price",
})
with res as event_stream:
for event in event_stream:
@@ -33,7 +87,61 @@ async def main():
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = await open_router.beta.responses.send_async(service_tier="auto", stream=False)
res = await open_router.beta.responses.send_async(input=[
{
"type": "message",
"role": "user",
"content": "Hello, how are you?",
},
], metadata={
"user_id": "123",
"session_id": "abc-def-ghi",
}, tools=[
{
"type": "function",
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
},
},
},
},
], model="anthropic/claude-4.5-sonnet-20250929", text={
"format_": {
"type": "text",
},
"verbosity": "medium",
}, reasoning={
"summary": "auto",
"enabled": True,
}, temperature=0.7, top_p=0.9, prompt={
"id": "<id>",
"variables": {
"key": {
"type": "input_text",
"text": "Hello, how can I help you?",
},
},
}, service_tier="auto", truncation="auto", stream=False, provider={
"data_collection": "allow",
"zdr": True,
"enforce_distillable_text": True,
"order": [
"OpenAI",
],
"only": [
"OpenAI",
],
"ignore": [
"OpenAI",
],
"quantizations": None,
"sort": "price",
})
async with res as event_stream:
async for event in event_stream:
+1 -3
View File
@@ -10,6 +10,4 @@
| `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_details` | List[[components.Schema2](../components/schema2.md)] | :heavy_minus_sign: | N/A |
| `images` | List[[components.Image](../components/image.md)] | :heavy_minus_sign: | N/A |
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
+25 -31
View File
@@ -3,34 +3,28 @@
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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.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 |
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | N/A |
| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | N/A |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `reasoning` | [Optional[components.Reasoning]](../components/reasoning.md) | :heavy_minus_sign: | N/A |
| `response_format` | [Optional[components.ResponseFormat]](../components/responseformat.md) | :heavy_minus_sign: | N/A |
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `stop` | [OptionalNullable[components.Stop]](../components/stop.md) | :heavy_minus_sign: | N/A |
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../components/chatstreamoptions.md) | :heavy_minus_sign: | N/A |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `tools` | List[[components.ToolDefinitionJSON](../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `debug` | [Optional[components.Debug]](../components/debug.md) | :heavy_minus_sign: | N/A |
| `image_config` | Dict[str, [components.ChatGenerationParamsImageConfig](../components/chatgenerationparamsimageconfig.md)] | :heavy_minus_sign: | N/A |
| `modalities` | List[[components.Modality](../components/modality.md)] | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| `messages` | List[[components.Message](../components/message.md)] | :heavy_check_mark: | N/A |
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | N/A |
| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | N/A |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `reasoning` | [Optional[components.Reasoning]](../components/reasoning.md) | :heavy_minus_sign: | N/A |
| `response_format` | [Optional[components.ChatGenerationParamsResponseFormatUnion]](../components/chatgenerationparamsresponseformatunion.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 |
| `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 |
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `debug` | [Optional[components.Debug]](../components/debug.md) | :heavy_minus_sign: | N/A |
@@ -1,9 +0,0 @@
# ChatGenerationParamsDataCollection
## Values
| Name | Value |
| ------- | ------- |
| `DENY` | deny |
| `ALLOW` | allow |
@@ -1,9 +0,0 @@
# ChatGenerationParamsEngine
## Values
| Name | Value |
| -------- | -------- |
| `NATIVE` | native |
| `EXA` | exa |
@@ -1,17 +0,0 @@
# ChatGenerationParamsImageConfig
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `float`
```python
value: float = /* values here */
```
@@ -1,14 +0,0 @@
# ChatGenerationParamsMaxPrice
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 |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `prompt` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `completion` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `image` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `audio` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `request` | *Optional[Any]* | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# ChatGenerationParamsPdf
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `engine` | [Optional[components.ChatGenerationParamsPdfEngine]](../components/chatgenerationparamspdfengine.md) | :heavy_minus_sign: | N/A |
@@ -1,10 +0,0 @@
# ChatGenerationParamsPdfEngine
## Values
| Name | Value |
| ------------- | ------------- |
| `MISTRAL_OCR` | mistral-ocr |
| `PDF_TEXT` | pdf-text |
| `NATIVE` | native |
@@ -1,10 +0,0 @@
# 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 |
@@ -1,10 +0,0 @@
# ChatGenerationParamsPluginFileParser
## Fields
| 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 |
@@ -1,8 +0,0 @@
# ChatGenerationParamsPluginModeration
## Fields
| Field | Type | Required | Description |
| ----------------------- | ----------------------- | ----------------------- | ----------------------- |
| `id` | *Literal["moderation"]* | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatGenerationParamsPluginResponseHealing
## Fields
| Field | Type | Required | Description |
| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- |
| `id` | *Literal["response-healing"]* | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
@@ -1,35 +0,0 @@
# ChatGenerationParamsPluginUnion
## Supported Types
### `components.ChatGenerationParamsPluginAutoRouter`
```python
value: components.ChatGenerationParamsPluginAutoRouter = /* values here */
```
### `components.ChatGenerationParamsPluginModeration`
```python
value: components.ChatGenerationParamsPluginModeration = /* values here */
```
### `components.ChatGenerationParamsPluginWeb`
```python
value: components.ChatGenerationParamsPluginWeb = /* values here */
```
### `components.ChatGenerationParamsPluginFileParser`
```python
value: components.ChatGenerationParamsPluginFileParser = /* values here */
```
### `components.ChatGenerationParamsPluginResponseHealing`
```python
value: components.ChatGenerationParamsPluginResponseHealing = /* values here */
```
@@ -1,11 +0,0 @@
# 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 |
@@ -1,17 +0,0 @@
# ChatGenerationParamsPreferredMaxLatencyUnion
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `components.ChatGenerationParamsPreferredMaxLatency`
```python
value: components.ChatGenerationParamsPreferredMaxLatency = /* values here */
```
@@ -1,11 +0,0 @@
# 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 |
@@ -1,17 +0,0 @@
# ChatGenerationParamsPreferredMinThroughputUnion
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `components.ChatGenerationParamsPreferredMinThroughput`
```python
value: components.ChatGenerationParamsPreferredMinThroughput = /* values here */
```
@@ -1,4 +1,4 @@
# ResponseFormatJSONObject
# ChatGenerationParamsResponseFormatJSONObject
## Fields
@@ -1,4 +1,4 @@
# ResponseFormatPython
# ChatGenerationParamsResponseFormatPython
## Fields
@@ -1,4 +1,4 @@
# ResponseFormatText
# ChatGenerationParamsResponseFormatText
## Fields
@@ -0,0 +1,35 @@
# 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 */
```
@@ -1,9 +0,0 @@
# ChatGenerationParamsRoute
## Values
| Name | Value |
| ---------- | ---------- |
| `FALLBACK` | fallback |
| `SORT` | sort |
@@ -1,4 +1,4 @@
# Stop
# ChatGenerationParamsStop
## Supported Types
@@ -3,7 +3,7 @@
## Fields
| 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 |
| 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 |
+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.ChatMessageTokenLogprobTopLogprob](../components/chatmessagetokenlogprobtoplogprob.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.TopLogprob](../components/toplogprob.md)] | :heavy_check_mark: | N/A |
@@ -1,10 +0,0 @@
# 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 |
+1 -2
View File
@@ -9,5 +9,4 @@
| `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 |
| `reasoning_details` | List[[components.Schema2](../components/schema2.md)] | :heavy_minus_sign: | N/A |
| `tool_calls` | List[[components.ChatStreamingMessageToolCall](../components/chatstreamingmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
+13
View File
@@ -0,0 +1,13 @@
# 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
@@ -0,0 +1,28 @@
# 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 |
@@ -0,0 +1,8 @@
# CompletionCreateParamsResponseFormatJSONObject
## Fields
| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `type` | *Literal["json_object"]* | :heavy_check_mark: | N/A |
@@ -0,0 +1,8 @@
# CompletionCreateParamsResponseFormatPython
## Fields
| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `type` | *Literal["python"]* | :heavy_check_mark: | N/A |
@@ -0,0 +1,8 @@
# CompletionCreateParamsResponseFormatText
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
@@ -0,0 +1,35 @@
# 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 */
```
@@ -1,4 +1,4 @@
# OpenResponsesRequestImageConfig
# CompletionCreateParamsStop
## Supported Types
@@ -9,9 +9,9 @@
value: str = /* values here */
```
### `float`
### `List[str]`
```python
value: float = /* values here */
value: List[str] = /* values here */
```
+10
View File
@@ -0,0 +1,10 @@
# CompletionFinishReason
## Values
| Name | Value |
| ---------------- | ---------------- |
| `STOP` | stop |
| `LENGTH` | length |
| `CONTENT_FILTER` | content_filter |
+11
View File
@@ -0,0 +1,11 @@
# 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
@@ -0,0 +1,15 @@
# 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
@@ -0,0 +1,10 @@
# 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 |
+4 -5
View File
@@ -5,9 +5,8 @@
| Name | Value |
| --------- | --------- |
| `XHIGH` | xhigh |
| `HIGH` | high |
| `MEDIUM` | medium |
| `LOW` | low |
| `NONE` | none |
| `MINIMAL` | minimal |
| `NONE` | none |
| `LOW` | low |
| `MEDIUM` | medium |
| `HIGH` | high |
-8
View File
@@ -1,8 +0,0 @@
# IDAutoRouter
## Values
| Name | Value |
| ------------- | ------------- |
| `AUTO_ROUTER` | auto-router |
-8
View File
@@ -1,8 +0,0 @@
# Image
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `image_url` | [components.AssistantMessageImageURL](../components/assistantmessageimageurl.md) | :heavy_check_mark: | N/A |
@@ -1,4 +1,4 @@
# ChatMessageContentItemImageImageURL
# ImageURL
## Fields
-11
View File
@@ -1,11 +0,0 @@
# 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 |
+14
View File
@@ -0,0 +1,14 @@
# MaxPrice
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 |
| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- |
| `prompt` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
| `completion` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
| `image` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
| `audio` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
| `request` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
-9
View File
@@ -1,9 +0,0 @@
# Modality
## Values
| Name | Value |
| ------- | ------- |
| `TEXT` | text |
| `IMAGE` | image |
+1 -2
View File
@@ -19,5 +19,4 @@ 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/>} |
| `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 |
| `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/>} |
@@ -5,7 +5,6 @@
| Name | Value |
| --------- | --------- |
| `XHIGH` | xhigh |
| `HIGH` | high |
| `MEDIUM` | medium |
| `LOW` | low |
@@ -3,8 +3,8 @@
## Fields
| 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 |
| 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 |
@@ -1,4 +1,4 @@
# OpenResponsesInputMessageItemContentUnion
# OpenResponsesEasyInputMessageContent1
## Supported Types
@@ -9,10 +9,10 @@
value: components.ResponseInputText = /* values here */
```
### `components.OpenResponsesInputMessageItemContentInputImage`
### `components.ResponseInputImage`
```python
value: components.OpenResponsesInputMessageItemContentInputImage = /* values here */
value: components.ResponseInputImage = /* values here */
```
### `components.ResponseInputFile`
@@ -27,9 +27,3 @@ value: components.ResponseInputFile = /* values here */
value: components.ResponseInputAudio = /* values here */
```
### `components.ResponseInputVideo`
```python
value: components.ResponseInputVideo = /* values here */
```
@@ -0,0 +1,17 @@
# OpenResponsesEasyInputMessageContent2
## Supported Types
### `List[components.OpenResponsesEasyInputMessageContent1]`
```python
value: List[components.OpenResponsesEasyInputMessageContent1] = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -1,12 +0,0 @@
# 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 |
@@ -1,8 +0,0 @@
# OpenResponsesEasyInputMessageContentType
## Values
| Name | Value |
| ------------- | ------------- |
| `INPUT_IMAGE` | input_image |
@@ -1,17 +0,0 @@
# OpenResponsesEasyInputMessageContentUnion2
## Supported Types
### `List[components.OpenResponsesEasyInputMessageContentUnion1]`
```python
value: List[components.OpenResponsesEasyInputMessageContentUnion1] = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -1,10 +0,0 @@
# OpenResponsesEasyInputMessageDetail
## Values
| Name | Value |
| ------ | ------ |
| `AUTO` | auto |
| `HIGH` | high |
| `LOW` | low |
@@ -1,4 +1,4 @@
# OpenResponsesEasyInputMessageTypeMessage
# OpenResponsesEasyInputMessageType
## Values
@@ -3,9 +3,9 @@
## Fields
| 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 |
| 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 |
@@ -1,4 +1,4 @@
# OpenResponsesEasyInputMessageContentUnion1
# OpenResponsesInputMessageItemContent
## Supported Types
@@ -9,10 +9,10 @@
value: components.ResponseInputText = /* values here */
```
### `components.OpenResponsesEasyInputMessageContentInputImage`
### `components.ResponseInputImage`
```python
value: components.OpenResponsesEasyInputMessageContentInputImage = /* values here */
value: components.ResponseInputImage = /* values here */
```
### `components.ResponseInputFile`
@@ -27,9 +27,3 @@ value: components.ResponseInputFile = /* values here */
value: components.ResponseInputAudio = /* values here */
```
### `components.ResponseInputVideo`
```python
value: components.ResponseInputVideo = /* values here */
```
@@ -1,12 +0,0 @@
# 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 |
@@ -1,8 +0,0 @@
# OpenResponsesInputMessageItemContentType
## Values
| Name | Value |
| ------------- | ------------- |
| `INPUT_IMAGE` | input_image |
@@ -1,10 +0,0 @@
# OpenResponsesInputMessageItemDetail
## Values
| Name | Value |
| ------ | ------ |
| `AUTO` | auto |
| `HIGH` | high |
| `LOW` | low |
@@ -1,4 +1,4 @@
# OpenResponsesInputMessageItemTypeMessage
# OpenResponsesInputMessageItemType
## Values
@@ -11,8 +11,7 @@ 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` | [components.OpenAIResponsesResponseStatus](../components/openairesponsesresponsestatus.md) | :heavy_check_mark: | N/A | |
| `completed_at` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `status` | [Optional[components.OpenAIResponsesResponseStatus]](../components/openairesponsesresponsestatus.md) | :heavy_minus_sign: | 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 | |
@@ -20,14 +19,12 @@ 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` | [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/>} |
| `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/>} |
| `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,11 +3,10 @@
## Values
| 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 |
| 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 |
+3 -10
View File
@@ -20,13 +20,7 @@ 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 | |
@@ -37,7 +31,6 @@ Request schema for Responses endpoint
| `service_tier` | [Optional[components.ServiceTier]](../components/servicetier.md) | :heavy_minus_sign: | N/A | |
| `truncation` | [OptionalNullable[components.Truncation]](../components/truncation.md) | :heavy_minus_sign: | N/A | auto |
| `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. | |
| `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. | |
| `provider` | [OptionalNullable[components.Provider]](../components/provider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
| `plugins` | List[[components.Plugin](../components/plugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. | |
@@ -1,9 +0,0 @@
# OpenResponsesRequestEngine
## Values
| Name | Value |
| -------- | -------- |
| `NATIVE` | native |
| `EXA` | exa |
@@ -1,17 +0,0 @@
# OpenResponsesRequestIgnore
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -1,14 +0,0 @@
# OpenResponsesRequestMaxPrice
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 |
@@ -1,17 +0,0 @@
# OpenResponsesRequestOnly
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -1,17 +0,0 @@
# OpenResponsesRequestOrder
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -1,8 +0,0 @@
# OpenResponsesRequestPdf
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `engine` | [Optional[components.OpenResponsesRequestPdfEngine]](../components/openresponsesrequestpdfengine.md) | :heavy_minus_sign: | N/A |
@@ -1,10 +0,0 @@
# OpenResponsesRequestPdfEngine
## Values
| Name | Value |
| ------------- | ------------- |
| `MISTRAL_OCR` | mistral-ocr |
| `PDF_TEXT` | pdf-text |
| `NATIVE` | native |
@@ -1,10 +0,0 @@
# 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/>] |
@@ -1,10 +0,0 @@
# OpenResponsesRequestPluginFileParser
## 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. |
| `pdf` | [Optional[components.PDFParserOptions]](../components/pdfparseroptions.md) | :heavy_minus_sign: | Options for PDF parsing. |
@@ -1,9 +0,0 @@
# OpenResponsesRequestPluginResponseHealing
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `id` | [components.IDResponseHealing](../components/idresponsehealing.md) | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the response-healing plugin for this request. Defaults to true. |
@@ -1,35 +0,0 @@
# OpenResponsesRequestPluginUnion
## Supported Types
### `components.OpenResponsesRequestPluginAutoRouter`
```python
value: components.OpenResponsesRequestPluginAutoRouter = /* values here */
```
### `components.OpenResponsesRequestPluginModeration`
```python
value: components.OpenResponsesRequestPluginModeration = /* values here */
```
### `components.OpenResponsesRequestPluginWeb`
```python
value: components.OpenResponsesRequestPluginWeb = /* values here */
```
### `components.OpenResponsesRequestPluginFileParser`
```python
value: components.OpenResponsesRequestPluginFileParser = /* values here */
```
### `components.OpenResponsesRequestPluginResponseHealing`
```python
value: components.OpenResponsesRequestPluginResponseHealing = /* values here */
```
@@ -1,12 +0,0 @@
# OpenResponsesRequestPluginWeb
## 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.WebSearchEngine]](../components/websearchengine.md) | :heavy_minus_sign: | The search engine to use for web search. |
@@ -1,22 +0,0 @@
# OpenResponsesRequestProvider
When multiple model providers are available, optionally indicate your routing preference.
## 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.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 |
@@ -1,11 +0,0 @@
# OpenResponsesRequestRoute
Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria.
## Values
| Name | Value |
| ---------- | ---------- |
| `FALLBACK` | fallback |
| `SORT` | sort |
@@ -1,25 +0,0 @@
# 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 */
```
+1 -2
View File
@@ -7,5 +7,4 @@
| ------------ | ------------ |
| `TEXT` | text |
| `IMAGE` | image |
| `EMBEDDINGS` | embeddings |
| `AUDIO` | audio |
| `EMBEDDINGS` | embeddings |
-1
View File
@@ -26,6 +26,5 @@
| `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
@@ -1,9 +0,0 @@
# Partition
## Values
| Name | Value |
| ------- | ------- |
| `MODEL` | model |
| `NONE` | none |
-12
View File
@@ -1,12 +0,0 @@
# 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
@@ -1,10 +0,0 @@
# 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. |
@@ -1,13 +0,0 @@
# 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
@@ -1,13 +0,0 @@
# 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 |
@@ -1,13 +0,0 @@
# 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) |

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