Compare commits

...
22 Commits
Author SHA1 Message Date
OpenRouter Team 82bbe75d87 Commits included in this export:
- 68922847c2969b773887310eb7aa9a814e199c5a
  - 729ee2338c39df22461526153e7f4ba868fd498e
  - e1074ff86fccf5e48406b7595298873106d3cc5a
  - 123bbdaf841d299162a82ee2573adfbb70a45b8f
  - ac457b8a8dad98fdf5ddcae8dd4711361cea3084
  - ea825199f4c59dd68fec01cf8d18a582963c9f25
  - 4d48e4f6bb936e785787314a965298da6b78fea0
  - 718729a573ee98893a4408d5a52ab4686661fe54
  - b867adcde6b64f3f2a11c4626254b39098e4b0b4
  - 21912c097b4066d109766c6b4492826595cd57c5
  - bc1ed85adc976a4634ca8a41b82e4fc2c39a864f
  - d145c89c941937a312ed1357590d2bfda9a3603d
  - 12f05b5dee397ead47cfcd545a7a2e3c7ff57524
  - dd28f75a19a015809797c7abf3f8758f7c37262e
  - c96e569781e07ab44172d9c69940ec17bafd81f4
  - c9d5a90e3c2b5077a2bdd49773f1a46d1a5a79c7
  - 58b08f87116ceab9076de2fdc0a4c74c919b44c4

GitOrigin-RevId: 68922847c2969b773887310eb7aa9a814e199c5a
2026-01-29 18:16:59 +00:00
robert-j-yandGitHub 0c791b04d1 chore: sync from monorepo (#36) 2026-01-21 17:28:27 -08:00
OpenRouter Team 5f2c0ee2ea Project import generated by Copybara.
GitOrigin-RevId: 2592bdc8b4b7c695a3d689390aedc9a42914acc8
2026-01-22 01:26:28 +00:00
robert-j-yandGitHub 5832c0495b chore: regenerate SDK with version 0.1.2 (#34) 2026-01-21 13:47:48 -08:00
Robert Yeakel f5dfc30997 chore: regenerate SDK with version 0.1.2 2026-01-21 13:45:46 -08:00
Shashank GoyalandGitHub a56ffbf5f3 Update speakeasy gen.yaml (#33) 2026-01-21 16:17:11 -05:00
Shashank Goyal cc2b002c5c Update speakeasy gen.yaml 2026-01-21 16:16:16 -05:00
Shashank Goyal 9774c726fd Bring project back to correct version number 2026-01-21 16:03:44 -05:00
Matt AppersonandGitHub 3a40848aab fix: update OpenAPI spec with router field (#32) 2026-01-13 20:40:08 -05:00
Matt AppersonandGitHub f190e3f950 feat: fix types and add reasoning_details to chat responses (#27) 2025-12-16 16:16:22 -05:00
Matt AppersonandGitHub d433ce35e8 chore: regenerate Python SDK with updated OpenAPI spec (#26) 2025-12-12 15:17:08 -05:00
Matt Apperson 61e5216764 chore: regenerate Python SDK with updated OpenAPI spec
Updates include:
- Updated OpenAPI spec with new component schemas
- Restructured component documentation with nested parameter types
- Added new components for plugin and provider configurations
- Updated chat generation params and response request structures
- Version bump and dependency updates
2025-12-12 15:13:12 -05:00
Matt AppersonandGitHub 67ef52b03e chore: Python SDK updates and regeneration (#24) 2025-12-04 13:09:00 -05:00
Matt Apperson d4474da1b8 more updates 2025-12-04 13:07:08 -05:00
Matt Apperson aed8199b2b updates 2025-12-04 13:07:01 -05:00
Matt AppersonandGitHub 06b2ccc54a chore: regenerate Python SDK v0.1.1 with new overlays (#23) 2025-12-04 10:48:48 -05:00
Matt Apperson 6cd0d2a76d latest updates 2025-12-04 10:46:19 -05:00
Matt AppersonandGitHub a1dae775cb chore: regenerate Python SDK v0.0.17 (#18) 2025-11-18 13:59:14 -05:00
Matt Apperson 10a76ba502 chore: regenerate SDK to v0.0.19 with speakeasy 2025-11-18 13:58:48 -05:00
Matt Apperson f4ffd51f40 chore: regenerate Python SDK v0.0.17
Update Python SDK with Speakeasy regeneration:
- Bump version from 0.0.16 to 0.0.17
- Refactor OpenAPI schema definitions:
  - Inline BigNumberUnion type into usage sites
  - Reorganize ProviderName enum location
  - Simplify provider order/only/ignore array types
  - Add plugins schema definitions
- Update gen.lock with new configChecksum
2025-11-18 13:56:41 -05:00
Matt AppersonandGitHub 20c63f6f13 feat: add monorepo sync notification workflow (#17) 2025-11-15 16:16:37 -05:00
Matt Apperson 0f9cb9787a feat: add monorepo sync notification workflow
Automatically notifies openrouter-web monorepo when changes are pushed to main.
This triggers the subtree sync workflow to create a PR with updates.

Requires MONOREPO_SYNC_TOKEN secret to be configured.
2025-11-15 15:53:15 -05:00
367 changed files with 40769 additions and 12018 deletions
+3 -1
View File
@@ -1,7 +1,9 @@
{
"permissions": {
"allow": [
"Bash(python3:*)"
"Bash(python3:*)",
"Bash(git push:*)",
"Bash(gh pr create:*)"
],
"deny": [],
"ask": []
+46
View File
@@ -0,0 +1,46 @@
name: Notify Monorepo of Changes
on:
push:
branches:
- main
jobs:
notify-monorepo:
runs-on: ubuntu-latest
steps:
- name: Send repository dispatch to monorepo
run: |
# Determine which event type to send based on repository name
REPO_NAME="${GITHUB_REPOSITORY#*/}" # Gets 'python-sdk' from 'OpenRouterTeam/python-sdk'
case "$REPO_NAME" in
"typescript-sdk")
EVENT_TYPE="sync-typescript-sdk"
;;
"python-sdk")
EVENT_TYPE="sync-python-sdk"
;;
"ai-sdk-provider")
EVENT_TYPE="sync-ai-sdk-provider"
;;
"cli")
EVENT_TYPE="sync-cli"
;;
*)
echo "Unknown repository: $REPO_NAME"
exit 1
;;
esac
echo "Sending repository_dispatch event: $EVENT_TYPE"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.MONOREPO_SYNC_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/OpenRouterTeam/openrouter-web/dispatches \
-d "{\"event_type\":\"$EVENT_TYPE\",\"client_payload\":{\"repository\":\"$GITHUB_REPOSITORY\",\"ref\":\"$GITHUB_REF\",\"sha\":\"$GITHUB_SHA\"}}"
echo "✅ Notification sent to monorepo"
+411 -89
View File
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
management:
docChecksum: b1b97e85c6e3464e1fd6e2163c4ebc87
docChecksum: 8e4409198e29bd1054772727ad1cd368
docVersion: 1.0.0
speakeasyVersion: 1.658.1
generationVersion: 2.755.6
releaseVersion: 0.0.16
configChecksum: bccceb456c96a46bcbe65fdff6bd5e1f
speakeasyVersion: 1.666.0
generationVersion: 2.768.0
releaseVersion: 0.4.0
configChecksum: 3a0d4d70223d25bf75028237ebd7e079
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
@@ -15,7 +15,7 @@ features:
acceptHeaders: 3.0.0
additionalDependencies: 1.0.0
constsAndDefaults: 1.0.5
core: 5.23.8
core: 5.23.13
defaultEnabledRetries: 0.2.0
deprecations: 3.0.2
devContainers: 3.0.0
@@ -27,15 +27,17 @@ features:
globalSecurityCallbacks: 1.0.0
globalSecurityFlattening: 1.0.0
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
nullables: 1.0.1
openEnums: 1.0.1
responseFormat: 1.0.1
retries: 3.0.2
sdkHooks: 1.1.0
retries: 3.0.3
sdkHooks: 1.2.0
serverEvents: 1.0.11
serverEventsSentinels: 0.1.0
serverIDs: 3.0.0
@@ -51,28 +53,29 @@ 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/chatgenerationparamsresponseformatjsonobject.md
- docs/components/chatgenerationparamsresponseformatpython.md
- docs/components/chatgenerationparamsresponseformattext.md
- docs/components/chatgenerationparamsresponseformatunion.md
- docs/components/chatgenerationparamsstop.md
- docs/components/chatgenerationparamsimageconfig.md
- docs/components/chatgenerationtokenusage.md
- docs/components/chatmessagecontentitem.md
- docs/components/chatmessagecontentitemaudio.md
- docs/components/chatmessagecontentitemaudioformat.md
- docs/components/chatmessagecontentitemaudioinputaudio.md
- 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
@@ -88,22 +91,15 @@ 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/completion.md
- docs/components/completiontokensdetails.md
- docs/components/completionusage.md
- docs/components/costdetails.md
- docs/components/createchargerequest.md
- docs/components/datacollection.md
- docs/components/debug.md
- docs/components/defaultparameters.md
- docs/components/developermessage.md
- docs/components/developermessagecontent.md
- docs/components/edgenetworktimeoutresponseerrordata.md
- docs/components/effort.md
- docs/components/endpointstatus.md
@@ -113,22 +109,22 @@ 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/ignore.md
- docs/components/image.md
- docs/components/imagegenerationstatus.md
- docs/components/imageurl.md
- docs/components/inputmodality.md
- docs/components/inputtokensdetails.md
- docs/components/instructtype.md
- docs/components/internalserverresponseerrordata.md
- docs/components/jsonschemaconfig.md
- docs/components/listendpointsresponse.md
- docs/components/maxprice.md
- docs/components/logprob.md
- docs/components/message.md
- docs/components/messagecontent.md
- docs/components/messagedeveloper.md
- docs/components/modality.md
- docs/components/model.md
- docs/components/modelarchitecture.md
- docs/components/modelarchitectureinstructtype.md
@@ -140,7 +136,6 @@ generatedFiles:
- docs/components/namedtoolchoicefunction.md
- docs/components/notfoundresponseerrordata.md
- docs/components/object.md
- docs/components/only.md
- docs/components/openairesponsesannotation.md
- docs/components/openairesponsesincludable.md
- docs/components/openairesponsesincompletedetails.md
@@ -184,14 +179,17 @@ generatedFiles:
- docs/components/openairesponsestoolchoiceunion.md
- docs/components/openairesponsestruncation.md
- docs/components/openresponseseasyinputmessage.md
- docs/components/openresponseseasyinputmessagecontent1.md
- docs/components/openresponseseasyinputmessagecontent2.md
- docs/components/openresponseseasyinputmessagecontentinputimage.md
- docs/components/openresponseseasyinputmessagecontenttype.md
- docs/components/openresponseseasyinputmessagecontentunion1.md
- docs/components/openresponseseasyinputmessagecontentunion2.md
- docs/components/openresponseseasyinputmessagedetail.md
- docs/components/openresponseseasyinputmessageroleassistant.md
- docs/components/openresponseseasyinputmessageroledeveloper.md
- docs/components/openresponseseasyinputmessagerolesystem.md
- docs/components/openresponseseasyinputmessageroleunion.md
- docs/components/openresponseseasyinputmessageroleuser.md
- docs/components/openresponseseasyinputmessagetype.md
- docs/components/openresponseseasyinputmessagetypemessage.md
- docs/components/openresponseserrorevent.md
- docs/components/openresponseserroreventtype.md
- docs/components/openresponsesfunctioncalloutput.md
@@ -209,12 +207,15 @@ generatedFiles:
- docs/components/openresponsesinput.md
- docs/components/openresponsesinput1.md
- docs/components/openresponsesinputmessageitem.md
- docs/components/openresponsesinputmessageitemcontent.md
- docs/components/openresponsesinputmessageitemcontentinputimage.md
- docs/components/openresponsesinputmessageitemcontenttype.md
- docs/components/openresponsesinputmessageitemcontentunion.md
- docs/components/openresponsesinputmessageitemdetail.md
- docs/components/openresponsesinputmessageitemroledeveloper.md
- docs/components/openresponsesinputmessageitemrolesystem.md
- docs/components/openresponsesinputmessageitemroleunion.md
- docs/components/openresponsesinputmessageitemroleuser.md
- docs/components/openresponsesinputmessageitemtype.md
- docs/components/openresponsesinputmessageitemtypemessage.md
- docs/components/openresponseslogprobs.md
- docs/components/openresponsesnonstreamingresponse.md
- docs/components/openresponsesnonstreamingresponsetoolfunction.md
@@ -239,6 +240,12 @@ 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/openresponsesrequestsort.md
- docs/components/openresponsesrequesttoolfunction.md
- docs/components/openresponsesrequesttoolunion.md
- docs/components/openresponsesrequesttype.md
@@ -274,7 +281,6 @@ generatedFiles:
- docs/components/openresponseswebsearchtool.md
- docs/components/openresponseswebsearchtoolfilters.md
- docs/components/openresponseswebsearchtooltype.md
- docs/components/order.md
- docs/components/outputitemimagegenerationcall.md
- docs/components/outputitemimagegenerationcalltype.md
- docs/components/outputmessage.md
@@ -290,21 +296,45 @@ 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/plugin.md
- docs/components/pluginautorouter.md
- docs/components/pluginfileparser.md
- docs/components/pluginmoderation.md
- docs/components/pluginresponsehealing.md
- docs/components/pluginweb.md
- docs/components/preferredmaxlatency.md
- docs/components/preferredminthroughput.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
@@ -317,7 +347,11 @@ generatedFiles:
- docs/components/reasoningtextcontent.md
- docs/components/reasoningtextcontenttype.md
- docs/components/requesttimeoutresponseerrordata.md
- docs/components/responseformat.md
- docs/components/responseformatjsonobject.md
- docs/components/responseformatjsonschema.md
- docs/components/responseformatpython.md
- docs/components/responseformattext.md
- docs/components/responseformattextconfig.md
- docs/components/responseformattextgrammar.md
- docs/components/responseinputaudio.md
@@ -331,7 +365,10 @@ generatedFiles:
- docs/components/responseinputimagetype.md
- docs/components/responseinputtext.md
- docs/components/responseinputtexttype.md
- docs/components/responseinputvideo.md
- docs/components/responseinputvideotype.md
- docs/components/responseoutputtext.md
- docs/components/responseoutputtexttoplogprob.md
- docs/components/responseoutputtexttype.md
- docs/components/responseserrorfield.md
- docs/components/responsesformatjsonobject.md
@@ -352,6 +389,7 @@ generatedFiles:
- docs/components/responsesoutputitemfunctioncallstatusunion.md
- docs/components/responsesoutputitemfunctioncalltype.md
- docs/components/responsesoutputitemreasoning.md
- docs/components/responsesoutputitemreasoningformat.md
- docs/components/responsesoutputitemreasoningstatuscompleted.md
- docs/components/responsesoutputitemreasoningstatusincomplete.md
- docs/components/responsesoutputitemreasoningstatusinprogress.md
@@ -365,6 +403,7 @@ generatedFiles:
- docs/components/responsesoutputmessagestatusinprogress.md
- docs/components/responsesoutputmessagestatusunion.md
- docs/components/responsesoutputmessagetype.md
- docs/components/responsesoutputmodality.md
- docs/components/responsessearchcontextsize.md
- docs/components/responseswebsearchcalloutput.md
- docs/components/responseswebsearchcalloutputtype.md
@@ -372,11 +411,32 @@ generatedFiles:
- docs/components/responseswebsearchuserlocationtype.md
- docs/components/responsetextconfig.md
- docs/components/responsetextconfigverbosity.md
- docs/components/route.md
- docs/components/schema0.md
- docs/components/schema10.md
- docs/components/schema14.md
- docs/components/schema15.md
- docs/components/schema15union.md
- docs/components/schema17.md
- docs/components/schema17autorouter.md
- docs/components/schema17fileparser.md
- docs/components/schema17moderation.md
- docs/components/schema17responsehealing.md
- docs/components/schema17web.md
- docs/components/schema19.md
- docs/components/schema19reasoningencrypted.md
- docs/components/schema19reasoningsummary.md
- docs/components/schema19reasoningtext.md
- docs/components/schema21.md
- docs/components/schema3.md
- docs/components/schema5.md
- docs/components/schema5enum.md
- docs/components/schema8.md
- docs/components/security.md
- docs/components/servicetier.md
- docs/components/serviceunavailableresponseerrordata.md
- docs/components/sort.md
- docs/components/streamoptions.md
- docs/components/sortenum.md
- docs/components/stop.md
- docs/components/systemmessage.md
- docs/components/systemmessagecontent.md
- docs/components/tokenizer.md
@@ -386,9 +446,9 @@ 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
- docs/components/type.md
- docs/components/typeresponsecompleted.md
- docs/components/typeresponsecontentpartadded.md
@@ -414,7 +474,9 @@ generatedFiles:
- docs/components/usermessage.md
- docs/components/usermessagecontent.md
- docs/components/variables.md
- docs/components/videourl.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
@@ -433,9 +495,26 @@ generatedFiles:
- docs/errors/toomanyrequestsresponseerror.md
- docs/errors/unauthorizedresponseerror.md
- docs/errors/unprocessableentityresponseerror.md
- 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
- docs/operations/createauthkeyscodecodechallengemethod.md
- docs/operations/createauthkeyscodedata.md
- docs/operations/createauthkeyscoderequest.md
@@ -444,65 +523,90 @@ 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/datacollection.md
- docs/operations/deleteguardrailrequest.md
- docs/operations/deleteguardrailresponse.md
- docs/operations/deletekeysrequest.md
- docs/operations/deletekeysresponse.md
- docs/operations/embedding.md
- docs/operations/encodingformat.md
- docs/operations/encodingformatbase64.md
- docs/operations/encodingformatfloat.md
- docs/operations/exchangeauthcodeforapikeycodechallengemethod.md
- docs/operations/exchangeauthcodeforapikeyrequest.md
- docs/operations/exchangeauthcodeforapikeyresponse.md
- docs/operations/getcreditsdata.md
- docs/operations/getcreditsresponse.md
- docs/operations/getcurrentkeydata.md
- docs/operations/getcurrentkeyresponse.md
- 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
- docs/operations/listdata.md
- docs/operations/listendpointsrequest.md
- docs/operations/listendpointsresponse.md
- docs/operations/listendpointszdrresponse.md
- docs/operations/listguardrailkeyassignmentsdata.md
- docs/operations/listguardrailkeyassignmentsrequest.md
- docs/operations/listguardrailkeyassignmentsresponse.md
- docs/operations/listguardrailmemberassignmentsdata.md
- docs/operations/listguardrailmemberassignmentsrequest.md
- docs/operations/listguardrailmemberassignmentsresponse.md
- docs/operations/listguardrailsdata.md
- docs/operations/listguardrailsrequest.md
- docs/operations/listguardrailsresetinterval.md
- docs/operations/listguardrailsresponse.md
- docs/operations/listkeyassignmentsdata.md
- docs/operations/listkeyassignmentsrequest.md
- docs/operations/listkeyassignmentsresponse.md
- docs/operations/listmemberassignmentsdata.md
- docs/operations/listmemberassignmentsrequest.md
- docs/operations/listmemberassignmentsresponse.md
- docs/operations/listmodelsusersecurity.md
- docs/operations/listprovidersdata.md
- docs/operations/listprovidersresponse.md
- docs/operations/listrequest.md
- docs/operations/listresponse.md
- docs/operations/maxprice.md
- docs/operations/metadata.md
- docs/operations/object.md
- docs/operations/objectembedding.md
- docs/operations/only.md
- docs/operations/order.md
- docs/operations/providername.md
- docs/operations/providerresponse.md
- docs/operations/ratelimit.md
- docs/operations/sendchatcompletionrequestresponse.md
- docs/operations/sort.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
@@ -513,14 +617,13 @@ generatedFiles:
- docs/sdks/analytics/README.md
- docs/sdks/apikeys/README.md
- docs/sdks/chat/README.md
- docs/sdks/completions/README.md
- docs/sdks/credits/README.md
- docs/sdks/embeddings/README.md
- docs/sdks/endpoints/README.md
- docs/sdks/generations/README.md
- docs/sdks/guardrails/README.md
- docs/sdks/models/README.md
- docs/sdks/oauth/README.md
- docs/sdks/parameters/README.md
- docs/sdks/providers/README.md
- docs/sdks/responses/README.md
- py.typed
@@ -537,8 +640,12 @@ 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/_schema10.py
- src/openrouter/components/_schema14.py
- src/openrouter/components/_schema17.py
- src/openrouter/components/_schema19.py
- src/openrouter/components/_schema5.py
- src/openrouter/components/activityitem.py
- src/openrouter/components/assistantmessage.py
- src/openrouter/components/badgatewayresponseerrordata.py
@@ -549,6 +656,7 @@ generatedFiles:
- src/openrouter/components/chatgenerationtokenusage.py
- src/openrouter/components/chatmessagecontentitem.py
- src/openrouter/components/chatmessagecontentitemaudio.py
- src/openrouter/components/chatmessagecontentitemcachecontrol.py
- src/openrouter/components/chatmessagecontentitemimage.py
- src/openrouter/components/chatmessagecontentitemtext.py
- src/openrouter/components/chatmessagecontentitemvideo.py
@@ -562,13 +670,10 @@ 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
- src/openrouter/components/developermessage.py
- src/openrouter/components/edgenetworktimeoutresponseerrordata.py
- src/openrouter/components/endpointstatus.py
- src/openrouter/components/filecitation.py
@@ -634,9 +739,20 @@ generatedFiles:
- src/openrouter/components/parameter.py
- src/openrouter/components/payloadtoolargeresponseerrordata.py
- src/openrouter/components/paymentrequiredresponseerrordata.py
- src/openrouter/components/pdfparserengine.py
- src/openrouter/components/pdfparseroptions.py
- src/openrouter/components/percentilelatencycutoffs.py
- src/openrouter/components/percentilestats.py
- src/openrouter/components/percentilethroughputcutoffs.py
- src/openrouter/components/perrequestlimits.py
- src/openrouter/components/preferredmaxlatency.py
- src/openrouter/components/preferredminthroughput.py
- src/openrouter/components/providername.py
- src/openrouter/components/provideroverloadedresponseerrordata.py
- src/openrouter/components/providerpreferences.py
- src/openrouter/components/providersort.py
- src/openrouter/components/providersortconfig.py
- src/openrouter/components/providersortunion.py
- src/openrouter/components/publicendpoint.py
- src/openrouter/components/publicpricing.py
- src/openrouter/components/quantization.py
@@ -651,6 +767,7 @@ generatedFiles:
- src/openrouter/components/responseinputfile.py
- src/openrouter/components/responseinputimage.py
- src/openrouter/components/responseinputtext.py
- src/openrouter/components/responseinputvideo.py
- src/openrouter/components/responseoutputtext.py
- src/openrouter/components/responseserrorfield.py
- src/openrouter/components/responsesformatjsonobject.py
@@ -662,6 +779,7 @@ generatedFiles:
- src/openrouter/components/responsesoutputitemfunctioncall.py
- src/openrouter/components/responsesoutputitemreasoning.py
- src/openrouter/components/responsesoutputmessage.py
- src/openrouter/components/responsesoutputmodality.py
- src/openrouter/components/responsessearchcontextsize.py
- src/openrouter/components/responseswebsearchcalloutput.py
- src/openrouter/components/responseswebsearchuserlocation.py
@@ -678,6 +796,7 @@ generatedFiles:
- src/openrouter/components/unprocessableentityresponseerrordata.py
- src/openrouter/components/urlcitation.py
- src/openrouter/components/usermessage.py
- src/openrouter/components/websearchengine.py
- src/openrouter/components/websearchpreviewtooluserlocation.py
- src/openrouter/components/websearchstatus.py
- src/openrouter/credits.py
@@ -704,32 +823,47 @@ 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
- src/openrouter/models/internal/globals.py
- 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
@@ -758,10 +892,10 @@ examples:
createResponses:
speakeasy-default-create-responses:
requestBody:
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, "stream": false}
application/json: {"store": false, "service_tier": "auto", "stream": false}
responses:
"200":
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}
application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "status": "completed", "completed_at": 2510.63, "output": [{"id": "msg-abc123", "role": "assistant", "type": "message", "content": [{"type": "output_text", "text": "Hello! How can I help you today?"}]}], "error": null, "incomplete_details": null, "temperature": null, "top_p": null, "presence_penalty": 7468.94, "frequency_penalty": 3967.09, "instructions": null, "metadata": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -808,7 +942,7 @@ examples:
speakeasy-default-get-credits:
responses:
"200":
application/json: {}
application/json: {"data": {"total_credits": 100.5, "total_usage": 25.75}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"403":
@@ -833,7 +967,7 @@ examples:
createEmbeddings:
speakeasy-default-create-embeddings:
requestBody:
application/json: {"input": "<value>", "model": "Taurus", "provider": {"data_collection": "deny", "zdr": true, "enforce_distillable_text": true, "order": ["OpenAI"], "only": ["OpenAI"], "ignore": ["OpenAI"], "quantizations": ["fp16"], "sort": "price"}}
application/json: {"input": "<value>", "model": "Taurus"}
responses:
"200":
application/json: {"object": "list", "data": [], "model": "Land Cruiser"}
@@ -862,7 +996,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, "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}]}
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}]}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"500":
@@ -874,7 +1008,7 @@ examples:
id: "<id>"
responses:
"200":
application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions"}}
application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions", "router": "openrouter/auto", "provider_responses": []}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"402":
@@ -902,7 +1036,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, "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}]}
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}]}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"500":
@@ -911,11 +1045,13 @@ 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, "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}]}
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}]}
"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:
@@ -924,7 +1060,7 @@ examples:
slug: "<value>"
responses:
"200":
application/json: {"data": {"id": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "architecture": {"tokenizer": "GPT", "instruct_type": "chatml", "modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "endpoints": [{"name": "OpenAI: GPT-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006", "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}]}}
application/json: {"data": {"id": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "architecture": {"tokenizer": "GPT", "instruct_type": "chatml", "modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "endpoints": [{"name": "OpenAI: GPT-4", "model_id": "openai/gpt-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "uptime_last_30m": 99.5, "supports_implicit_caching": true, "latency_last_30m": {"p50": 0.25, "p75": 0.35, "p90": 0.48, "p99": 0.85}, "throughput_last_30m": {"p50": 45.2, "p75": 38.5, "p90": 28.3, "p99": 15.1}}]}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
@@ -933,7 +1069,7 @@ examples:
speakeasy-default-list-endpoints-zdr:
responses:
"200":
application/json: {"data": [{"name": "OpenAI: GPT-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006", "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}]}
application/json: {"data": [{"name": "OpenAI: GPT-4", "model_id": "openai/gpt-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens"], "uptime_last_30m": 99.5, "supports_implicit_caching": true, "latency_last_30m": {"p50": 25.5, "p75": 35.2, "p90": 48.7, "p99": 85.3}, "throughput_last_30m": {"p50": 25.5, "p75": 35.2, "p90": 48.7, "p99": 85.3}}]}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
getParameters:
@@ -955,7 +1091,7 @@ examples:
speakeasy-default-list-providers:
responses:
"200":
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"}]}
application/json: {"data": [{"name": "OpenAI", "slug": "openai", "privacy_policy_url": "https://openai.com/privacy"}]}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
list:
@@ -966,7 +1102,7 @@ examples:
offset: "0"
responses:
"200":
application/json: {"data": [{"hash": "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", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z", "expires_at": "2027-12-31T23:59:59Z"}]}
application/json: {"data": [{"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z"}]}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"429":
@@ -976,10 +1112,10 @@ examples:
createKeys:
speakeasy-default-create-keys:
requestBody:
application/json: {"name": "My New API Key", "limit": 50, "limit_reset": "monthly", "include_byok_in_limit": true, "expires_at": "2027-12-31T23:59:59Z"}
application/json: {"name": "My New API Key"}
responses:
"201":
application/json: {"data": {"hash": "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", "name": "My New API Key", "label": "My New API Key", "disabled": false, "limit": 50, "limit_remaining": 50, "limit_reset": "monthly", "include_byok_in_limit": true, "usage": 0, "usage_daily": 0, "usage_weekly": 0, "usage_monthly": 0, "byok_usage": 0, "byok_usage_daily": 0, "byok_usage_weekly": 0, "byok_usage_monthly": 0, "created_at": "2025-08-24T10:30:00Z", "updated_at": null, "expires_at": "2027-12-31T23:59:59Z"}, "key": "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"}
application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My New API Key", "label": "My New API Key", "disabled": false, "limit": 50, "limit_remaining": 50, "limit_reset": "monthly", "include_byok_in_limit": true, "usage": 0, "usage_daily": 0, "usage_weekly": 0, "usage_monthly": 0, "byok_usage": 0, "byok_usage_daily": 0, "byok_usage_weekly": 0, "byok_usage_monthly": 0, "created_at": "2025-08-24T10:30:00Z", "updated_at": null}, "key": "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"}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -992,12 +1128,12 @@ examples:
speakeasy-default-update-keys:
parameters:
path:
hash: "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"
hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
requestBody:
application/json: {"name": "Updated API Key Name", "disabled": false, "limit": 75, "limit_reset": "daily", "include_byok_in_limit": true}
application/json: {}
responses:
"200":
application/json: {"data": {"hash": "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", "name": "Updated API Key Name", "label": "Updated API Key Name", "disabled": false, "limit": 75, "limit_remaining": 49.5, "limit_reset": "daily", "include_byok_in_limit": true, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T16:00:00Z", "expires_at": null}}
application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "Updated API Key Name", "label": "Updated API Key Name", "disabled": false, "limit": 75, "limit_remaining": 49.5, "limit_reset": "daily", "include_byok_in_limit": true, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T16:00:00Z"}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
@@ -1012,7 +1148,7 @@ examples:
speakeasy-default-delete-keys:
parameters:
path:
hash: "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"
hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
responses:
"200":
application/json: {"deleted": true}
@@ -1028,10 +1164,10 @@ examples:
speakeasy-default-get-key:
parameters:
path:
hash: "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"
hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
responses:
"200":
application/json: {"data": {"hash": "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", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z", "expires_at": "2027-12-31T23:59:59Z"}}
application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
@@ -1044,7 +1180,7 @@ examples:
speakeasy-default-get-current-key:
responses:
"200":
application/json: {"data": {"label": "sk-or-v1-au78b3456789012345678901234567890", "limit": 100, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "is_free_tier": false, "is_provisioning_key": false, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "expires_at": "2027-12-31T23:59:59Z", "rate_limit": {"requests": 1000, "interval": "1h", "note": "This field is deprecated and safe to ignore."}}}
application/json: {"data": {"label": "sk-or-v1-au7...890", "limit": 100, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "is_free_tier": false, "is_provisioning_key": false, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "rate_limit": {"requests": 1000, "interval": "1h", "note": "This field is deprecated and safe to ignore."}}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
@@ -1052,7 +1188,7 @@ examples:
exchangeAuthCodeForAPIKey:
speakeasy-default-exchange-auth-code-for-API-key:
requestBody:
application/json: {"code": "auth_code_abc123def456", "code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", "code_challenge_method": "S256"}
application/json: {"code": "auth_code_abc123def456"}
responses:
"200":
application/json: {"key": "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", "user_id": "user_2yOPcMpKoQhcd4bVgSMlELRaIah"}
@@ -1065,7 +1201,7 @@ examples:
createAuthKeysCode:
speakeasy-default-create-auth-keys-code:
requestBody:
application/json: {"callback_url": "https://myapp.com/auth/callback", "code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM", "code_challenge_method": "S256", "limit": 100}
application/json: {"callback_url": "https://myapp.com/auth/callback"}
responses:
"200":
application/json: {"data": {"id": "auth_code_xyz789", "app_id": 12345, "created_at": "2025-08-24T10:30:00Z"}}
@@ -1097,4 +1233,190 @@ examples:
application/json: {"error": {"code": "<value>", "message": "<value>"}}
"500":
application/json: {"error": {"code": "<value>", "message": "<value>"}}
listGuardrails:
speakeasy-default-list-guardrails:
responses:
"200":
application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 1}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
createGuardrail:
speakeasy-default-create-guardrail:
requestBody:
application/json: {"name": "My New Guardrail"}
responses:
"201":
application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "My New Guardrail", "created_at": "2025-08-24T10:30:00Z"}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
getGuardrail:
speakeasy-default-get-guardrail:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
responses:
"200":
application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail", "created_at": "2025-08-24T10:30:00Z"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
updateGuardrail:
speakeasy-default-update-guardrail:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
requestBody:
application/json: {}
responses:
"200":
application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Updated Guardrail Name", "created_at": "2025-08-24T10:30:00Z"}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
deleteGuardrail:
speakeasy-default-delete-guardrail:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
responses:
"200":
application/json: {"deleted": true}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
listKeyAssignments:
speakeasy-default-list-key-assignments:
responses:
"200":
application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "key_hash": "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "key_name": "Production Key", "key_label": "prod-key", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 25}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
listMemberAssignments:
speakeasy-default-list-member-assignments:
responses:
"200":
application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "user_id": "user_abc123", "organization_id": "org_xyz789", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 10}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
listGuardrailKeyAssignments:
speakeasy-default-list-guardrail-key-assignments:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
responses:
"200":
application/json: {"data": [], "total_count": 25}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
bulkAssignKeysToGuardrail:
speakeasy-default-bulk-assign-keys-to-guardrail:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
requestBody:
application/json: {"key_hashes": ["c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"]}
responses:
"200":
application/json: {"assigned_count": 3}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
listGuardrailMemberAssignments:
speakeasy-default-list-guardrail-member-assignments:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
responses:
"200":
application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "user_id": "user_abc123", "organization_id": "org_xyz789", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 10}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
bulkAssignMembersToGuardrail:
speakeasy-default-bulk-assign-members-to-guardrail:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
requestBody:
application/json: {"member_user_ids": ["user_abc123", "user_def456"]}
responses:
"200":
application/json: {"assigned_count": 2}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
bulkUnassignKeysFromGuardrail:
speakeasy-default-bulk-unassign-keys-from-guardrail:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
requestBody:
application/json: {"key_hashes": ["c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"]}
responses:
"200":
application/json: {"unassigned_count": 3}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
bulkUnassignMembersFromGuardrail:
speakeasy-default-bulk-unassign-members-from-guardrail:
parameters:
path:
id: "550e8400-e29b-41d4-a716-446655440000"
requestBody:
application/json: {"member_user_ids": ["user_abc123", "user_def456"]}
responses:
"200":
application/json: {"unassigned_count": 2}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"401":
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
+12 -6
View File
@@ -6,7 +6,7 @@ generation:
sdkClassName: OpenRouter
maintainOpenAPIOrder: true
usageSnippets:
optionalPropertyRendering: withExample
optionalPropertyRendering: never
sdkInitStyle: constructor
useClassNamesForArrayFields: true
fixes:
@@ -24,13 +24,14 @@ generation:
sdkHooksConfigAccess: true
schemas:
allOfMergeStrategy: shallowMerge
requestBodyFieldName: body
requestBodyFieldName: ""
tests:
generateTests: false
generateNewTests: true
skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true
python:
version: 0.0.16
version: 0.4.0
additionalDependencies:
dev: {}
main: {}
@@ -38,6 +39,8 @@ python:
- id
- object
- input
- models
- hash
asyncMode: both
authors:
- OpenRouter
@@ -57,17 +60,20 @@ python:
imports:
option: openapi
paths:
callbacks: ""
callbacks: callbacks
errors: errors
operations: operations
shared: components
webhooks: ""
webhooks: webhooks
inferSSEOverload: true
inferUnionDiscriminators: true
inputModelSuffix: input
legacyPyright: false
license: ""
license: Apache-2.0
maxMethodParams: 999
methodArguments: infer-optional-args
moduleName: ""
multipartArrayFormat: legacy
outputModelSuffix: output
packageManager: uv
packageName: openrouter
File diff suppressed because it is too large Load Diff
+10
View File
@@ -0,0 +1,10 @@
lintVersion: 1.0.0
defaultRuleset: openrouter
rulesets:
openrouter:
rulesets:
- speakeasy-recommended
- speakeasy-generation
rules:
oas3-missing-example:
severity: "off"
+13722 -8276
View File
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,35 @@
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.
@@ -0,0 +1,10 @@
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
@@ -0,0 +1,15 @@
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
+26 -13
View File
@@ -1,38 +1,51 @@
speakeasyVersion: 1.658.1
speakeasyVersion: 1.666.0
sources:
-OAS:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:08647b466c00989914e3a2436175152270f771f0a57d055f5bab14cc2d4be89e
sourceBlobDigest: sha256:53027ec57392d9617cc001ece83c2fe1aa6e5dbfd52d170381c34c33c6042c23
sourceRevisionDigest: sha256:01256c8494de6bfc13c36d82ae316a6a13d402194f844618bcd4d59e34f325f3
sourceBlobDigest: sha256:4c80e48fd5e1cd030e68d664eb93984b4d5946867252ff1755a2bd2a05eccd4e
tags:
- latest
- speakeasy-sdk-regen-1763230596
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:5a70452e80a4866581d37c656017d24be6d65f95748f11f4f1dc0e7e141d2bdb
sourceBlobDigest: sha256:51b950d5a574b3b01e723aaa5bf02223c33b8ed92f749728653a4a4312d8f7c0
tags:
- latest
- main
- 1.0.0
targets:
open-router:
source: -OAS
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:08647b466c00989914e3a2436175152270f771f0a57d055f5bab14cc2d4be89e
sourceBlobDigest: sha256:53027ec57392d9617cc001ece83c2fe1aa6e5dbfd52d170381c34c33c6042c23
sourceRevisionDigest: sha256:5a70452e80a4866581d37c656017d24be6d65f95748f11f4f1dc0e7e141d2bdb
sourceBlobDigest: sha256:51b950d5a574b3b01e723aaa5bf02223c33b8ed92f749728653a4a4312d8f7c0
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:bc0c0939ef451d21d3e6a1d4be4cd452012f2bb1547b25a2eb9f0b89445bf408
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
speakeasyVersion: 1.666.0
sources:
-OAS:
OpenRouter API:
inputs:
- location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api:main
- 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
output: .speakeasy/out.openapi.yaml
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/-oas
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
targets:
open-router:
target: python
source: -OAS
source: OpenRouter API
publish:
pypi:
token: $pypi_token
codeSamples:
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/-oas-python-code-samples
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-python-code-samples
labelOverride:
fixedValue: Python (SDK)
blocking: false
+10 -6
View File
@@ -1,22 +1,26 @@
workflowVersion: 1.0.0
speakeasyVersion: latest
speakeasyVersion: 1.666.0
sources:
-OAS:
OpenRouter API:
inputs:
- location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api:main
- 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
output: .speakeasy/out.openapi.yaml
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/-oas
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
targets:
open-router:
target: python
source: -OAS
source: OpenRouter API
publish:
pypi:
token: $pypi_token
codeSamples:
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/-oas-python-code-samples
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-python-code-samples
labelOverride:
fixedValue: Python (SDK)
blocking: false
+2 -110
View File
@@ -9,61 +9,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
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": "deny",
"zdr": True,
"enforce_distillable_text": True,
"order": [
"OpenAI",
],
"only": [
"OpenAI",
],
"ignore": [
"OpenAI",
],
"quantizations": None,
"sort": "price",
})
res = open_router.beta.responses.send(service_tier="auto", stream=False)
with res as event_stream:
for event in event_stream:
@@ -87,61 +33,7 @@ async def main():
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
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": "deny",
"zdr": True,
"enforce_distillable_text": True,
"order": [
"OpenAI",
],
"only": [
"OpenAI",
],
"ignore": [
"OpenAI",
],
"quantizations": None,
"sort": "price",
})
res = await open_router.beta.responses.send_async(service_tier="auto", stream=False)
async with res as event_stream:
async for event in event_stream:
+2
View File
@@ -11,3 +11,5 @@
| `tool_calls` | List[[components.ChatMessageToolCall](../components/chatmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `reasoning_details` | List[[components.Schema19](../components/schema19.md)] | :heavy_minus_sign: | N/A |
| `images` | List[[components.Image](../components/image.md)] | :heavy_minus_sign: | N/A |
@@ -1,8 +1,8 @@
# CompletionCreateParamsResponseFormatText
# AssistantMessageImageURL
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
| `url` | *str* | :heavy_check_mark: | N/A |
+31 -24
View File
@@ -3,27 +3,34 @@
## Fields
| 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 |
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `provider` | [OptionalNullable[components.Schema0]](../components/schema0.md) | :heavy_minus_sign: | N/A |
| `plugins` | List[[components.Schema17](../components/schema17.md)] | :heavy_minus_sign: | N/A |
| `route` | [OptionalNullable[components.Route]](../components/route.md) | :heavy_minus_sign: | N/A |
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `session_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `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 |
@@ -0,0 +1,9 @@
# ChatGenerationParamsEngine
## Values
| Name | Value |
| -------- | -------- |
| `NATIVE` | native |
| `EXA` | exa |
@@ -1,4 +1,4 @@
# CompletionCreateParamsStop
# ChatGenerationParamsImageConfig
## Supported Types
@@ -9,9 +9,9 @@
value: str = /* values here */
```
### `List[str]`
### `float`
```python
value: List[str] = /* values here */
value: float = /* values here */
```
@@ -0,0 +1,8 @@
# ChatGenerationParamsPdf
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `engine` | [Optional[components.ChatGenerationParamsPdfEngine]](../components/chatgenerationparamspdfengine.md) | :heavy_minus_sign: | N/A |
@@ -0,0 +1,10 @@
# ChatGenerationParamsPdfEngine
## Values
| Name | Value |
| ------------- | ------------- |
| `MISTRAL_OCR` | mistral-ocr |
| `PDF_TEXT` | pdf-text |
| `NATIVE` | native |
@@ -1,35 +0,0 @@
# ChatGenerationParamsResponseFormatUnion
## Supported Types
### `components.ChatGenerationParamsResponseFormatText`
```python
value: components.ChatGenerationParamsResponseFormatText = /* values here */
```
### `components.ChatGenerationParamsResponseFormatJSONObject`
```python
value: components.ChatGenerationParamsResponseFormatJSONObject = /* values here */
```
### `components.ResponseFormatJSONSchema`
```python
value: components.ResponseFormatJSONSchema = /* values here */
```
### `components.ResponseFormatTextGrammar`
```python
value: components.ResponseFormatTextGrammar = /* values here */
```
### `components.ChatGenerationParamsResponseFormatPython`
```python
value: components.ChatGenerationParamsResponseFormatPython = /* values here */
```
@@ -0,0 +1,9 @@
# ChatGenerationParamsRoute
## Values
| Name | Value |
| ---------- | ---------- |
| `FALLBACK` | fallback |
| `SORT` | sort |
@@ -27,3 +27,9 @@ value: components.ChatMessageContentItemAudio = /* values here */
value: components.ChatMessageContentItemVideo = /* values here */
```
### `components.ChatMessageContentItemVideo`
```python
value: components.ChatMessageContentItemVideo = /* values here */
```
@@ -1,14 +0,0 @@
# ChatMessageContentItemAudioFormat
## Values
| Name | Value |
| ------- | ------- |
| `WAV` | wav |
| `MP3` | mp3 |
| `FLAC` | flac |
| `M4A` | m4a |
| `OGG` | ogg |
| `PCM16` | pcm16 |
| `PCM24` | pcm24 |
@@ -3,7 +3,7 @@
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `data` | *str* | :heavy_check_mark: | N/A |
| `format_` | [components.ChatMessageContentItemAudioFormat](../components/chatmessagecontentitemaudioformat.md) | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `data` | *str* | :heavy_check_mark: | N/A |
| `format_` | *str* | :heavy_check_mark: | N/A |
@@ -0,0 +1,9 @@
# ChatMessageContentItemCacheControl
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `type` | *Literal["ephemeral"]* | :heavy_check_mark: | N/A |
| `ttl` | [Optional[components.TTL]](../components/ttl.md) | :heavy_minus_sign: | N/A |
@@ -3,7 +3,7 @@
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `type` | *Literal["image_url"]* | :heavy_check_mark: | N/A |
| `image_url` | [components.ImageURL](../components/imageurl.md) | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `type` | *Literal["image_url"]* | :heavy_check_mark: | N/A |
| `image_url` | [components.ChatMessageContentItemImageImageURL](../components/chatmessagecontentitemimageimageurl.md) | :heavy_check_mark: | N/A |
@@ -1,4 +1,4 @@
# ImageURL
# ChatMessageContentItemImageImageURL
## Fields
@@ -3,7 +3,8 @@
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
| `text` | *str* | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
| `text` | *str* | :heavy_check_mark: | N/A |
| `cache_control` | [Optional[components.ChatMessageContentItemCacheControl]](../components/chatmessagecontentitemcachecontrol.md) | :heavy_minus_sign: | N/A |
+13 -5
View File
@@ -1,9 +1,17 @@
# ChatMessageContentItemVideo
## Fields
## Supported Types
### `components.ChatMessageContentItemVideoInputVideo`
```python
value: components.ChatMessageContentItemVideoInputVideo = /* values here */
```
### `components.ChatMessageContentItemVideoVideoURL`
```python
value: components.ChatMessageContentItemVideoVideoURL = /* values here */
```
| Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `type` | *Literal["input_video"]* | :heavy_check_mark: | N/A |
| `video_url` | [components.VideoURL](../components/videourl.md) | :heavy_check_mark: | N/A |
@@ -0,0 +1,9 @@
# ChatMessageContentItemVideoInputVideo
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `type` | *Literal["input_video"]* | :heavy_check_mark: | N/A |
| `video_url` | [components.VideoURL1](../components/videourl1.md) | :heavy_check_mark: | N/A |
@@ -0,0 +1,9 @@
# ChatMessageContentItemVideoVideoURL
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `type` | *Literal["video_url"]* | :heavy_check_mark: | N/A |
| `video_url` | [components.VideoURL2](../components/videourl2.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.TopLogprob](../components/toplogprob.md)] | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `token` | *str* | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
| `top_logprobs` | List[[components.ChatMessageTokenLogprobTopLogprob](../components/chatmessagetokenlogprobtoplogprob.md)] | :heavy_check_mark: | N/A |
@@ -0,0 +1,10 @@
# ChatMessageTokenLogprobTopLogprob
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `token` | *str* | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
@@ -10,3 +10,4 @@
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `tool_calls` | List[[components.ChatStreamingMessageToolCall](../components/chatstreamingmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
| `reasoning_details` | List[[components.Schema19](../components/schema19.md)] | :heavy_minus_sign: | N/A |
+23
View File
@@ -0,0 +1,23 @@
# Completion
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `str`
```python
value: str = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
-11
View File
@@ -1,11 +0,0 @@
# CompletionChoice
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `text` | *str* | :heavy_check_mark: | N/A |
| `index` | *float* | :heavy_check_mark: | N/A |
| `logprobs` | [Nullable[components.CompletionLogprobs]](../components/completionlogprobs.md) | :heavy_check_mark: | N/A |
| `finish_reason` | [Nullable[components.CompletionFinishReason]](../components/completionfinishreason.md) | :heavy_check_mark: | N/A |
-28
View File
@@ -1,28 +0,0 @@
# CompletionCreateParams
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
| `prompt` | [components.Prompt](../components/prompt.md) | :heavy_check_mark: | N/A |
| `best_of` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `echo` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | N/A |
| `logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `stop` | [OptionalNullable[components.CompletionCreateParamsStop]](../components/completioncreateparamsstop.md) | :heavy_minus_sign: | N/A |
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `stream_options` | [OptionalNullable[components.StreamOptions]](../components/streamoptions.md) | :heavy_minus_sign: | N/A |
| `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | N/A |
| `response_format` | [OptionalNullable[components.CompletionCreateParamsResponseFormatUnion]](../components/completioncreateparamsresponseformatunion.md) | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# CompletionCreateParamsResponseFormatJSONObject
## Fields
| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `type` | *Literal["json_object"]* | :heavy_check_mark: | N/A |
@@ -1,8 +0,0 @@
# CompletionCreateParamsResponseFormatPython
## Fields
| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `type` | *Literal["python"]* | :heavy_check_mark: | N/A |
@@ -1,35 +0,0 @@
# CompletionCreateParamsResponseFormatUnion
## Supported Types
### `components.CompletionCreateParamsResponseFormatText`
```python
value: components.CompletionCreateParamsResponseFormatText = /* values here */
```
### `components.CompletionCreateParamsResponseFormatJSONObject`
```python
value: components.CompletionCreateParamsResponseFormatJSONObject = /* values here */
```
### `components.ResponseFormatJSONSchema`
```python
value: components.ResponseFormatJSONSchema = /* values here */
```
### `components.ResponseFormatTextGrammar`
```python
value: components.ResponseFormatTextGrammar = /* values here */
```
### `components.CompletionCreateParamsResponseFormatPython`
```python
value: components.CompletionCreateParamsResponseFormatPython = /* values here */
```
-10
View File
@@ -1,10 +0,0 @@
# CompletionFinishReason
## Values
| Name | Value |
| ---------------- | ---------------- |
| `STOP` | stop |
| `LENGTH` | length |
| `CONTENT_FILTER` | content_filter |
-11
View File
@@ -1,11 +0,0 @@
# CompletionLogprobs
## Fields
| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `tokens` | List[*str*] | :heavy_check_mark: | N/A |
| `token_logprobs` | List[*float*] | :heavy_check_mark: | N/A |
| `top_logprobs` | List[Dict[str, *float*]] | :heavy_check_mark: | N/A |
| `text_offset` | List[*float*] | :heavy_check_mark: | N/A |
-14
View File
@@ -1,14 +0,0 @@
# CompletionResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `id` | *str* | :heavy_check_mark: | N/A |
| `object` | *Literal["text_completion"]* | :heavy_check_mark: | N/A |
| `created` | *float* | :heavy_check_mark: | N/A |
| `model` | *str* | :heavy_check_mark: | N/A |
| `system_fingerprint` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `choices` | List[[components.CompletionChoice](../components/completionchoice.md)] | :heavy_check_mark: | N/A |
| `usage` | [Optional[components.CompletionUsage]](../components/completionusage.md) | :heavy_minus_sign: | N/A |
-10
View File
@@ -1,10 +0,0 @@
# CompletionUsage
## Fields
| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `prompt_tokens` | *float* | :heavy_check_mark: | N/A |
| `completion_tokens` | *float* | :heavy_check_mark: | N/A |
| `total_tokens` | *float* | :heavy_check_mark: | N/A |
+1 -1
View File
@@ -2,8 +2,8 @@
Data collection setting. If no available model provider meets the requirement, your request will return an error.
- allow: (default) allow providers which store user data non-transiently and may train on it
- deny: use only providers which do not collect user data.
- deny: use only providers which do not collect user data.
## Values
+8
View File
@@ -0,0 +1,8 @@
# Debug
## Fields
| Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- |
| `echo_upstream_body` | *Optional[bool]* | :heavy_minus_sign: | N/A |
+10
View File
@@ -0,0 +1,10 @@
# DeveloperMessage
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `role` | *Literal["developer"]* | :heavy_check_mark: | N/A |
| `content` | [components.DeveloperMessageContent](../components/developermessagecontent.md) | :heavy_check_mark: | N/A |
| `name` | *Optional[str]* | :heavy_minus_sign: | N/A |
@@ -1,4 +1,4 @@
# MessageContent
# DeveloperMessageContent
## Supported Types
+5 -3
View File
@@ -5,7 +5,9 @@
| Name | Value |
| --------- | --------- |
| `MINIMAL` | minimal |
| `LOW` | low |
| `MEDIUM` | medium |
| `XHIGH` | xhigh |
| `HIGH` | high |
| `MEDIUM` | medium |
| `LOW` | low |
| `MINIMAL` | minimal |
| `NONE` | none |
+8
View File
@@ -0,0 +1,8 @@
# IDAutoRouter
## Values
| Name | Value |
| ------------- | ------------- |
| `AUTO_ROUTER` | auto-router |
+8
View File
@@ -0,0 +1,8 @@
# IDResponseHealing
## Values
| Name | Value |
| ------------------ | ------------------ |
| `RESPONSE_HEALING` | response-healing |
+8
View File
@@ -0,0 +1,8 @@
# Image
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `image_url` | [components.AssistantMessageImageURL](../components/assistantmessageimageurl.md) | :heavy_check_mark: | N/A |
+11
View File
@@ -0,0 +1,11 @@
# Logprob
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `token` | *str* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `top_logprobs` | List[[components.ResponseOutputTextTopLogprob](../components/responseoutputtexttoplogprob.md)] | :heavy_check_mark: | N/A |
-14
View File
@@ -1,14 +0,0 @@
# 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 |
+2 -2
View File
@@ -15,10 +15,10 @@ value: components.SystemMessage = /* values here */
value: components.UserMessage = /* values here */
```
### `components.MessageDeveloper`
### `components.DeveloperMessage`
```python
value: components.MessageDeveloper = /* values here */
value: components.DeveloperMessage = /* values here */
```
### `components.AssistantMessage`
-10
View File
@@ -1,10 +0,0 @@
# MessageDeveloper
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| `role` | *Literal["developer"]* | :heavy_check_mark: | N/A |
| `content` | [components.MessageContent](../components/messagecontent.md) | :heavy_check_mark: | N/A |
| `name` | *Optional[str]* | :heavy_minus_sign: | N/A |
+9
View File
@@ -0,0 +1,9 @@
# Modality
## Values
| Name | Value |
| ------- | ------- |
| `TEXT` | text |
| `IMAGE` | image |
+1
View File
@@ -20,3 +20,4 @@ Information about an AI model available on OpenRouter
| `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 |
@@ -5,7 +5,9 @@
| Name | Value |
| --------- | --------- |
| `XHIGH` | xhigh |
| `HIGH` | high |
| `MEDIUM` | medium |
| `LOW` | low |
| `MINIMAL` | minimal |
| `NONE` | none |
@@ -3,8 +3,8 @@
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `type` | [Optional[components.OpenResponsesEasyInputMessageType]](../components/openresponseseasyinputmessagetype.md) | :heavy_minus_sign: | N/A |
| `role` | [components.OpenResponsesEasyInputMessageRoleUnion](../components/openresponseseasyinputmessageroleunion.md) | :heavy_check_mark: | N/A |
| `content` | [components.OpenResponsesEasyInputMessageContent2](../components/openresponseseasyinputmessagecontent2.md) | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `type` | [Optional[components.OpenResponsesEasyInputMessageTypeMessage]](../components/openresponseseasyinputmessagetypemessage.md) | :heavy_minus_sign: | N/A |
| `role` | [components.OpenResponsesEasyInputMessageRoleUnion](../components/openresponseseasyinputmessageroleunion.md) | :heavy_check_mark: | N/A |
| `content` | [components.OpenResponsesEasyInputMessageContentUnion2](../components/openresponseseasyinputmessagecontentunion2.md) | :heavy_check_mark: | N/A |
@@ -1,17 +0,0 @@
# OpenResponsesEasyInputMessageContent2
## Supported Types
### `List[components.OpenResponsesEasyInputMessageContent1]`
```python
value: List[components.OpenResponsesEasyInputMessageContent1] = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,12 @@
# OpenResponsesEasyInputMessageContentInputImage
Image input content item
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `type` | [components.OpenResponsesEasyInputMessageContentType](../components/openresponseseasyinputmessagecontenttype.md) | :heavy_check_mark: | N/A |
| `detail` | [components.OpenResponsesEasyInputMessageDetail](../components/openresponseseasyinputmessagedetail.md) | :heavy_check_mark: | N/A |
| `image_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,8 @@
# OpenResponsesEasyInputMessageContentType
## Values
| Name | Value |
| ------------- | ------------- |
| `INPUT_IMAGE` | input_image |
@@ -1,4 +1,4 @@
# OpenResponsesInputMessageItemContent
# OpenResponsesEasyInputMessageContentUnion1
## Supported Types
@@ -9,10 +9,10 @@
value: components.ResponseInputText = /* values here */
```
### `components.ResponseInputImage`
### `components.OpenResponsesEasyInputMessageContentInputImage`
```python
value: components.ResponseInputImage = /* values here */
value: components.OpenResponsesEasyInputMessageContentInputImage = /* values here */
```
### `components.ResponseInputFile`
@@ -27,3 +27,9 @@ value: components.ResponseInputFile = /* values here */
value: components.ResponseInputAudio = /* values here */
```
### `components.ResponseInputVideo`
```python
value: components.ResponseInputVideo = /* values here */
```
@@ -0,0 +1,17 @@
# OpenResponsesEasyInputMessageContentUnion2
## Supported Types
### `List[components.OpenResponsesEasyInputMessageContentUnion1]`
```python
value: List[components.OpenResponsesEasyInputMessageContentUnion1] = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,10 @@
# OpenResponsesEasyInputMessageDetail
## Values
| Name | Value |
| ------ | ------ |
| `AUTO` | auto |
| `HIGH` | high |
| `LOW` | low |
@@ -1,4 +1,4 @@
# OpenResponsesInputMessageItemType
# OpenResponsesEasyInputMessageTypeMessage
## Values
@@ -3,9 +3,9 @@
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `type` | [Optional[components.OpenResponsesInputMessageItemType]](../components/openresponsesinputmessageitemtype.md) | :heavy_minus_sign: | N/A |
| `role` | [components.OpenResponsesInputMessageItemRoleUnion](../components/openresponsesinputmessageitemroleunion.md) | :heavy_check_mark: | N/A |
| `content` | List[[components.OpenResponsesInputMessageItemContent](../components/openresponsesinputmessageitemcontent.md)] | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `type` | [Optional[components.OpenResponsesInputMessageItemTypeMessage]](../components/openresponsesinputmessageitemtypemessage.md) | :heavy_minus_sign: | N/A |
| `role` | [components.OpenResponsesInputMessageItemRoleUnion](../components/openresponsesinputmessageitemroleunion.md) | :heavy_check_mark: | N/A |
| `content` | List[[components.OpenResponsesInputMessageItemContentUnion](../components/openresponsesinputmessageitemcontentunion.md)] | :heavy_check_mark: | N/A |
@@ -0,0 +1,12 @@
# OpenResponsesInputMessageItemContentInputImage
Image input content item
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `type` | [components.OpenResponsesInputMessageItemContentType](../components/openresponsesinputmessageitemcontenttype.md) | :heavy_check_mark: | N/A |
| `detail` | [components.OpenResponsesInputMessageItemDetail](../components/openresponsesinputmessageitemdetail.md) | :heavy_check_mark: | N/A |
| `image_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,8 @@
# OpenResponsesInputMessageItemContentType
## Values
| Name | Value |
| ------------- | ------------- |
| `INPUT_IMAGE` | input_image |
@@ -1,4 +1,4 @@
# OpenResponsesEasyInputMessageContent1
# OpenResponsesInputMessageItemContentUnion
## Supported Types
@@ -9,10 +9,10 @@
value: components.ResponseInputText = /* values here */
```
### `components.ResponseInputImage`
### `components.OpenResponsesInputMessageItemContentInputImage`
```python
value: components.ResponseInputImage = /* values here */
value: components.OpenResponsesInputMessageItemContentInputImage = /* values here */
```
### `components.ResponseInputFile`
@@ -27,3 +27,9 @@ value: components.ResponseInputFile = /* values here */
value: components.ResponseInputAudio = /* values here */
```
### `components.ResponseInputVideo`
```python
value: components.ResponseInputVideo = /* values here */
```
@@ -0,0 +1,10 @@
# OpenResponsesInputMessageItemDetail
## Values
| Name | Value |
| ------ | ------ |
| `AUTO` | auto |
| `HIGH` | high |
| `LOW` | low |
@@ -1,4 +1,4 @@
# OpenResponsesEasyInputMessageType
# OpenResponsesInputMessageItemTypeMessage
## Values
@@ -11,7 +11,8 @@ Complete non-streaming response from the Responses API
| `object` | [components.Object](../components/object.md) | :heavy_check_mark: | N/A | |
| `created_at` | *float* | :heavy_check_mark: | N/A | |
| `model` | *str* | :heavy_check_mark: | N/A | |
| `status` | [Optional[components.OpenAIResponsesResponseStatus]](../components/openairesponsesresponsestatus.md) | :heavy_minus_sign: | N/A | |
| `status` | [components.OpenAIResponsesResponseStatus](../components/openairesponsesresponsestatus.md) | :heavy_check_mark: | N/A | |
| `completed_at` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `output` | List[[components.ResponsesOutputItem](../components/responsesoutputitem.md)] | :heavy_check_mark: | N/A | |
| `user` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `output_text` | *Optional[str]* | :heavy_minus_sign: | N/A | |
@@ -19,12 +20,14 @@ Complete non-streaming response from the Responses API
| `safety_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `error` | [Nullable[components.ResponsesErrorField]](../components/responseserrorfield.md) | :heavy_check_mark: | Error information returned from the API | {<br/>"code": "rate_limit_exceeded",<br/>"message": "Rate limit exceeded. Please try again later."<br/>} |
| `incomplete_details` | [Nullable[components.OpenAIResponsesIncompleteDetails]](../components/openairesponsesincompletedetails.md) | :heavy_check_mark: | N/A | |
| `usage` | [Optional[components.OpenResponsesUsage]](../components/openresponsesusage.md) | :heavy_minus_sign: | Token usage information for the response | {<br/>"input_tokens": 10,<br/>"output_tokens": 25,<br/>"total_tokens": 35,<br/>"input_tokens_details": {<br/>"cached_tokens": 0<br/>},<br/>"output_tokens_details": {<br/>"reasoning_tokens": 0<br/>},<br/>"cost": 0.0012,<br/>"cost_details": {<br/>"upstream_inference_cost": null,<br/>"upstream_inference_input_cost": 0.0008,<br/>"upstream_inference_output_cost": 0.0004<br/>}<br/>} |
| `usage` | [OptionalNullable[components.OpenResponsesUsage]](../components/openresponsesusage.md) | :heavy_minus_sign: | Token usage information for the response | {<br/>"input_tokens": 10,<br/>"output_tokens": 25,<br/>"total_tokens": 35,<br/>"input_tokens_details": {<br/>"cached_tokens": 0<br/>},<br/>"output_tokens_details": {<br/>"reasoning_tokens": 0<br/>},<br/>"cost": 0.0012,<br/>"cost_details": {<br/>"upstream_inference_cost": null,<br/>"upstream_inference_input_cost": 0.0008,<br/>"upstream_inference_output_cost": 0.0004<br/>}<br/>} |
| `max_tool_calls` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `top_logprobs` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `max_output_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
| `temperature` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `top_p` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `presence_penalty` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `frequency_penalty` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `instructions` | [Nullable[components.OpenAIResponsesInputUnion]](../components/openairesponsesinputunion.md) | :heavy_check_mark: | N/A | |
| `metadata` | Dict[str, *str*] | :heavy_check_mark: | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | {<br/>"user_id": "123",<br/>"session_id": "abc-def-ghi"<br/>} |
| `tools` | List[[components.OpenResponsesNonStreamingResponseToolUnion](../components/openresponsesnonstreamingresponsetoolunion.md)] | :heavy_check_mark: | N/A | |
@@ -3,9 +3,11 @@
## Values
| Name | Value |
| --------------------- | --------------------- |
| `UNKNOWN` | unknown |
| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
| `XAI_RESPONSES_V1` | xai-responses-v1 |
| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
| 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 |
+9 -2
View File
@@ -20,17 +20,24 @@ 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 | |
| `include` | List[[components.OpenAIResponsesIncludable](../components/openairesponsesincludable.md)] | :heavy_minus_sign: | N/A | |
| `background` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
| `safety_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
| `service_tier` | [OptionalNullable[components.ServiceTier]](../components/servicetier.md) | :heavy_minus_sign: | N/A | auto |
| `store` | *Optional[Literal[False]]* | :heavy_minus_sign: | N/A | |
| `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.Provider]](../components/provider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
| `plugins` | List[[components.Plugin](../components/plugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. | |
| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. | |
@@ -0,0 +1,9 @@
# OpenResponsesRequestEngine
## Values
| Name | Value |
| -------- | -------- |
| `NATIVE` | native |
| `EXA` | exa |
@@ -0,0 +1,17 @@
# OpenResponsesRequestIgnore
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,17 @@
# OpenResponsesRequestImageConfig
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `float`
```python
value: float = /* values here */
```
@@ -0,0 +1,14 @@
# 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: | Price per million prompt tokens | 1000 |
| `completion` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
@@ -0,0 +1,17 @@
# OpenResponsesRequestOnly
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,17 @@
# OpenResponsesRequestOrder
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,8 @@
# OpenResponsesRequestPdf
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `engine` | [Optional[components.OpenResponsesRequestPdfEngine]](../components/openresponsesrequestpdfengine.md) | :heavy_minus_sign: | N/A |
@@ -0,0 +1,10 @@
# OpenResponsesRequestPdfEngine
## Values
| Name | Value |
| ------------- | ------------- |
| `MISTRAL_OCR` | mistral-ocr |
| `PDF_TEXT` | pdf-text |
| `NATIVE` | native |
@@ -0,0 +1,11 @@
# 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 |
@@ -0,0 +1,25 @@
# OpenResponsesRequestSort
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
## Supported Types
### `components.ProviderSort`
```python
value: components.ProviderSort = /* values here */
```
### `components.ProviderSortConfig`
```python
value: components.ProviderSortConfig = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
+1
View File
@@ -8,3 +8,4 @@
| `TEXT` | text |
| `IMAGE` | image |
| `EMBEDDINGS` | embeddings |
| `AUDIO` | audio |
+1
View File
@@ -26,5 +26,6 @@
| `PARALLEL_TOOL_CALLS` | parallel_tool_calls |
| `INCLUDE_REASONING` | include_reasoning |
| `REASONING` | reasoning |
| `REASONING_EFFORT` | reasoning_effort |
| `WEB_SEARCH_OPTIONS` | web_search_options |
| `VERBOSITY` | verbosity |
+9
View File
@@ -0,0 +1,9 @@
# Partition
## Values
| Name | Value |
| ------- | ------- |
| `MODEL` | model |
| `NONE` | none |
+12
View File
@@ -0,0 +1,12 @@
# PDFParserEngine
The engine to use for parsing PDF files.
## Values
| Name | Value |
| ------------- | ------------- |
| `MISTRAL_OCR` | mistral-ocr |
| `PDF_TEXT` | pdf-text |
| `NATIVE` | native |
+10
View File
@@ -0,0 +1,10 @@
# PDFParserOptions
Options for PDF parsing.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `engine` | [Optional[components.PDFParserEngine]](../components/pdfparserengine.md) | :heavy_minus_sign: | The engine to use for parsing PDF files. |
@@ -0,0 +1,13 @@
# PercentileLatencyCutoffs
Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
## Fields
| Field | Type | Required | Description |
| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- |
| `p50` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p50 latency (seconds) |
| `p75` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p75 latency (seconds) |
| `p90` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p90 latency (seconds) |
| `p99` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p99 latency (seconds) |
+13
View File
@@ -0,0 +1,13 @@
# PercentileStats
Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.
## Fields
| Field | Type | Required | Description | Example |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `p50` | *float* | :heavy_check_mark: | Median (50th percentile) | 25.5 |
| `p75` | *float* | :heavy_check_mark: | 75th percentile | 35.2 |
| `p90` | *float* | :heavy_check_mark: | 90th percentile | 48.7 |
| `p99` | *float* | :heavy_check_mark: | 99th percentile | 85.3 |
@@ -0,0 +1,13 @@
# PercentileThroughputCutoffs
Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
## Fields
| Field | Type | Required | Description |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `p50` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p50 throughput (tokens/sec) |
| `p75` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p75 throughput (tokens/sec) |
| `p90` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p90 throughput (tokens/sec) |
| `p99` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p99 throughput (tokens/sec) |
+12
View File
@@ -3,6 +3,12 @@
## Supported Types
### `components.PluginAutoRouter`
```python
value: components.PluginAutoRouter = /* values here */
```
### `components.PluginModeration`
```python
@@ -21,3 +27,9 @@ value: components.PluginWeb = /* values here */
value: components.PluginFileParser = /* values here */
```
### `components.PluginResponseHealing`
```python
value: components.PluginResponseHealing = /* values here */
```
+10
View File
@@ -0,0 +1,10 @@
# PluginAutoRouter
## 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/>] |
+5 -5
View File
@@ -3,8 +3,8 @@
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
| `id` | [components.IDFileParser](../components/idfileparser.md) | :heavy_check_mark: | N/A |
| `max_files` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `pdf` | [Optional[components.Pdf]](../components/pdf.md) | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `id` | [components.IDFileParser](../components/idfileparser.md) | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the file-parser plugin for this request. Defaults to true. |
| `pdf` | [Optional[components.PDFParserOptions]](../components/pdfparseroptions.md) | :heavy_minus_sign: | Options for PDF parsing. |
+9
View File
@@ -0,0 +1,9 @@
# PluginResponseHealing
## 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. |
+7 -6
View File
@@ -3,9 +3,10 @@
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
| `id` | [components.IDWeb](../components/idweb.md) | :heavy_check_mark: | N/A |
| `max_results` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `engine` | [Optional[components.Engine]](../components/engine.md) | :heavy_minus_sign: | N/A |
| 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. |

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