From 5e6dd0f614604a9c7a0d2ea00abb14f20a3a3050 Mon Sep 17 00:00:00 2001 From: Matt Apperson Date: Tue, 4 Nov 2025 10:48:27 -0500 Subject: [PATCH 1/2] Add SDK overview documentation Add OVERVIEW.md explaining the value proposition of the TypeScript SDK based on three core principles: auto-generation from API specs, type safety, and protection from common mistakes. Written in a direct, practical style similar to ai-sdk.dev documentation. --- OVERVIEW.md | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 OVERVIEW.md diff --git a/OVERVIEW.md b/OVERVIEW.md new file mode 100644 index 00000000..13c4cd61 --- /dev/null +++ b/OVERVIEW.md @@ -0,0 +1,101 @@ +# OpenRouter TypeScript SDK + +The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API. + +## Why use the OpenRouter SDK? + +Integrating AI models into applications involves handling different provider APIs, managing model-specific requirements, and avoiding common implementation mistakes. The OpenRouter SDK standardizes these integrations and protects you from footguns. + +```typescript +import OpenRouter from '@openrouter/sdk'; + +const client = new OpenRouter({ + apiKey: process.env.OPENROUTER_API_KEY +}); + +const response = await client.chat.completions.create({ + model: "minimax/minimax-m2", + messages: [ + { role: "user", content: "Explain quantum computing" } + ] +}); +``` + +The SDK provides three core benefits: + +### Auto-generated from API specifications + +The SDK is automatically generated from OpenRouter's OpenAPI specs and updated with every API change. New models, parameters, and features appear in your IDE autocomplete immediately. No manual updates. No version drift. + +```typescript +// When new models launch, they're available instantly +const response = await client.chat.completions.create({ + model: "minimax/minimax-m2", +}); +``` + +### Type-safe by default + +Every parameter, response field, and configuration option is fully typed. Invalid configurations are caught at compile time, not in production. + +```typescript +const response = await client.chat.completions.create({ + model: "minimax/minimax-m2", + messages: [ + { role: "user", content: "Hello" } + // ← Your IDE validates message structure + ], + temperature: 0.7, // ← Type-checked + stream: true // ← Response type changes based on this +}); +``` + +**Actionable error messages:** + +```typescript +// Instead of generic errors, get specific guidance: +// "Model 'openai/o1-preview' requires at least 2 messages. +// You provided 1 message. Add a system or user message." +``` + +**Type-safe streaming:** + +```typescript +const stream = await client.chat.completions.create({ + model: "minimax/minimax-m2", + messages: [{ role: "user", content: "Write a story" }], + stream: true +}); + +for await (const chunk of stream) { + // Full type information for streaming responses + const content = chunk.choices[0]?.delta?.content; +} +``` + +## Installation + +```bash +npm install @openrouter/sdk +``` + +Get your API key from [openrouter.ai/settings/keys](https://openrouter.ai/settings/keys). + +## Quick start + +```typescript +import OpenRouter from '@openrouter/sdk'; + +const client = new OpenRouter({ + apiKey: process.env.OPENROUTER_API_KEY +}); + +const response = await client.chat.completions.create({ + model: "minimax/minimax-m2", + messages: [ + { role: "user", content: "Hello!" } + ] +}); + +console.log(response.choices[0].message.content); +``` From 9f1990a8c5cd76b9968000b81e8cdc5332d2cb3b Mon Sep 17 00:00:00 2001 From: Matt Apperson Date: Tue, 4 Nov 2025 10:50:14 -0500 Subject: [PATCH 2/2] update docs --- .speakeasy/gen.lock | 186 ++++++------- .speakeasy/gen.yaml | 3 +- .speakeasy/workflow.lock | 4 +- FUNCTIONS.md | 110 +------- REACT_QUERY.md | 125 +-------- USAGE.md | 110 +------- docs/models/assistantmessage.md | 14 - docs/models/badgatewayresponseerrordata.md | 5 - docs/models/badrequestresponseerrordata.md | 1 - docs/models/chatgenerationparams.md | 48 ---- ...chatgenerationparamsresponseformatunion.md | 7 - docs/models/chatgenerationtokenusage.md | 10 - docs/models/chatmessagecontentitem.md | 1 - docs/models/chatmessagecontentitemimage.md | 1 - docs/models/chatmessagetokenlogprob.md | 6 +- docs/models/chatmessagetokenlogprobs.md | 22 +- docs/models/chatresponse.md | 16 -- docs/models/chatresponsechoice.md | 39 --- docs/models/chatstreamingchoice.md | 42 +-- docs/models/chatstreamingmessagechunk.md | 17 +- docs/models/chatstreamingmessagetoolcall.md | 5 - .../chatstreamingmessagetoolcallfunction.md | 5 +- docs/models/chatstreamingresponsechunk.md | 70 +---- docs/models/chatstreamingresponsechunkdata.md | 20 -- docs/models/chatstreamoptions.md | 4 +- docs/models/completioncreateparams.md | 27 -- ...mpletioncreateparamsresponseformatunion.md | 7 - docs/models/completionresponse.md | 6 - docs/models/completiontokensdetails.md | 7 +- docs/models/costdetails.md | 5 +- docs/models/defaultparameters.md | 6 +- .../edgenetworktimeoutresponseerrordata.md | 3 - docs/models/forbiddenresponseerrordata.md | 4 - docs/models/imageurl.md | 1 - .../models/internalserverresponseerrordata.md | 1 - docs/models/jsonschemaconfig.md | 7 - docs/models/listendpointsresponse.md | 11 - docs/models/maxprice.md | 8 +- docs/models/message.md | 17 -- docs/models/messagedeveloper.md | 1 - docs/models/model.md | 17 -- docs/models/modelarchitecture.md | 2 - docs/models/modelslistresponse.md | 17 -- docs/models/notfoundresponseerrordata.md | 1 - .../openairesponsesincompletedetails.md | 4 +- docs/models/openairesponsesinputcontent1.md | 5 - docs/models/openairesponsesinputcontent3.md | 5 - .../openairesponsesinputfunctioncall.md | 2 - .../openairesponsesinputfunctioncalloutput.md | 1 - docs/models/openairesponsesinputmessage1.md | 1 - docs/models/openairesponsesinputmessage2.md | 1 - docs/models/openairesponsesinputunion1.md | 14 - docs/models/openairesponsesprompt.md | 1 - docs/models/openairesponsesreasoningconfig.md | 5 +- docs/models/openresponseseasyinputmessage.md | 1 - .../openresponseseasyinputmessagecontent1.md | 5 - .../models/openresponsesfunctioncalloutput.md | 1 - docs/models/openresponsesfunctiontoolcall.md | 1 - docs/models/openresponsesinput.md | 1 - docs/models/openresponsesinput1.md | 35 --- docs/models/openresponsesinputmessageitem.md | 2 - .../openresponsesinputmessageitemcontent.md | 5 - docs/models/openresponseslogprobs.md | 6 - .../openresponsesnonstreamingresponse.md | 52 ---- ...sponsesnonstreamingresponsetoolfunction.md | 2 - ...nresponsesnonstreamingresponsetoolunion.md | 44 --- docs/models/openresponsesreasoning.md | 10 - docs/models/openresponsesreasoningconfig.md | 7 +- docs/models/openresponsesrequest.md | 111 +------- .../openresponsesrequesttoolfunction.md | 2 - docs/models/openresponsesrequesttoolunion.md | 44 --- docs/models/openresponsesresponsetext.md | 7 +- docs/models/openresponsesstreamevent.md | 257 ------------------ ...enresponsesstreameventresponsecompleted.md | 52 ---- ...nsesstreameventresponsecontentpartadded.md | 1 - ...onsesstreameventresponsecontentpartdone.md | 1 - ...openresponsesstreameventresponsecreated.md | 50 ---- .../openresponsesstreameventresponsefailed.md | 50 ---- ...nresponsesstreameventresponseincomplete.md | 50 ---- ...nresponsesstreameventresponseinprogress.md | 50 ---- ...onsesstreameventresponseoutputitemadded.md | 1 - ...ponsesstreameventresponseoutputitemdone.md | 2 - docs/models/openresponsestoplogprobs.md | 5 +- docs/models/openresponsesusage.md | 7 - .../openresponseswebsearch20250826tool.md | 13 - ...enresponseswebsearch20250826toolfilters.md | 6 +- ...enresponseswebsearchpreview20250311tool.md | 8 - .../openresponseswebsearchpreviewtool.md | 8 - docs/models/openresponseswebsearchtool.md | 13 - .../openresponseswebsearchtoolfilters.md | 6 +- .../operations/createauthkeyscoderequest.md | 3 - docs/models/operations/createkeysrequest.md | 3 - .../operations/createresponsesresponse.md | 52 ---- .../operations/createresponsesresponsebody.md | 50 ---- .../exchangeauthcodeforapikeyrequest.md | 2 - docs/models/operations/getmodelsrequest.md | 5 +- .../models/operations/getparametersrequest.md | 1 - .../operations/getuseractivityrequest.md | 4 +- .../operations/listendpointsresponse.md | 11 - .../operations/listendpointszdrresponse.md | 11 - docs/models/operations/listprovidersdata.md | 2 - .../operations/listprovidersresponse.md | 2 - docs/models/operations/listrequest.md | 5 +- .../sendchatcompletionrequestresponse.md | 16 -- docs/models/operations/updatekeysrequest.md | 8 +- .../operations/updatekeysrequestbody.md | 8 +- docs/models/outputmessage.md | 9 - docs/models/outputmessagecontent.md | 9 - docs/models/part1.md | 9 - docs/models/part2.md | 9 - .../payloadtoolargeresponseerrordata.md | 5 - .../paymentrequiredresponseerrordata.md | 1 - docs/models/pdf.md | 4 +- docs/models/plugin.md | 7 - docs/models/pluginfileparser.md | 4 - docs/models/pluginweb.md | 3 - docs/models/pricing.md | 10 - docs/models/prompttokensdetails.md | 5 +- docs/models/provider.md | 26 +- .../provideroverloadedresponseerrordata.md | 3 - docs/models/publicendpoint.md | 11 - docs/models/publicpricing.md | 10 - docs/models/reasoning.md | 5 +- .../models/requesttimeoutresponseerrordata.md | 3 - docs/models/responseformatjsonschema.md | 7 - docs/models/responseformattextconfig.md | 7 +- docs/models/responseinputfile.md | 4 - docs/models/responseinputimage.md | 1 - docs/models/responseoutputtext.md | 9 - .../responsesformattextjsonschemaconfig.md | 2 - docs/models/responsesoutputitem.md | 20 -- .../models/responsesoutputitemfunctioncall.md | 2 - docs/models/responsesoutputitemreasoning.md | 9 - docs/models/responsesoutputmessage.md | 9 - docs/models/responsesoutputmessagecontent.md | 9 - docs/models/responseswebsearchuserlocation.md | 8 +- docs/models/responsetextconfig.md | 7 +- docs/models/security.md | 4 +- .../serviceunavailableresponseerrordata.md | 4 - docs/models/streamoptions.md | 4 +- docs/models/systemmessage.md | 1 - docs/models/tool.md | 6 - docs/models/toolfunction.md | 7 - .../toomanyrequestsresponseerrordata.md | 4 - docs/models/topproviderinfo.md | 2 - docs/models/unauthorizedresponseerrordata.md | 1 - .../unprocessableentityresponseerrordata.md | 5 - docs/models/usermessage.md | 1 - docs/models/variables.md | 5 - .../websearchpreviewtooluserlocation.md | 4 - docs/sdks/analytics/README.md | 8 +- docs/sdks/apikeys/README.md | 32 +-- docs/sdks/chat/README.md | 90 ------ docs/sdks/completions/README.md | 62 ----- docs/sdks/models/README.md | 10 +- docs/sdks/oauth/README.md | 10 - docs/sdks/responses/README.md | 220 +-------------- examples/betaResponsesSend.example.ts | 110 +------- jsr.json | 2 +- package-lock.json | 4 +- package.json | 2 +- src/lib/config.ts | 6 +- 162 files changed, 175 insertions(+), 2813 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index d63f4635..465c3544 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: 8b6cd71c-ea04-44da-af45-e43968b5928d management: docChecksum: 6676183700397400ca1cc3c4e2b3fa14 docVersion: 1.0.0 - speakeasyVersion: 1.643.2 - generationVersion: 2.731.6 - releaseVersion: 0.0.1 - configChecksum: 666b1fff65c09de3e844f1f1a31ce723 + speakeasyVersion: 1.648.1 + generationVersion: 2.739.1 + releaseVersion: 0.1.0 + configChecksum: d449583229f714111a3a63d351a07b1f repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git installationURL: https://github.com/OpenRouterTeam/typescript-sdk published: true @@ -15,7 +15,7 @@ features: acceptHeaders: 2.81.2 additionalDependencies: 0.1.0 constsAndDefaults: 0.1.12 - core: 3.24.1 + core: 3.26.0 customCodeRegions: 0.1.0 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 @@ -25,7 +25,7 @@ features: globalSecurity: 2.82.14 globalSecurityCallbacks: 0.1.0 globalSecurityFlattening: 0.1.0 - globalServerURLs: 2.82.5 + globalServerURLs: 2.83.0 groups: 2.81.3 methodArguments: 0.1.2 methodSecurity: 2.82.6 @@ -1132,13 +1132,13 @@ examples: default: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"key": ""}}, "user_id": ""} + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "403": - application/json: {"error": {"code": 403, "message": "Only provisioning keys can perform this operation", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 403, "message": "Only provisioning keys can perform this operation"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} getCredits: speakeasy-default-get-credits: responses: @@ -1151,11 +1151,11 @@ examples: 5XX: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header", "metadata": {"key": ""}}, "user_id": null} + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "403": - application/json: {"error": {"code": 403, "message": "Only provisioning keys can perform this operation", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 403, "message": "Only provisioning keys can perform this operation"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} addCoinbaseCharge: speakeasy-default-add-coinbase-charge: requestBody: @@ -1243,11 +1243,11 @@ examples: default: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header", "metadata": {"key": "", "key1": ""}}, "user_id": null} + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} previewZDR: speakeasy-default-preview-ZDR: responses: @@ -1275,18 +1275,18 @@ examples: default: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "404": - application/json: {"error": {"code": 404, "message": "Resource not found", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 404, "message": "Resource not found"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": ""}}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} listProviders: 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", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} listApiKeys: speakeasy-default-list-api-keys: parameters: @@ -1361,9 +1361,9 @@ examples: default: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": "", "key1": ""}}, "user_id": null} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} exchangeAuthorizationCode: speakeasy-default-exchange-authorization-code: requestBody: @@ -1400,10 +1400,10 @@ examples: createCompletions: speakeasy-default-create-completions: requestBody: - application/json: {"model": "Model T", "prompt": "", "best_of": 163488, "echo": true, "frequency_penalty": 27.55, "logit_bias": {"key": 9064.25, "key1": 7698.06, "key2": 6481.8}, "logprobs": 482258, "max_tokens": null, "n": 629532, "presence_penalty": 5430.28, "seed": 853393, "stop": ["", ""], "stream": false, "stream_options": {"include_usage": false}, "suffix": "", "temperature": null, "top_p": 5229.98, "user": "Anita53", "metadata": {"key": "", "key1": ""}, "response_format": {"type": "text"}} + application/json: {"model": "Model T", "prompt": "", "stream": false} responses: "200": - application/json: {"id": "", "object": "text_completion", "created": 2021.59, "model": "Jetta", "system_fingerprint": "", "choices": [], "usage": {"prompt_tokens": 8379.72, "completion_tokens": 7782.47, "total_tokens": 4749.16}} + application/json: {"id": "", "object": "text_completion", "created": 2021.59, "model": "Jetta", "choices": []} "400": application/json: {"error": {"code": "", "message": "", "param": "", "type": ""}} "500": @@ -1422,10 +1422,10 @@ examples: sendChatCompletionRequest: speakeasy-default-send-chat-completion-request: requestBody: - application/json: {"messages": [], "model": "Charger", "frequency_penalty": 8689.88, "logit_bias": {"key": 4876.54, "key1": 7346.88}, "logprobs": false, "top_logprobs": 2140.15, "max_completion_tokens": 89.43, "max_tokens": 7392.4, "metadata": {"key": "", "key1": "", "key2": ""}, "presence_penalty": 9132.54, "reasoning": {"effort": "medium", "summary": null}, "response_format": {"type": "grammar", "grammar": ""}, "seed": null, "stop": [], "stream": false, "stream_options": {"include_usage": true}, "temperature": 1, "tool_choice": "", "tools": [{"type": "function", "function": {"name": "", "description": "pro even bank rewarding ha modulo aboard mentor", "parameters": {"key": ""}, "strict": null}}], "top_p": 1, "user": "Francesco.Bartell"} + application/json: {"messages": [], "model": "Charger", "stream": false} responses: "200": - application/json: {"id": "", "choices": [], "created": 2736.96, "model": "Impala", "object": "chat.completion", "system_fingerprint": "", "usage": {"completion_tokens": 1508.33, "prompt_tokens": 8882.56, "total_tokens": 6462.52, "completion_tokens_details": {"reasoning_tokens": 29.52, "audio_tokens": 2712.88, "accepted_prediction_tokens": 9343.84, "rejected_prediction_tokens": 3891.43}, "prompt_tokens_details": {"cached_tokens": 8011.45, "audio_tokens": 6106.12}}} + application/json: {"id": "", "choices": [], "created": 2736.96, "model": "Impala", "object": "chat.completion"} "400": application/json: {"error": {"code": "", "message": "", "param": "", "type": ""}} "500": @@ -1479,13 +1479,13 @@ examples: 5XX: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": null}, "user_id": ""} + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} getGeneration: speakeasy-default-get-generation: parameters: @@ -1501,21 +1501,21 @@ examples: 5XX: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header", "metadata": {"key": ""}}, "user_id": ""} + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "402": - application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits"}} "404": - application/json: {"error": {"code": 404, "message": "Resource not found", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 404, "message": "Resource not found"}} "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded", "metadata": {"key": ""}}, "user_id": ""} + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": null}, "user_id": null} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} "502": - application/json: {"error": {"code": 502, "message": "Provider returned error", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 502, "message": "Provider returned error"}} "524": - application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later.", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} "529": - application/json: {"error": {"code": 529, "message": "Provider returned error", "metadata": {"key": ""}}, "user_id": ""} + application/json: {"error": {"code": 529, "message": "Provider returned error"}} listModelsCount: speakeasy-default-list-models-count: responses: @@ -1524,7 +1524,7 @@ examples: default: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} getModels: speakeasy-default-get-models: parameters: @@ -1535,25 +1535,25 @@ examples: use_rss_chat_links: "" responses: "200": - application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "hugging_face_id": "microsoft/DialoGPT-medium", "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", "image_output": 1000, "audio": 1000, "input_audio_cache": "1000", "web_search": 1000, "internal_reasoning": "1000", "input_cache_read": 1000, "input_cache_write": 1000, "discount": 8591.99}, "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}]} application/rss+xml: "" default: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} listModelsUser: speakeasy-default-list-models-user: responses: "200": - application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "hugging_face_id": "microsoft/DialoGPT-medium", "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", "image_output": 1000, "audio": 1000, "input_audio_cache": "1000", "web_search": "1000", "internal_reasoning": 1000, "input_cache_read": 1000, "input_cache_write": 1000, "discount": 389.6}, "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}]} default: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} listEndpoints: speakeasy-default-list-endpoints: parameters: @@ -1562,7 +1562,7 @@ examples: slug: "" 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", "image_output": "1000", "audio": 1000, "input_audio_cache": "1000", "web_search": 1000, "internal_reasoning": 1000, "input_cache_read": 1000, "input_cache_write": "1000", "discount": 5355.68}, "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": -5, "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_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}]}} default: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} 4XX: @@ -1570,22 +1570,22 @@ examples: 5XX: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "404": - application/json: {"error": {"code": 404, "message": "Resource not found", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 404, "message": "Resource not found"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} listEndpointsZdr: speakeasy-default-list-endpoints-zdr: responses: "200": - application/json: {"data": [{"name": "", "model_name": "", "context_length": 8891.09, "pricing": {"prompt": "1000", "completion": 1000, "request": 1000, "image": 1000, "image_output": 1000, "audio": 1000, "input_audio_cache": 1000, "web_search": 1000, "internal_reasoning": "1000", "input_cache_read": 1000, "input_cache_write": 1000, "discount": 6579.66}, "provider_name": "OpenAI", "tag": "", "quantization": "fp16", "max_completion_tokens": 4685.25, "max_prompt_tokens": 22.7, "supported_parameters": ["temperature"], "status": 0, "uptime_last_30m": 6060.66, "supports_implicit_caching": true}]} + application/json: {"data": [{"name": "", "model_name": "", "context_length": 8891.09, "pricing": {"prompt": "1000", "completion": 1000}, "provider_name": "OpenAI", "tag": "", "quantization": "fp16", "max_completion_tokens": 4685.25, "max_prompt_tokens": 22.7, "supported_parameters": ["temperature"], "uptime_last_30m": 6060.66, "supports_implicit_caching": true}]} default: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": ""}}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} createKeys: speakeasy-default-create-keys: requestBody: - application/json: {"name": "My New API Key", "limit": 50, "limit_reset": "monthly", "include_byok_in_limit": true} + application/json: {"name": "My New API Key"} responses: "201": application/json: {"data": {"hash": "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", "name": "My New API Key", "label": "My New API Key", "disabled": false, "limit": 50, "limit_remaining": 50, "limit_reset": "monthly", "include_byok_in_limit": true, "usage": 0, "usage_daily": 0, "usage_weekly": 0, "usage_monthly": 0, "byok_usage": 0, "byok_usage_daily": 0, "byok_usage_weekly": 0, "byok_usage_monthly": 0, "created_at": "2025-08-24T10:30:00Z", "updated_at": null}, "key": "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"} @@ -1596,20 +1596,20 @@ examples: 5XX: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"key": ""}}, "user_id": null} + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} updateKeys: speakeasy-default-update-keys: parameters: path: hash: "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" 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"}} @@ -1620,15 +1620,15 @@ examples: 5XX: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header", "metadata": {"key": ""}}, "user_id": ""} + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "404": - application/json: {"error": {"code": 404, "message": "Resource not found", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 404, "message": "Resource not found"}} "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} deleteKeys: speakeasy-default-delete-keys: parameters: @@ -1644,13 +1644,13 @@ examples: 5XX: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header", "metadata": {"key": ""}}, "user_id": ""} + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "404": - application/json: {"error": {"code": 404, "message": "Resource not found", "metadata": {"key": ""}}, "user_id": ""} + application/json: {"error": {"code": 404, "message": "Resource not found"}} "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded", "metadata": {"key": ""}}, "user_id": null} + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": null} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} getKey: speakeasy-default-get-key: parameters: @@ -1666,70 +1666,70 @@ examples: 5XX: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "404": - application/json: {"error": {"code": 404, "message": "Resource not found", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 404, "message": "Resource not found"}} "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": ""}}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} createResponses: speakeasy-default-create-responses: requestBody: - application/json: {"input": [{"type": "message", "role": "user", "content": "Hello, how are you?"}], "instructions": "", "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", "strict": true, "parameters": {"type": "object", "properties": {"location": {"type": "string"}}}}], "tool_choice": {"type": "function", "name": ""}, "parallel_tool_calls": true, "model": "anthropic/claude-4.5-sonnet-20250929", "models": [""], "text": {"format": {"type": "text"}, "verbosity": "medium"}, "reasoning": {"effort": "high", "summary": "auto", "max_tokens": 8661.16, "enabled": true}, "max_output_tokens": null, "temperature": 0.7, "top_p": 0.9, "top_k": 193.77, "prompt_cache_key": "", "previous_response_id": "", "prompt": {"id": "", "variables": {"key": {"type": "input_text", "text": "Hello, how can I help you?"}}}, "include": ["reasoning.encrypted_content"], "background": true, "safety_identifier": "", "store": true, "service_tier": "auto", "truncation": "auto", "stream": false, "provider": {"allow_fallbacks": null, "require_parameters": true, "data_collection": "deny", "zdr": true, "order": ["OpenAI"], "only": ["OpenAI"], "ignore": null, "quantizations": ["fp16"], "sort": "price", "max_price": {"prompt": "1000", "completion": 1000, "image": 1000, "audio": "1000", "request": 1000}, "experimental": {}}, "plugins": [{"id": "file-parser", "max_files": 4870.55, "pdf": {"engine": "mistral-ocr"}}], "user": "Elmer_Yundt72"} + application/json: {"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": []}]}], "user": "Maria_Zboncak17", "output_text": "", "prompt_cache_key": "", "safety_identifier": "", "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, "cost": 4793.03, "is_byok": false, "cost_details": {"upstream_inference_cost": 2597.96, "upstream_inference_input_cost": 1590.87, "upstream_inference_output_cost": 2325.17}}, "max_tool_calls": 1419.9, "top_logprobs": 1435.99, "max_output_tokens": null, "temperature": null, "top_p": null, "instructions": null, "metadata": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true, "prompt": {"id": "", "variables": {"key": {"type": "input_text", "text": "Hello, how can I help you?"}}}, "background": false, "previous_response_id": "", "reasoning": {"effort": "low", "summary": "concise"}, "service_tier": "priority", "store": true, "truncation": "disabled", "text": {"format": {"type": "text"}, "verbosity": "medium"}} + application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "output": [{"id": "msg-abc123", "role": "assistant", "type": "message", "content": [{"type": "output_text", "text": "Hello! How can I help you today?"}]}], "error": null, "incomplete_details": null, "temperature": null, "top_p": null, "instructions": null, "metadata": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true} "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header", "metadata": {"key": ""}}, "user_id": ""} + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "402": - application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits", "metadata": null}, "user_id": null} + application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits"}} "404": - application/json: {"error": {"code": 404, "message": "Resource not found", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 404, "message": "Resource not found"}} "408": - application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later.", "metadata": {"key": ""}}, "user_id": ""} + application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} "413": - application/json: {"error": {"code": 413, "message": "Request payload too large", "metadata": {"key": ""}}, "user_id": ""} + application/json: {"error": {"code": 413, "message": "Request payload too large"}} "422": - application/json: {"error": {"code": 422, "message": "Invalid argument", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 422, "message": "Invalid argument"}} "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": ""}}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} "502": - application/json: {"error": {"code": 502, "message": "Provider returned error", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 502, "message": "Provider returned error"}} "503": - application/json: {"error": {"code": 503, "message": "Service temporarily unavailable", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}} "524": - application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later.", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} "529": - application/json: {"error": {"code": 529, "message": "Provider returned error", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 529, "message": "Provider returned error"}} 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"} "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "403": - application/json: {"error": {"code": 403, "message": "Only provisioning keys can perform this operation", "metadata": {"key": ""}}, "user_id": ""} + application/json: {"error": {"code": 403, "message": "Only provisioning keys can perform this operation"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": null}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} 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"}} "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"key": ""}}, "user_id": ""} + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": null} + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 1fbcac54..e32f31d1 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -29,7 +29,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: false typescript: - version: 0.0.1 + version: 0.1.0 acceptHeaderEnum: false additionalDependencies: dependencies: {} @@ -39,6 +39,7 @@ typescript: vitest: ^3.2.4 peerDependencies: {} additionalPackageJSON: {} + additionalScripts: {} author: OpenRouter baseErrorName: OpenRouterError clientServerStatusCodesAsErrors: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 7d6aee99..0c480ad6 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.643.2 +speakeasyVersion: 1.648.1 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api @@ -14,7 +14,7 @@ targets: sourceRevisionDigest: sha256:1076c98248df2a8c6c6a22cb2fcefd3a517f2dc346c0c5b410abfe301bdb1dad sourceBlobDigest: sha256:da053f100fc1b8b64975f7612dd8970661444f9156cd295a6cc49fd5914e8247 codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:5ebfa7c0a3f1ea7ef487fc4560666289a2a46e64eb7aefa144a760cb61a65dd4 + codeSamplesRevisionDigest: sha256:812e850dbf1a556527446c6d855475fd5019953bfb0156058fd5e003beb83b79 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/FUNCTIONS.md b/FUNCTIONS.md index 9517c3bd..87e1a23a 100644 --- a/FUNCTIONS.md +++ b/FUNCTIONS.md @@ -29,115 +29,7 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await betaResponsesSend(openRouter, { - input: [ - { - type: "message", - role: "user", - content: "Hello, how are you?", - }, - ], - instructions: "", - 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", - strict: true, - parameters: { - "type": "object", - "properties": { - "location": { - "type": "string", - }, - }, - }, - }, - ], - toolChoice: { - type: "function", - name: "", - }, - parallelToolCalls: true, - model: "anthropic/claude-4.5-sonnet-20250929", - models: [ - "", - ], - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, - reasoning: { - effort: "high", - summary: "auto", - maxTokens: 8661.16, - enabled: true, - }, - maxOutputTokens: null, - temperature: 0.7, - topP: 0.9, - topK: 193.77, - promptCacheKey: "", - previousResponseId: "", - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - include: [ - "reasoning.encrypted_content", - ], - background: true, - safetyIdentifier: "", - store: true, - serviceTier: "auto", - truncation: "auto", - provider: { - allowFallbacks: null, - requireParameters: true, - dataCollection: "deny", - zdr: true, - order: [ - "OpenAI", - ], - only: [ - "OpenAI", - ], - ignore: null, - quantizations: [ - "fp16", - ], - sort: "price", - maxPrice: { - prompt: "1000", - completion: 1000, - image: 1000, - audio: "1000", - request: 1000, - }, - experimental: {}, - }, - plugins: [ - { - id: "file-parser", - maxFiles: 4870.55, - pdf: { - engine: "mistral-ocr", - }, - }, - ], - user: "Elmer_Yundt72", - }); + const res = await betaResponsesSend(openRouter, {}); if (res.ok) { const { value: result } = res; console.log(result); diff --git a/REACT_QUERY.md b/REACT_QUERY.md index 99c7d001..4dc5b539 100644 --- a/REACT_QUERY.md +++ b/REACT_QUERY.md @@ -53,9 +53,7 @@ from TanStack Query. import { useAnalyticsGetUserActivity } from "@openrouter/sdk/react-query/analyticsGetUserActivity.js"; export function Example() { - const { data, error, status } = useAnalyticsGetUserActivity({ - date: "2025-08-24", - }); + const { data, error, status } = useAnalyticsGetUserActivity(); // Render the UI here... } @@ -73,9 +71,6 @@ import { useAnalyticsGetUserActivity } from "@openrouter/sdk/react-query/analyti export function ExampleWithOptions() { const [enabled, setEnabled] = useState(true); const { data, error, status } = useAnalyticsGetUserActivity( - { - date: "2025-08-24", - }, { // TanStack Query options: enabled, @@ -124,115 +119,7 @@ export function Example() { // Read form data here... - mutate({ - input: [ - { - type: "message", - role: "user", - content: "Hello, how are you?", - }, - ], - instructions: "", - 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", - strict: true, - parameters: { - "type": "object", - "properties": { - "location": { - "type": "string", - }, - }, - }, - }, - ], - toolChoice: { - type: "function", - name: "", - }, - parallelToolCalls: true, - model: "anthropic/claude-4.5-sonnet-20250929", - models: [ - "", - ], - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, - reasoning: { - effort: "high", - summary: "auto", - maxTokens: 8661.16, - enabled: true, - }, - maxOutputTokens: null, - temperature: 0.7, - topP: 0.9, - topK: 193.77, - promptCacheKey: "", - previousResponseId: "", - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - include: [ - "reasoning.encrypted_content", - ], - background: true, - safetyIdentifier: "", - store: true, - serviceTier: "auto", - truncation: "auto", - provider: { - allowFallbacks: null, - requireParameters: true, - dataCollection: "deny", - zdr: true, - order: [ - "OpenAI", - ], - only: [ - "OpenAI", - ], - ignore: null, - quantizations: [ - "fp16", - ], - sort: "price", - maxPrice: { - prompt: "1000", - completion: 1000, - image: 1000, - audio: "1000", - request: 1000, - }, - experimental: {}, - }, - plugins: [ - { - id: "file-parser", - maxFiles: 4870.55, - pdf: { - engine: "mistral-ocr", - }, - }, - ], - user: "Elmer_Yundt72", - }); + mutate({}); }} > {/* Form fields go here... */} @@ -366,9 +253,7 @@ export function App() { } function Example() { - const { data } = useAnalyticsGetUserActivitySuspense({ - date: "2025-08-24", - }); + const { data } = useAnalyticsGetUserActivitySuspense(); // Render the UI here... } @@ -396,9 +281,7 @@ export default async function Page() { apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); - await prefetchAnalyticsGetUserActivity(queryClient, openRouter, { - date: "2025-08-24", - }); + await prefetchAnalyticsGetUserActivity(openRouter); return ( // HydrationBoundary is a Client Component, so hydration will happen there. diff --git a/USAGE.md b/USAGE.md index 2d92cf8f..04ed8bad 100644 --- a/USAGE.md +++ b/USAGE.md @@ -7,115 +7,7 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.beta.responses.send({ - input: [ - { - type: "message", - role: "user", - content: "Hello, how are you?", - }, - ], - instructions: "", - 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", - strict: true, - parameters: { - "type": "object", - "properties": { - "location": { - "type": "string", - }, - }, - }, - }, - ], - toolChoice: { - type: "function", - name: "", - }, - parallelToolCalls: true, - model: "anthropic/claude-4.5-sonnet-20250929", - models: [ - "", - ], - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, - reasoning: { - effort: "high", - summary: "auto", - maxTokens: 8661.16, - enabled: true, - }, - maxOutputTokens: null, - temperature: 0.7, - topP: 0.9, - topK: 193.77, - promptCacheKey: "", - previousResponseId: "", - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - include: [ - "reasoning.encrypted_content", - ], - background: true, - safetyIdentifier: "", - store: true, - serviceTier: "auto", - truncation: "auto", - provider: { - allowFallbacks: null, - requireParameters: true, - dataCollection: "deny", - zdr: true, - order: [ - "OpenAI", - ], - only: [ - "OpenAI", - ], - ignore: null, - quantizations: [ - "fp16", - ], - sort: "price", - maxPrice: { - prompt: "1000", - completion: 1000, - image: 1000, - audio: "1000", - request: 1000, - }, - experimental: {}, - }, - plugins: [ - { - id: "file-parser", - maxFiles: 4870.55, - pdf: { - engine: "mistral-ocr", - }, - }, - ], - user: "Elmer_Yundt72", - }); + const result = await openRouter.beta.responses.send({}); console.log(result); } diff --git a/docs/models/assistantmessage.md b/docs/models/assistantmessage.md index 8d2ce593..397fae22 100644 --- a/docs/models/assistantmessage.md +++ b/docs/models/assistantmessage.md @@ -7,20 +7,6 @@ import { AssistantMessage } from "@openrouter/sdk/models"; let value: AssistantMessage = { role: "assistant", - content: "", - name: "", - toolCalls: [ - { - id: "", - type: "function", - function: { - name: "", - arguments: "", - }, - }, - ], - refusal: "", - reasoning: "", }; ``` diff --git a/docs/models/badgatewayresponseerrordata.md b/docs/models/badgatewayresponseerrordata.md index cba5a5af..667111f1 100644 --- a/docs/models/badgatewayresponseerrordata.md +++ b/docs/models/badgatewayresponseerrordata.md @@ -10,11 +10,6 @@ import { BadGatewayResponseErrorData } from "@openrouter/sdk/models"; let value: BadGatewayResponseErrorData = { code: 502, message: "Provider returned error", - metadata: { - "key": "", - "key1": "", - "key2": "", - }, }; ``` diff --git a/docs/models/badrequestresponseerrordata.md b/docs/models/badrequestresponseerrordata.md index 8a79ba3e..84693b01 100644 --- a/docs/models/badrequestresponseerrordata.md +++ b/docs/models/badrequestresponseerrordata.md @@ -10,7 +10,6 @@ import { BadRequestResponseErrorData } from "@openrouter/sdk/models"; let value: BadRequestResponseErrorData = { code: 400, message: "Invalid request parameters", - metadata: null, }; ``` diff --git a/docs/models/chatgenerationparams.md b/docs/models/chatgenerationparams.md index ce553d43..cc3d6483 100644 --- a/docs/models/chatgenerationparams.md +++ b/docs/models/chatgenerationparams.md @@ -10,57 +10,9 @@ let value: ChatGenerationParams = { { role: "system", content: "", - name: "", }, ], model: "Mustang", - frequencyPenalty: 7589.96, - logitBias: { - "key": 847.22, - "key1": 4831.07, - "key2": 1268.36, - }, - logprobs: true, - topLogprobs: 1190.39, - maxCompletionTokens: 4025.63, - maxTokens: 6504, - metadata: { - "key": "", - }, - presencePenalty: 7597.29, - reasoning: { - effort: "minimal", - summary: "detailed", - }, - responseFormat: { - type: "text", - }, - seed: 493978, - stop: [ - "", - "", - ], - streamOptions: { - includeUsage: true, - }, - temperature: 7887.12, - toolChoice: "", - tools: [ - { - type: "function", - function: { - name: "", - description: "cutover eek excepting behind fall peter even", - parameters: { - "key": "", - "key1": "", - }, - strict: true, - }, - }, - ], - topP: 2113.35, - user: "Lina_Beier39", }; ``` diff --git a/docs/models/chatgenerationparamsresponseformatunion.md b/docs/models/chatgenerationparamsresponseformatunion.md index fbb7e98a..6050c061 100644 --- a/docs/models/chatgenerationparamsresponseformatunion.md +++ b/docs/models/chatgenerationparamsresponseformatunion.md @@ -26,13 +26,6 @@ const value: models.ResponseFormatJSONSchema = { type: "json_schema", jsonSchema: { name: "", - description: "circa or and", - schema: { - "key": "", - "key1": "", - "key2": "", - }, - strict: false, }, }; ``` diff --git a/docs/models/chatgenerationtokenusage.md b/docs/models/chatgenerationtokenusage.md index 8515a8a0..e5ba6582 100644 --- a/docs/models/chatgenerationtokenusage.md +++ b/docs/models/chatgenerationtokenusage.md @@ -9,16 +9,6 @@ let value: ChatGenerationTokenUsage = { completionTokens: 9399.77, promptTokens: 9559.6, totalTokens: 7060.03, - completionTokensDetails: { - reasoningTokens: 1093.75, - audioTokens: 130.3, - acceptedPredictionTokens: 7308.38, - rejectedPredictionTokens: 2801.33, - }, - promptTokensDetails: { - cachedTokens: 1522.95, - audioTokens: 8854.61, - }, }; ``` diff --git a/docs/models/chatmessagecontentitem.md b/docs/models/chatmessagecontentitem.md index 75f7dc85..5e04a604 100644 --- a/docs/models/chatmessagecontentitem.md +++ b/docs/models/chatmessagecontentitem.md @@ -19,7 +19,6 @@ const value: models.ChatMessageContentItemImage = { type: "image_url", imageUrl: { url: "https://better-nephew.com/", - detail: "low", }, }; ``` diff --git a/docs/models/chatmessagecontentitemimage.md b/docs/models/chatmessagecontentitemimage.md index ea9381e3..7341c287 100644 --- a/docs/models/chatmessagecontentitemimage.md +++ b/docs/models/chatmessagecontentitemimage.md @@ -9,7 +9,6 @@ let value: ChatMessageContentItemImage = { type: "image_url", imageUrl: { url: "https://better-nephew.com/", - detail: "low", }, }; ``` diff --git a/docs/models/chatmessagetokenlogprob.md b/docs/models/chatmessagetokenlogprob.md index 31c9087b..2d09ed76 100644 --- a/docs/models/chatmessagetokenlogprob.md +++ b/docs/models/chatmessagetokenlogprob.md @@ -12,11 +12,9 @@ let value: ChatMessageTokenLogprob = { topLogprobs: [ { token: "", - logprob: 1362.57, + logprob: 9715.54, bytes: [ - 7000.29, - 7450.46, - 6296.9, + 7041.35, ], }, ], diff --git a/docs/models/chatmessagetokenlogprobs.md b/docs/models/chatmessagetokenlogprobs.md index f9766edd..01cd792f 100644 --- a/docs/models/chatmessagetokenlogprobs.md +++ b/docs/models/chatmessagetokenlogprobs.md @@ -9,26 +9,30 @@ let value: ChatMessageTokenLogprobs = { content: [ { token: "", - logprob: 7572.98, + logprob: 2764.68, bytes: [ - 9191.5, - 2986.81, - 8603.48, + 1199.17, + 6426.57, ], topLogprobs: [ { token: "", - logprob: 1362.57, + logprob: 9715.54, bytes: [ - 7000.29, - 7450.46, - 6296.9, + 7041.35, ], }, ], }, ], - refusal: [], + refusal: [ + { + token: "", + logprob: 9280.35, + bytes: [], + topLogprobs: [], + }, + ], }; ``` diff --git a/docs/models/chatresponse.md b/docs/models/chatresponse.md index c3707bed..f9acf36c 100644 --- a/docs/models/chatresponse.md +++ b/docs/models/chatresponse.md @@ -11,22 +11,6 @@ let value: ChatResponse = { created: 9184.01, model: "Focus", object: "chat.completion", - systemFingerprint: "", - usage: { - completionTokens: 6813.22, - promptTokens: 9802.3, - totalTokens: 8877.64, - completionTokensDetails: { - reasoningTokens: 1093.75, - audioTokens: 130.3, - acceptedPredictionTokens: 7308.38, - rejectedPredictionTokens: 2801.33, - }, - promptTokensDetails: { - cachedTokens: 1522.95, - audioTokens: 8854.61, - }, - }, }; ``` diff --git a/docs/models/chatresponsechoice.md b/docs/models/chatresponsechoice.md index fcb7ae47..58451f44 100644 --- a/docs/models/chatresponsechoice.md +++ b/docs/models/chatresponsechoice.md @@ -10,45 +10,6 @@ let value: ChatResponseChoice = { index: 2823.76, message: { role: "assistant", - content: "", - name: "", - toolCalls: [ - { - id: "", - type: "function", - function: { - name: "", - arguments: "", - }, - }, - ], - refusal: "", - reasoning: "", - }, - logprobs: { - content: [ - { - token: "", - logprob: 7572.98, - bytes: [ - 9191.5, - 2986.81, - 8603.48, - ], - topLogprobs: [ - { - token: "", - logprob: 1362.57, - bytes: [ - 7000.29, - 7450.46, - 6296.9, - ], - }, - ], - }, - ], - refusal: [], }, }; ``` diff --git a/docs/models/chatstreamingchoice.md b/docs/models/chatstreamingchoice.md index 525f1758..8751bd5a 100644 --- a/docs/models/chatstreamingchoice.md +++ b/docs/models/chatstreamingchoice.md @@ -6,49 +6,9 @@ import { ChatStreamingChoice } from "@openrouter/sdk/models"; let value: ChatStreamingChoice = { - delta: { - role: "assistant", - content: "", - reasoning: "", - refusal: "", - toolCalls: [ - { - index: 932.78, - id: "", - function: { - name: "", - arguments: "", - }, - }, - ], - }, + delta: {}, finishReason: "error", index: 3511.86, - logprobs: { - content: [ - { - token: "", - logprob: 7572.98, - bytes: [ - 9191.5, - 2986.81, - 8603.48, - ], - topLogprobs: [ - { - token: "", - logprob: 1362.57, - bytes: [ - 7000.29, - 7450.46, - 6296.9, - ], - }, - ], - }, - ], - refusal: [], - }, }; ``` diff --git a/docs/models/chatstreamingmessagechunk.md b/docs/models/chatstreamingmessagechunk.md index c0931e0a..a14127a2 100644 --- a/docs/models/chatstreamingmessagechunk.md +++ b/docs/models/chatstreamingmessagechunk.md @@ -5,22 +5,7 @@ ```typescript import { ChatStreamingMessageChunk } from "@openrouter/sdk/models"; -let value: ChatStreamingMessageChunk = { - role: "assistant", - content: "", - reasoning: "", - refusal: "", - toolCalls: [ - { - index: 932.78, - id: "", - function: { - name: "", - arguments: "", - }, - }, - ], -}; +let value: ChatStreamingMessageChunk = {}; ``` ## Fields diff --git a/docs/models/chatstreamingmessagetoolcall.md b/docs/models/chatstreamingmessagetoolcall.md index b457802a..5f7085db 100644 --- a/docs/models/chatstreamingmessagetoolcall.md +++ b/docs/models/chatstreamingmessagetoolcall.md @@ -7,11 +7,6 @@ import { ChatStreamingMessageToolCall } from "@openrouter/sdk/models"; let value: ChatStreamingMessageToolCall = { index: 3974.82, - id: "", - function: { - name: "", - arguments: "", - }, }; ``` diff --git a/docs/models/chatstreamingmessagetoolcallfunction.md b/docs/models/chatstreamingmessagetoolcallfunction.md index 8ba1953f..8c28ab9f 100644 --- a/docs/models/chatstreamingmessagetoolcallfunction.md +++ b/docs/models/chatstreamingmessagetoolcallfunction.md @@ -5,10 +5,7 @@ ```typescript import { ChatStreamingMessageToolCallFunction } from "@openrouter/sdk/models"; -let value: ChatStreamingMessageToolCallFunction = { - name: "", - arguments: "", -}; +let value: ChatStreamingMessageToolCallFunction = {}; ``` ## Fields diff --git a/docs/models/chatstreamingresponsechunk.md b/docs/models/chatstreamingresponsechunk.md index d0f4bf60..21f49bbb 100644 --- a/docs/models/chatstreamingresponsechunk.md +++ b/docs/models/chatstreamingresponsechunk.md @@ -10,74 +10,14 @@ let value: ChatStreamingResponseChunk = { id: "", choices: [ { - delta: { - role: "assistant", - content: "", - reasoning: "", - refusal: "", - toolCalls: [ - { - index: 932.78, - id: "", - function: { - name: "", - arguments: "", - }, - }, - ], - }, - finishReason: "tool_calls", - index: 8525.14, - logprobs: { - content: [ - { - token: "", - logprob: 7572.98, - bytes: [ - 9191.5, - 2986.81, - 8603.48, - ], - topLogprobs: [ - { - token: "", - logprob: 1362.57, - bytes: [ - 7000.29, - 7450.46, - 6296.9, - ], - }, - ], - }, - ], - refusal: [], - }, + delta: {}, + finishReason: "error", + index: 3793.72, }, ], - created: 9152.94, - model: "Model 3", + created: 932.78, + model: "Ranchero", object: "chat.completion.chunk", - systemFingerprint: null, - error: { - message: "", - code: 4181.38, - }, - usage: { - completionTokens: 6813.22, - promptTokens: 9802.3, - totalTokens: 8877.64, - completionTokensDetails: { - reasoningTokens: 1093.75, - audioTokens: 130.3, - acceptedPredictionTokens: 7308.38, - rejectedPredictionTokens: 2801.33, - }, - promptTokensDetails: { - cachedTokens: 1522.95, - audioTokens: 8854.61, - }, - }, }, }; ``` diff --git a/docs/models/chatstreamingresponsechunkdata.md b/docs/models/chatstreamingresponsechunkdata.md index 48a7bf43..550add27 100644 --- a/docs/models/chatstreamingresponsechunkdata.md +++ b/docs/models/chatstreamingresponsechunkdata.md @@ -11,26 +11,6 @@ let value: ChatStreamingResponseChunkData = { created: 3957.6, model: "F-150", object: "chat.completion.chunk", - systemFingerprint: "", - error: { - message: "", - code: 4181.38, - }, - usage: { - completionTokens: 6813.22, - promptTokens: 9802.3, - totalTokens: 8877.64, - completionTokensDetails: { - reasoningTokens: 1093.75, - audioTokens: 130.3, - acceptedPredictionTokens: 7308.38, - rejectedPredictionTokens: 2801.33, - }, - promptTokensDetails: { - cachedTokens: 1522.95, - audioTokens: 8854.61, - }, - }, }; ``` diff --git a/docs/models/chatstreamoptions.md b/docs/models/chatstreamoptions.md index 712a07b6..09880475 100644 --- a/docs/models/chatstreamoptions.md +++ b/docs/models/chatstreamoptions.md @@ -5,9 +5,7 @@ ```typescript import { ChatStreamOptions } from "@openrouter/sdk/models"; -let value: ChatStreamOptions = { - includeUsage: true, -}; +let value: ChatStreamOptions = {}; ``` ## Fields diff --git a/docs/models/completioncreateparams.md b/docs/models/completioncreateparams.md index ef29eea3..a4da2a46 100644 --- a/docs/models/completioncreateparams.md +++ b/docs/models/completioncreateparams.md @@ -8,33 +8,6 @@ import { CompletionCreateParams } from "@openrouter/sdk/models"; let value: CompletionCreateParams = { model: "Model Y", prompt: "", - bestOf: 276224, - echo: true, - frequencyPenalty: 1322.75, - logitBias: { - "key": 108.11, - "key1": 9552.79, - }, - logprobs: null, - maxTokens: 775190, - n: 622592, - presencePenalty: null, - seed: 672410, - stop: [], - streamOptions: { - includeUsage: null, - }, - suffix: "", - temperature: 4914.33, - topP: 8009.56, - user: "Marielle_Runolfsdottir82", - metadata: { - "key": "", - "key1": "", - }, - responseFormat: { - type: "json_object", - }, }; ``` diff --git a/docs/models/completioncreateparamsresponseformatunion.md b/docs/models/completioncreateparamsresponseformatunion.md index c158d613..485f4bc7 100644 --- a/docs/models/completioncreateparamsresponseformatunion.md +++ b/docs/models/completioncreateparamsresponseformatunion.md @@ -26,13 +26,6 @@ const value: models.ResponseFormatJSONSchema = { type: "json_schema", jsonSchema: { name: "", - description: "circa or and", - schema: { - "key": "", - "key1": "", - "key2": "", - }, - strict: false, }, }; ``` diff --git a/docs/models/completionresponse.md b/docs/models/completionresponse.md index 75c245ee..325daa5c 100644 --- a/docs/models/completionresponse.md +++ b/docs/models/completionresponse.md @@ -10,13 +10,7 @@ let value: CompletionResponse = { object: "text_completion", created: 7985.17, model: "Taurus", - systemFingerprint: "", choices: [], - usage: { - promptTokens: 4161.82, - completionTokens: 8658.7, - totalTokens: 8891.62, - }, }; ``` diff --git a/docs/models/completiontokensdetails.md b/docs/models/completiontokensdetails.md index 352cbf4c..3c89a927 100644 --- a/docs/models/completiontokensdetails.md +++ b/docs/models/completiontokensdetails.md @@ -5,12 +5,7 @@ ```typescript import { CompletionTokensDetails } from "@openrouter/sdk/models"; -let value: CompletionTokensDetails = { - reasoningTokens: 5235.84, - audioTokens: 971.85, - acceptedPredictionTokens: 6899.68, - rejectedPredictionTokens: 17.79, -}; +let value: CompletionTokensDetails = {}; ``` ## Fields diff --git a/docs/models/costdetails.md b/docs/models/costdetails.md index 78e036b4..de05fada 100644 --- a/docs/models/costdetails.md +++ b/docs/models/costdetails.md @@ -6,9 +6,8 @@ import { CostDetails } from "@openrouter/sdk/models"; let value: CostDetails = { - upstreamInferenceCost: 5806.85, - upstreamInferenceInputCost: 8922.5, - upstreamInferenceOutputCost: 9156.98, + upstreamInferenceInputCost: 5717.43, + upstreamInferenceOutputCost: 5806.85, }; ``` diff --git a/docs/models/defaultparameters.md b/docs/models/defaultparameters.md index 10a28dca..9a80e9d9 100644 --- a/docs/models/defaultparameters.md +++ b/docs/models/defaultparameters.md @@ -7,11 +7,7 @@ Default parameters for this model ```typescript import { DefaultParameters } from "@openrouter/sdk/models"; -let value: DefaultParameters = { - temperature: 0.7, - topP: 0.9, - frequencyPenalty: 0, -}; +let value: DefaultParameters = {}; ``` ## Fields diff --git a/docs/models/edgenetworktimeoutresponseerrordata.md b/docs/models/edgenetworktimeoutresponseerrordata.md index 1585651e..3e244ae2 100644 --- a/docs/models/edgenetworktimeoutresponseerrordata.md +++ b/docs/models/edgenetworktimeoutresponseerrordata.md @@ -10,9 +10,6 @@ import { EdgeNetworkTimeoutResponseErrorData } from "@openrouter/sdk/models"; let value: EdgeNetworkTimeoutResponseErrorData = { code: 524, message: "Request timed out. Please try again later.", - metadata: { - "key": "", - }, }; ``` diff --git a/docs/models/forbiddenresponseerrordata.md b/docs/models/forbiddenresponseerrordata.md index acc9add1..4e7b81d3 100644 --- a/docs/models/forbiddenresponseerrordata.md +++ b/docs/models/forbiddenresponseerrordata.md @@ -10,10 +10,6 @@ import { ForbiddenResponseErrorData } from "@openrouter/sdk/models"; let value: ForbiddenResponseErrorData = { code: 403, message: "Only provisioning keys can perform this operation", - metadata: { - "key": "", - "key1": "", - }, }; ``` diff --git a/docs/models/imageurl.md b/docs/models/imageurl.md index c839c8eb..ccc845e8 100644 --- a/docs/models/imageurl.md +++ b/docs/models/imageurl.md @@ -7,7 +7,6 @@ import { ImageUrl } from "@openrouter/sdk/models"; let value: ImageUrl = { url: "https://sinful-meal.biz", - detail: "high", }; ``` diff --git a/docs/models/internalserverresponseerrordata.md b/docs/models/internalserverresponseerrordata.md index 4b107f6a..241d4b4d 100644 --- a/docs/models/internalserverresponseerrordata.md +++ b/docs/models/internalserverresponseerrordata.md @@ -10,7 +10,6 @@ import { InternalServerResponseErrorData } from "@openrouter/sdk/models"; let value: InternalServerResponseErrorData = { code: 500, message: "Internal Server Error", - metadata: null, }; ``` diff --git a/docs/models/jsonschemaconfig.md b/docs/models/jsonschemaconfig.md index d73c7ac1..aa34788e 100644 --- a/docs/models/jsonschemaconfig.md +++ b/docs/models/jsonschemaconfig.md @@ -7,13 +7,6 @@ import { JSONSchemaConfig } from "@openrouter/sdk/models"; let value: JSONSchemaConfig = { name: "", - description: "as adumbrate fishery dependable cemetery instead nifty ah rule", - schema: { - "key": "", - "key1": "", - "key2": "", - }, - strict: false, }; ``` diff --git a/docs/models/listendpointsresponse.md b/docs/models/listendpointsresponse.md index 47a1b374..71cba3ed 100644 --- a/docs/models/listendpointsresponse.md +++ b/docs/models/listendpointsresponse.md @@ -32,16 +32,6 @@ let value: ListEndpointsResponse = { pricing: { prompt: "0.00003", completion: "0.00006", - request: "0", - image: "0", - imageOutput: "1000", - audio: "1000", - inputAudioCache: 1000, - webSearch: 1000, - internalReasoning: "1000", - inputCacheRead: 1000, - inputCacheWrite: 1000, - discount: 1993.56, }, providerName: "OpenAI", tag: "openai", @@ -55,7 +45,6 @@ let value: ListEndpointsResponse = { "frequency_penalty", "presence_penalty", ], - status: -5, uptimeLast30m: 99.5, supportsImplicitCaching: true, }, diff --git a/docs/models/maxprice.md b/docs/models/maxprice.md index 13f5f613..d2308276 100644 --- a/docs/models/maxprice.md +++ b/docs/models/maxprice.md @@ -7,13 +7,7 @@ The object specifying the maximum price you want to pay for this request. USD pr ```typescript import { MaxPrice } from "@openrouter/sdk/models"; -let value: MaxPrice = { - prompt: 1000, - completion: 1000, - image: 1000, - audio: 1000, - request: "1000", -}; +let value: MaxPrice = {}; ``` ## Fields diff --git a/docs/models/message.md b/docs/models/message.md index f10c07eb..9fb2fe6f 100644 --- a/docs/models/message.md +++ b/docs/models/message.md @@ -9,7 +9,6 @@ const value: models.SystemMessage = { role: "system", content: [], - name: "", }; ``` @@ -19,7 +18,6 @@ const value: models.SystemMessage = { const value: models.UserMessage = { role: "user", content: "", - name: "", }; ``` @@ -29,7 +27,6 @@ const value: models.UserMessage = { const value: models.MessageDeveloper = { role: "developer", content: [], - name: "", }; ``` @@ -38,20 +35,6 @@ const value: models.MessageDeveloper = { ```typescript const value: models.AssistantMessage = { role: "assistant", - content: "", - name: "", - toolCalls: [ - { - id: "", - type: "function", - function: { - name: "", - arguments: "", - }, - }, - ], - refusal: "", - reasoning: "", }; ``` diff --git a/docs/models/messagedeveloper.md b/docs/models/messagedeveloper.md index 5d6567ba..b695c064 100644 --- a/docs/models/messagedeveloper.md +++ b/docs/models/messagedeveloper.md @@ -8,7 +8,6 @@ import { MessageDeveloper } from "@openrouter/sdk/models"; let value: MessageDeveloper = { role: "developer", content: [], - name: "", }; ``` diff --git a/docs/models/model.md b/docs/models/model.md index 6367cb3b..0af49977 100644 --- a/docs/models/model.md +++ b/docs/models/model.md @@ -10,29 +10,14 @@ import { Model } from "@openrouter/sdk/models"; let value: Model = { id: "openai/gpt-4", canonicalSlug: "openai/gpt-4", - huggingFaceId: "microsoft/DialoGPT-medium", 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", - imageOutput: "1000", - audio: "1000", - inputAudioCache: 1000, - webSearch: 1000, - internalReasoning: "1000", - inputCacheRead: 1000, - inputCacheWrite: 1000, - discount: 432.57, }, contextLength: 8192, architecture: { - tokenizer: "GPT", - instructType: "chatml", modality: "text->text", inputModalities: [ "text", @@ -42,8 +27,6 @@ let value: Model = { ], }, topProvider: { - contextLength: 8192, - maxCompletionTokens: 4096, isModerated: true, }, perRequestLimits: null, diff --git a/docs/models/modelarchitecture.md b/docs/models/modelarchitecture.md index 7e34f79e..d30a0bb3 100644 --- a/docs/models/modelarchitecture.md +++ b/docs/models/modelarchitecture.md @@ -8,8 +8,6 @@ Model architecture information import { ModelArchitecture } from "@openrouter/sdk/models"; let value: ModelArchitecture = { - tokenizer: "GPT", - instructType: "chatml", modality: "text->text", inputModalities: [ "text", diff --git a/docs/models/modelslistresponse.md b/docs/models/modelslistresponse.md index 6ce56a2e..30173e62 100644 --- a/docs/models/modelslistresponse.md +++ b/docs/models/modelslistresponse.md @@ -12,29 +12,14 @@ let value: ModelsListResponse = { { id: "openai/gpt-4", canonicalSlug: "openai/gpt-4", - huggingFaceId: "microsoft/DialoGPT-medium", 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", - imageOutput: 1000, - audio: 1000, - inputAudioCache: 1000, - webSearch: 1000, - internalReasoning: 1000, - inputCacheRead: 1000, - inputCacheWrite: 1000, - discount: 254, }, contextLength: 8192, architecture: { - tokenizer: "GPT", - instructType: "chatml", modality: "text->text", inputModalities: [ "text", @@ -44,8 +29,6 @@ let value: ModelsListResponse = { ], }, topProvider: { - contextLength: 8192, - maxCompletionTokens: 4096, isModerated: true, }, perRequestLimits: null, diff --git a/docs/models/notfoundresponseerrordata.md b/docs/models/notfoundresponseerrordata.md index 0092944a..4221a4ff 100644 --- a/docs/models/notfoundresponseerrordata.md +++ b/docs/models/notfoundresponseerrordata.md @@ -10,7 +10,6 @@ import { NotFoundResponseErrorData } from "@openrouter/sdk/models"; let value: NotFoundResponseErrorData = { code: 404, message: "Resource not found", - metadata: null, }; ``` diff --git a/docs/models/openairesponsesincompletedetails.md b/docs/models/openairesponsesincompletedetails.md index a96e1288..2bb30643 100644 --- a/docs/models/openairesponsesincompletedetails.md +++ b/docs/models/openairesponsesincompletedetails.md @@ -5,9 +5,7 @@ ```typescript import { OpenAIResponsesIncompleteDetails } from "@openrouter/sdk/models"; -let value: OpenAIResponsesIncompleteDetails = { - reason: "max_output_tokens", -}; +let value: OpenAIResponsesIncompleteDetails = {}; ``` ## Fields diff --git a/docs/models/openairesponsesinputcontent1.md b/docs/models/openairesponsesinputcontent1.md index 566a0454..f638b252 100644 --- a/docs/models/openairesponsesinputcontent1.md +++ b/docs/models/openairesponsesinputcontent1.md @@ -18,7 +18,6 @@ const value: models.ResponseInputText = { const value: models.ResponseInputImage = { type: "input_image", detail: "auto", - imageUrl: "https://example.com/image.jpg", }; ``` @@ -27,10 +26,6 @@ const value: models.ResponseInputImage = { ```typescript const value: models.ResponseInputFile = { type: "input_file", - fileId: "file-abc123", - fileData: "", - filename: "document.pdf", - fileUrl: "https://prime-bob.info", }; ``` diff --git a/docs/models/openairesponsesinputcontent3.md b/docs/models/openairesponsesinputcontent3.md index ce0509b4..6c3392e7 100644 --- a/docs/models/openairesponsesinputcontent3.md +++ b/docs/models/openairesponsesinputcontent3.md @@ -18,7 +18,6 @@ const value: models.ResponseInputText = { const value: models.ResponseInputImage = { type: "input_image", detail: "auto", - imageUrl: "https://example.com/image.jpg", }; ``` @@ -27,10 +26,6 @@ const value: models.ResponseInputImage = { ```typescript const value: models.ResponseInputFile = { type: "input_file", - fileId: "file-abc123", - fileData: "", - filename: "document.pdf", - fileUrl: "https://prime-bob.info", }; ``` diff --git a/docs/models/openairesponsesinputfunctioncall.md b/docs/models/openairesponsesinputfunctioncall.md index f54f673f..6106247a 100644 --- a/docs/models/openairesponsesinputfunctioncall.md +++ b/docs/models/openairesponsesinputfunctioncall.md @@ -10,8 +10,6 @@ let value: OpenAIResponsesInputFunctionCall = { callId: "", name: "", arguments: "", - id: "", - status: "completed", }; ``` diff --git a/docs/models/openairesponsesinputfunctioncalloutput.md b/docs/models/openairesponsesinputfunctioncalloutput.md index 40b89b8f..dfe990f8 100644 --- a/docs/models/openairesponsesinputfunctioncalloutput.md +++ b/docs/models/openairesponsesinputfunctioncalloutput.md @@ -10,7 +10,6 @@ let value: OpenAIResponsesInputFunctionCallOutput = { id: "", callId: "", output: "", - status: "completed", }; ``` diff --git a/docs/models/openairesponsesinputmessage1.md b/docs/models/openairesponsesinputmessage1.md index 66179631..2e34a547 100644 --- a/docs/models/openairesponsesinputmessage1.md +++ b/docs/models/openairesponsesinputmessage1.md @@ -6,7 +6,6 @@ import { OpenAIResponsesInputMessage1 } from "@openrouter/sdk/models"; let value: OpenAIResponsesInputMessage1 = { - type: "message", role: "assistant", content: "", }; diff --git a/docs/models/openairesponsesinputmessage2.md b/docs/models/openairesponsesinputmessage2.md index 9077e270..dc2a5dcf 100644 --- a/docs/models/openairesponsesinputmessage2.md +++ b/docs/models/openairesponsesinputmessage2.md @@ -7,7 +7,6 @@ import { OpenAIResponsesInputMessage2 } from "@openrouter/sdk/models"; let value: OpenAIResponsesInputMessage2 = { id: "", - type: "message", role: "user", content: [ { diff --git a/docs/models/openairesponsesinputunion1.md b/docs/models/openairesponsesinputunion1.md index 6855633c..08e2be4d 100644 --- a/docs/models/openairesponsesinputunion1.md +++ b/docs/models/openairesponsesinputunion1.md @@ -7,7 +7,6 @@ ```typescript const value: models.OpenAIResponsesInputMessage1 = { - type: "message", role: "assistant", content: "", }; @@ -18,7 +17,6 @@ const value: models.OpenAIResponsesInputMessage1 = { ```typescript const value: models.OpenAIResponsesInputMessage2 = { id: "", - type: "message", role: "user", content: [ { @@ -37,7 +35,6 @@ const value: models.OpenAIResponsesInputFunctionCallOutput = { id: "", callId: "", output: "", - status: "completed", }; ``` @@ -49,8 +46,6 @@ const value: models.OpenAIResponsesInputFunctionCall = { callId: "", name: "", arguments: "", - id: "", - status: "completed", }; ``` @@ -73,19 +68,10 @@ const value: models.OutputMessage = { id: "msg-abc123", role: "assistant", type: "message", - status: "completed", content: [ { type: "output_text", text: "Hello! How can I help you today?", - annotations: [ - { - type: "file_citation", - fileId: "file-abc123", - filename: "research_paper.pdf", - index: 0, - }, - ], }, ], }; diff --git a/docs/models/openairesponsesprompt.md b/docs/models/openairesponsesprompt.md index e023118f..810fe396 100644 --- a/docs/models/openairesponsesprompt.md +++ b/docs/models/openairesponsesprompt.md @@ -7,7 +7,6 @@ import { OpenAIResponsesPrompt } from "@openrouter/sdk/models"; let value: OpenAIResponsesPrompt = { id: "", - variables: null, }; ``` diff --git a/docs/models/openairesponsesreasoningconfig.md b/docs/models/openairesponsesreasoningconfig.md index e203c0ef..d16880b5 100644 --- a/docs/models/openairesponsesreasoningconfig.md +++ b/docs/models/openairesponsesreasoningconfig.md @@ -5,10 +5,7 @@ ```typescript import { OpenAIResponsesReasoningConfig } from "@openrouter/sdk/models"; -let value: OpenAIResponsesReasoningConfig = { - effort: "low", - summary: "concise", -}; +let value: OpenAIResponsesReasoningConfig = {}; ``` ## Fields diff --git a/docs/models/openresponseseasyinputmessage.md b/docs/models/openresponseseasyinputmessage.md index d573a56e..00b9d0cd 100644 --- a/docs/models/openresponseseasyinputmessage.md +++ b/docs/models/openresponseseasyinputmessage.md @@ -6,7 +6,6 @@ import { OpenResponsesEasyInputMessage } from "@openrouter/sdk/models"; let value: OpenResponsesEasyInputMessage = { - type: "message", role: "system", content: "", }; diff --git a/docs/models/openresponseseasyinputmessagecontent1.md b/docs/models/openresponseseasyinputmessagecontent1.md index e46ae749..19dd0807 100644 --- a/docs/models/openresponseseasyinputmessagecontent1.md +++ b/docs/models/openresponseseasyinputmessagecontent1.md @@ -18,7 +18,6 @@ const value: models.ResponseInputText = { const value: models.ResponseInputImage = { type: "input_image", detail: "auto", - imageUrl: "https://example.com/image.jpg", }; ``` @@ -27,10 +26,6 @@ const value: models.ResponseInputImage = { ```typescript const value: models.ResponseInputFile = { type: "input_file", - fileId: "file-abc123", - fileData: "", - filename: "document.pdf", - fileUrl: "https://prime-bob.info", }; ``` diff --git a/docs/models/openresponsesfunctioncalloutput.md b/docs/models/openresponsesfunctioncalloutput.md index cfc9c672..64e8c632 100644 --- a/docs/models/openresponsesfunctioncalloutput.md +++ b/docs/models/openresponsesfunctioncalloutput.md @@ -12,7 +12,6 @@ let value: OpenResponsesFunctionCallOutput = { id: "output-abc123", callId: "call-abc123", output: "{\"temperature\":72,\"conditions\":\"sunny\"}", - status: "completed", }; ``` diff --git a/docs/models/openresponsesfunctiontoolcall.md b/docs/models/openresponsesfunctiontoolcall.md index ac7534df..89b211c4 100644 --- a/docs/models/openresponsesfunctiontoolcall.md +++ b/docs/models/openresponsesfunctiontoolcall.md @@ -13,7 +13,6 @@ let value: OpenResponsesFunctionToolCall = { name: "get_weather", arguments: "{\"location\":\"San Francisco\"}", id: "call-abc123", - status: "completed", }; ``` diff --git a/docs/models/openresponsesinput.md b/docs/models/openresponsesinput.md index a37b43e1..379d0911 100644 --- a/docs/models/openresponsesinput.md +++ b/docs/models/openresponsesinput.md @@ -17,7 +17,6 @@ const value: string = ```typescript const value: models.OpenResponsesInput1[] = [ { - type: "message", role: "user", content: "What is the weather today?", }, diff --git a/docs/models/openresponsesinput1.md b/docs/models/openresponsesinput1.md index 5cae202c..7ec6d5fc 100644 --- a/docs/models/openresponsesinput1.md +++ b/docs/models/openresponsesinput1.md @@ -9,22 +9,12 @@ const value: models.OpenResponsesReasoning = { type: "reasoning", id: "reasoning-abc123", - content: [ - { - type: "reasoning_text", - text: "Let me think step by step about this problem...", - }, - ], summary: [ { type: "summary_text", text: "Analyzed the problem using first principles", }, ], - encryptedContent: "", - status: "completed", - signature: "", - format: "unknown", }; ``` @@ -32,7 +22,6 @@ const value: models.OpenResponsesReasoning = { ```typescript const value: models.OpenResponsesEasyInputMessage = { - type: "message", role: "system", content: "", }; @@ -42,8 +31,6 @@ const value: models.OpenResponsesEasyInputMessage = { ```typescript const value: models.OpenResponsesInputMessageItem = { - id: "", - type: "message", role: "system", content: [ { @@ -63,7 +50,6 @@ const value: models.OpenResponsesFunctionToolCall = { name: "get_weather", arguments: "{\"location\":\"San Francisco\"}", id: "call-abc123", - status: "completed", }; ``` @@ -75,7 +61,6 @@ const value: models.OpenResponsesFunctionCallOutput = { id: "output-abc123", callId: "call-abc123", output: "{\"temperature\":72,\"conditions\":\"sunny\"}", - status: "completed", }; ``` @@ -86,19 +71,10 @@ const value: models.ResponsesOutputMessage = { id: "msg-abc123", role: "assistant", type: "message", - status: "completed", content: [ { type: "output_text", text: "Hello! How can I help you today?", - annotations: [ - { - type: "file_citation", - fileId: "file-abc123", - filename: "research_paper.pdf", - index: 0, - }, - ], }, ], }; @@ -109,21 +85,12 @@ const value: models.ResponsesOutputMessage = { ```typescript const value: models.ResponsesOutputItemReasoning = { type: "reasoning", - id: "reasoning-123", - content: [ - { - type: "reasoning_text", - text: "First, we analyze the problem...", - }, - ], summary: [ { type: "summary_text", text: "Analyzed the problem and found the optimal solution.", }, ], - encryptedContent: "", - status: "completed", }; ``` @@ -132,11 +99,9 @@ const value: models.ResponsesOutputItemReasoning = { ```typescript const value: models.ResponsesOutputItemFunctionCall = { type: "function_call", - id: "call-abc123", name: "get_weather", arguments: "{\"location\":\"San Francisco\",\"unit\":\"celsius\"}", callId: "call-abc123", - status: "in_progress", }; ``` diff --git a/docs/models/openresponsesinputmessageitem.md b/docs/models/openresponsesinputmessageitem.md index 99b90349..5bcb8590 100644 --- a/docs/models/openresponsesinputmessageitem.md +++ b/docs/models/openresponsesinputmessageitem.md @@ -6,8 +6,6 @@ import { OpenResponsesInputMessageItem } from "@openrouter/sdk/models"; let value: OpenResponsesInputMessageItem = { - id: "", - type: "message", role: "system", content: [ { diff --git a/docs/models/openresponsesinputmessageitemcontent.md b/docs/models/openresponsesinputmessageitemcontent.md index 1a8a5718..ac5c8fe9 100644 --- a/docs/models/openresponsesinputmessageitemcontent.md +++ b/docs/models/openresponsesinputmessageitemcontent.md @@ -18,7 +18,6 @@ const value: models.ResponseInputText = { const value: models.ResponseInputImage = { type: "input_image", detail: "auto", - imageUrl: "https://example.com/image.jpg", }; ``` @@ -27,10 +26,6 @@ const value: models.ResponseInputImage = { ```typescript const value: models.ResponseInputFile = { type: "input_file", - fileId: "file-abc123", - fileData: "", - filename: "document.pdf", - fileUrl: "https://prime-bob.info", }; ``` diff --git a/docs/models/openresponseslogprobs.md b/docs/models/openresponseslogprobs.md index d96664ba..378b69f7 100644 --- a/docs/models/openresponseslogprobs.md +++ b/docs/models/openresponseslogprobs.md @@ -10,12 +10,6 @@ import { OpenResponsesLogProbs } from "@openrouter/sdk/models"; let value: OpenResponsesLogProbs = { logprob: -0.1, token: "world", - topLogprobs: [ - { - token: "hello", - logprob: -0.5, - }, - ], }; ``` diff --git a/docs/models/openresponsesnonstreamingresponse.md b/docs/models/openresponsesnonstreamingresponse.md index a8f000ab..8c04096f 100644 --- a/docs/models/openresponsesnonstreamingresponse.md +++ b/docs/models/openresponsesnonstreamingresponse.md @@ -12,49 +12,21 @@ let value: OpenResponsesNonStreamingResponse = { object: "response", createdAt: 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: [], }, ], }, ], - user: null, - outputText: "", - promptCacheKey: "", - safetyIdentifier: null, error: null, incompleteDetails: null, - usage: { - inputTokens: 10, - inputTokensDetails: { - cachedTokens: 0, - }, - outputTokens: 25, - outputTokensDetails: { - reasoningTokens: 0, - }, - totalTokens: 35, - cost: 9884.38, - isByok: false, - costDetails: { - upstreamInferenceCost: 8999.13, - upstreamInferenceInputCost: 2970.58, - upstreamInferenceOutputCost: 9667.63, - }, - }, - maxToolCalls: 7955.39, - topLogprobs: 8982.36, - maxOutputTokens: null, temperature: null, topP: null, instructions: null, @@ -62,30 +34,6 @@ let value: OpenResponsesNonStreamingResponse = { tools: [], toolChoice: "auto", parallelToolCalls: true, - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - background: true, - previousResponseId: "", - reasoning: { - effort: "medium", - summary: "auto", - }, - serviceTier: "default", - store: true, - truncation: "disabled", - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, }; ``` diff --git a/docs/models/openresponsesnonstreamingresponsetoolfunction.md b/docs/models/openresponsesnonstreamingresponsetoolfunction.md index fe268fe3..78454132 100644 --- a/docs/models/openresponsesnonstreamingresponsetoolfunction.md +++ b/docs/models/openresponsesnonstreamingresponsetoolfunction.md @@ -10,8 +10,6 @@ import { OpenResponsesNonStreamingResponseToolFunction } from "@openrouter/sdk/m let value: OpenResponsesNonStreamingResponseToolFunction = { type: "function", name: "get_weather", - description: "Get the current weather in a location", - strict: true, parameters: { "type": "object", "properties": { diff --git a/docs/models/openresponsesnonstreamingresponsetoolunion.md b/docs/models/openresponsesnonstreamingresponsetoolunion.md index 8d82d4aa..2ae4e46d 100644 --- a/docs/models/openresponsesnonstreamingresponsetoolunion.md +++ b/docs/models/openresponsesnonstreamingresponsetoolunion.md @@ -9,8 +9,6 @@ const value: models.OpenResponsesNonStreamingResponseToolFunction = { type: "function", name: "get_weather", - description: "Get the current weather in a location", - strict: true, parameters: { "type": "object", "properties": { @@ -39,14 +37,6 @@ const value: models.OpenResponsesNonStreamingResponseToolFunction = { ```typescript const value: models.OpenResponsesWebSearchPreviewTool = { type: "web_search_preview", - searchContextSize: "medium", - userLocation: { - type: "approximate", - city: "New Amelie", - country: "Liberia", - region: null, - timezone: "Europe/Minsk", - }, }; ``` @@ -55,14 +45,6 @@ const value: models.OpenResponsesWebSearchPreviewTool = { ```typescript const value: models.OpenResponsesWebSearchPreview20250311Tool = { type: "web_search_preview_2025_03_11", - searchContextSize: "medium", - userLocation: { - type: "approximate", - city: "New Amelie", - country: "Liberia", - region: null, - timezone: "Europe/Minsk", - }, }; ``` @@ -71,19 +53,6 @@ const value: models.OpenResponsesWebSearchPreview20250311Tool = { ```typescript const value: models.OpenResponsesWebSearchTool = { type: "web_search", - filters: { - allowedDomains: [ - "example.com", - ], - }, - searchContextSize: "medium", - userLocation: { - type: "approximate", - city: "San Francisco", - country: "USA", - region: "California", - timezone: "America/Los_Angeles", - }, }; ``` @@ -92,19 +61,6 @@ const value: models.OpenResponsesWebSearchTool = { ```typescript const value: models.OpenResponsesWebSearch20250826Tool = { type: "web_search_2025_08_26", - filters: { - allowedDomains: [ - "example.com", - ], - }, - searchContextSize: "medium", - userLocation: { - type: "approximate", - city: "San Francisco", - country: "USA", - region: "California", - timezone: "America/Los_Angeles", - }, }; ``` diff --git a/docs/models/openresponsesreasoning.md b/docs/models/openresponsesreasoning.md index f979f305..927c73cc 100644 --- a/docs/models/openresponsesreasoning.md +++ b/docs/models/openresponsesreasoning.md @@ -10,22 +10,12 @@ import { OpenResponsesReasoning } from "@openrouter/sdk/models"; let value: OpenResponsesReasoning = { type: "reasoning", id: "reasoning-abc123", - content: [ - { - type: "reasoning_text", - text: "Let me think step by step about this problem...", - }, - ], summary: [ { type: "summary_text", text: "Analyzed the problem using first principles", }, ], - encryptedContent: "", - status: "completed", - signature: "", - format: "anthropic-claude-v1", }; ``` diff --git a/docs/models/openresponsesreasoningconfig.md b/docs/models/openresponsesreasoningconfig.md index b7c0f1b4..04d610fe 100644 --- a/docs/models/openresponsesreasoningconfig.md +++ b/docs/models/openresponsesreasoningconfig.md @@ -7,12 +7,7 @@ Configuration for reasoning mode in the response ```typescript import { OpenResponsesReasoningConfig } from "@openrouter/sdk/models"; -let value: OpenResponsesReasoningConfig = { - effort: "minimal", - summary: "auto", - maxTokens: 5685.88, - enabled: true, -}; +let value: OpenResponsesReasoningConfig = {}; ``` ## Fields diff --git a/docs/models/openresponsesrequest.md b/docs/models/openresponsesrequest.md index b49483c8..08bafb3e 100644 --- a/docs/models/openresponsesrequest.md +++ b/docs/models/openresponsesrequest.md @@ -7,116 +7,7 @@ Request schema for Responses endpoint ```typescript import { OpenResponsesRequest } from "@openrouter/sdk/models"; -let value: OpenResponsesRequest = { - input: [ - { - type: "message", - role: "user", - content: "Hello, how are you?", - }, - ], - instructions: "", - 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", - strict: false, - parameters: { - "type": "object", - "properties": { - "location": { - "type": "string", - }, - }, - }, - }, - ], - toolChoice: { - type: "function", - name: "", - }, - parallelToolCalls: false, - model: "anthropic/claude-4.5-sonnet-20250929", - models: [ - "", - ], - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, - reasoning: { - effort: "minimal", - summary: "auto", - maxTokens: 1146.72, - enabled: true, - }, - maxOutputTokens: 767.63, - temperature: 0.7, - topP: 0.9, - topK: 6337.09, - promptCacheKey: "", - previousResponseId: "", - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - include: [ - "message.input_image.image_url", - ], - background: true, - safetyIdentifier: "", - store: true, - serviceTier: "auto", - truncation: "auto", - provider: { - allowFallbacks: true, - requireParameters: false, - dataCollection: "deny", - zdr: true, - order: [ - "OpenAI", - ], - only: [ - "OpenAI", - ], - ignore: [ - "OpenAI", - ], - quantizations: [ - "fp16", - ], - sort: "price", - maxPrice: { - prompt: 1000, - completion: 1000, - image: "1000", - audio: 1000, - request: 1000, - }, - experimental: {}, - }, - plugins: [ - { - id: "web", - maxResults: 2403.86, - searchPrompt: "", - engine: "exa", - }, - ], - user: "Lavina88", -}; +let value: OpenResponsesRequest = {}; ``` ## Fields diff --git a/docs/models/openresponsesrequesttoolfunction.md b/docs/models/openresponsesrequesttoolfunction.md index 6073ef3d..db8c2b4b 100644 --- a/docs/models/openresponsesrequesttoolfunction.md +++ b/docs/models/openresponsesrequesttoolfunction.md @@ -10,8 +10,6 @@ import { OpenResponsesRequestToolFunction } from "@openrouter/sdk/models"; let value: OpenResponsesRequestToolFunction = { type: "function", name: "get_weather", - description: "Get the current weather in a location", - strict: true, parameters: { "type": "object", "properties": { diff --git a/docs/models/openresponsesrequesttoolunion.md b/docs/models/openresponsesrequesttoolunion.md index 1ae9a6c0..bcdfa06a 100644 --- a/docs/models/openresponsesrequesttoolunion.md +++ b/docs/models/openresponsesrequesttoolunion.md @@ -9,8 +9,6 @@ const value: models.OpenResponsesRequestToolFunction = { type: "function", name: "get_weather", - description: "Get the current weather in a location", - strict: true, parameters: { "type": "object", "properties": { @@ -39,14 +37,6 @@ const value: models.OpenResponsesRequestToolFunction = { ```typescript const value: models.OpenResponsesWebSearchPreviewTool = { type: "web_search_preview", - searchContextSize: "medium", - userLocation: { - type: "approximate", - city: "New Amelie", - country: "Liberia", - region: null, - timezone: "Europe/Minsk", - }, }; ``` @@ -55,14 +45,6 @@ const value: models.OpenResponsesWebSearchPreviewTool = { ```typescript const value: models.OpenResponsesWebSearchPreview20250311Tool = { type: "web_search_preview_2025_03_11", - searchContextSize: "medium", - userLocation: { - type: "approximate", - city: "New Amelie", - country: "Liberia", - region: null, - timezone: "Europe/Minsk", - }, }; ``` @@ -71,19 +53,6 @@ const value: models.OpenResponsesWebSearchPreview20250311Tool = { ```typescript const value: models.OpenResponsesWebSearchTool = { type: "web_search", - filters: { - allowedDomains: [ - "example.com", - ], - }, - searchContextSize: "medium", - userLocation: { - type: "approximate", - city: "San Francisco", - country: "USA", - region: "California", - timezone: "America/Los_Angeles", - }, }; ``` @@ -92,19 +61,6 @@ const value: models.OpenResponsesWebSearchTool = { ```typescript const value: models.OpenResponsesWebSearch20250826Tool = { type: "web_search_2025_08_26", - filters: { - allowedDomains: [ - "example.com", - ], - }, - searchContextSize: "medium", - userLocation: { - type: "approximate", - city: "San Francisco", - country: "USA", - region: "California", - timezone: "America/Los_Angeles", - }, }; ``` diff --git a/docs/models/openresponsesresponsetext.md b/docs/models/openresponsesresponsetext.md index 6337e171..576de640 100644 --- a/docs/models/openresponsesresponsetext.md +++ b/docs/models/openresponsesresponsetext.md @@ -7,12 +7,7 @@ Text output configuration including format and verbosity ```typescript import { OpenResponsesResponseText } from "@openrouter/sdk/models"; -let value: OpenResponsesResponseText = { - format: { - type: "text", - }, - verbosity: "medium", -}; +let value: OpenResponsesResponseText = {}; ``` ## Fields diff --git a/docs/models/openresponsesstreamevent.md b/docs/models/openresponsesstreamevent.md index 599b8e1e..4baf7b82 100644 --- a/docs/models/openresponsesstreamevent.md +++ b/docs/models/openresponsesstreamevent.md @@ -15,35 +15,9 @@ const value: models.OpenResponsesStreamEventResponseCreated = { object: "response", createdAt: 1704067200, model: "gpt-4", - status: "in_progress", output: [], - user: "Polly.Oberbrunner", - outputText: "", - promptCacheKey: "", - safetyIdentifier: "", error: null, incompleteDetails: null, - usage: { - inputTokens: 10, - inputTokensDetails: { - cachedTokens: 0, - }, - outputTokens: 25, - outputTokensDetails: { - reasoningTokens: 0, - }, - totalTokens: 35, - cost: 0.0012, - isByok: false, - costDetails: { - upstreamInferenceCost: null, - upstreamInferenceInputCost: 0.0008, - upstreamInferenceOutputCost: 0.0004, - }, - }, - maxToolCalls: 6635.84, - topLogprobs: 7051.98, - maxOutputTokens: null, temperature: null, topP: null, instructions: null, @@ -51,30 +25,6 @@ const value: models.OpenResponsesStreamEventResponseCreated = { tools: [], toolChoice: "auto", parallelToolCalls: true, - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - background: false, - previousResponseId: "", - reasoning: { - effort: "medium", - summary: "auto", - }, - serviceTier: "auto", - store: false, - truncation: "auto", - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, }, sequenceNumber: 0, }; @@ -90,35 +40,9 @@ const value: models.OpenResponsesStreamEventResponseInProgress = { object: "response", createdAt: 1704067200, model: "gpt-4", - status: "in_progress", output: [], - user: "Kale.Mueller", - outputText: "", - promptCacheKey: "", - safetyIdentifier: "", error: null, incompleteDetails: null, - usage: { - inputTokens: 10, - inputTokensDetails: { - cachedTokens: 0, - }, - outputTokens: 25, - outputTokensDetails: { - reasoningTokens: 0, - }, - totalTokens: 35, - cost: 0.0012, - isByok: false, - costDetails: { - upstreamInferenceCost: null, - upstreamInferenceInputCost: 0.0008, - upstreamInferenceOutputCost: 0.0004, - }, - }, - maxToolCalls: 5511.35, - topLogprobs: 3841.87, - maxOutputTokens: null, temperature: null, topP: null, instructions: null, @@ -126,30 +50,6 @@ const value: models.OpenResponsesStreamEventResponseInProgress = { tools: [], toolChoice: "auto", parallelToolCalls: true, - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - background: true, - previousResponseId: "", - reasoning: { - effort: "medium", - summary: "auto", - }, - serviceTier: null, - store: false, - truncation: "auto", - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, }, sequenceNumber: 1, }; @@ -165,49 +65,21 @@ const value: models.OpenResponsesStreamEventResponseCompleted = { object: "response", createdAt: 1704067200, model: "gpt-4", - status: "completed", output: [ { id: "item-1", role: "assistant", type: "message", - status: "completed", content: [ { type: "output_text", text: "Hello! How can I help you?", - annotations: [], }, ], }, ], - user: "Ethyl_Wolf86", - outputText: "", - promptCacheKey: "", - safetyIdentifier: null, error: null, incompleteDetails: null, - usage: { - inputTokens: 10, - inputTokensDetails: { - cachedTokens: 0, - }, - outputTokens: 25, - outputTokensDetails: { - reasoningTokens: 0, - }, - totalTokens: 35, - cost: 0.0012, - isByok: false, - costDetails: { - upstreamInferenceCost: null, - upstreamInferenceInputCost: 0.0008, - upstreamInferenceOutputCost: 0.0004, - }, - }, - maxToolCalls: 3089.58, - topLogprobs: 6411.11, - maxOutputTokens: null, temperature: null, topP: null, instructions: null, @@ -215,30 +87,6 @@ const value: models.OpenResponsesStreamEventResponseCompleted = { tools: [], toolChoice: "auto", parallelToolCalls: true, - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - background: false, - previousResponseId: "", - reasoning: { - effort: "medium", - summary: "auto", - }, - serviceTier: "scale", - store: true, - truncation: "auto", - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, }, sequenceNumber: 10, }; @@ -254,35 +102,9 @@ const value: models.OpenResponsesStreamEventResponseIncomplete = { object: "response", createdAt: 1704067200, model: "gpt-4", - status: "incomplete", output: [], - user: "Bonnie2", - outputText: "", - promptCacheKey: "", - safetyIdentifier: "", error: null, incompleteDetails: null, - usage: { - inputTokens: 10, - inputTokensDetails: { - cachedTokens: 0, - }, - outputTokens: 25, - outputTokensDetails: { - reasoningTokens: 0, - }, - totalTokens: 35, - cost: 0.0012, - isByok: true, - costDetails: { - upstreamInferenceCost: null, - upstreamInferenceInputCost: 0.0008, - upstreamInferenceOutputCost: 0.0004, - }, - }, - maxToolCalls: 5440.53, - topLogprobs: 5246.72, - maxOutputTokens: null, temperature: null, topP: null, instructions: null, @@ -290,30 +112,6 @@ const value: models.OpenResponsesStreamEventResponseIncomplete = { tools: [], toolChoice: "auto", parallelToolCalls: true, - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - background: true, - previousResponseId: "", - reasoning: { - effort: "medium", - summary: "auto", - }, - serviceTier: "default", - store: false, - truncation: "auto", - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, }, sequenceNumber: 5, }; @@ -329,35 +127,9 @@ const value: models.OpenResponsesStreamEventResponseFailed = { object: "response", createdAt: 1704067200, model: "gpt-4", - status: "failed", output: [], - user: "Alden.Carroll21", - outputText: "", - promptCacheKey: null, - safetyIdentifier: "", error: null, incompleteDetails: null, - usage: { - inputTokens: 10, - inputTokensDetails: { - cachedTokens: 0, - }, - outputTokens: 25, - outputTokensDetails: { - reasoningTokens: 0, - }, - totalTokens: 35, - cost: 0.0012, - isByok: true, - costDetails: { - upstreamInferenceCost: null, - upstreamInferenceInputCost: 0.0008, - upstreamInferenceOutputCost: 0.0004, - }, - }, - maxToolCalls: null, - topLogprobs: 7860.28, - maxOutputTokens: null, temperature: null, topP: null, instructions: null, @@ -365,30 +137,6 @@ const value: models.OpenResponsesStreamEventResponseFailed = { tools: [], toolChoice: "auto", parallelToolCalls: true, - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - background: null, - previousResponseId: "", - reasoning: { - effort: "medium", - summary: "auto", - }, - serviceTier: "priority", - store: true, - truncation: "disabled", - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, }, sequenceNumber: 3, }; @@ -416,7 +164,6 @@ const value: models.OpenResponsesStreamEventResponseOutputItemAdded = { id: "item-1", role: "assistant", type: "message", - status: "in_progress", content: [], }, sequenceNumber: 2, @@ -433,12 +180,10 @@ const value: models.OpenResponsesStreamEventResponseOutputItemDone = { id: "item-1", role: "assistant", type: "message", - status: "completed", content: [ { type: "output_text", text: "Hello! How can I help you?", - annotations: [], }, ], }, @@ -457,7 +202,6 @@ const value: models.OpenResponsesStreamEventResponseContentPartAdded = { part: { type: "output_text", text: "", - annotations: [], }, sequenceNumber: 3, }; @@ -474,7 +218,6 @@ const value: models.OpenResponsesStreamEventResponseContentPartDone = { part: { type: "output_text", text: "Hello! How can I help you?", - annotations: [], }, sequenceNumber: 7, }; diff --git a/docs/models/openresponsesstreameventresponsecompleted.md b/docs/models/openresponsesstreameventresponsecompleted.md index 10d3a177..78df7289 100644 --- a/docs/models/openresponsesstreameventresponsecompleted.md +++ b/docs/models/openresponsesstreameventresponsecompleted.md @@ -14,49 +14,21 @@ let value: OpenResponsesStreamEventResponseCompleted = { object: "response", createdAt: 1704067200, model: "gpt-4", - status: "completed", output: [ { id: "item-1", role: "assistant", type: "message", - status: "completed", content: [ { type: "output_text", text: "Hello! How can I help you?", - annotations: [], }, ], }, ], - user: "Mariam94", - outputText: "", - promptCacheKey: "", - safetyIdentifier: "", error: null, incompleteDetails: null, - usage: { - inputTokens: 10, - inputTokensDetails: { - cachedTokens: 0, - }, - outputTokens: 25, - outputTokensDetails: { - reasoningTokens: 0, - }, - totalTokens: 35, - cost: 0.0012, - isByok: true, - costDetails: { - upstreamInferenceCost: null, - upstreamInferenceInputCost: 0.0008, - upstreamInferenceOutputCost: 0.0004, - }, - }, - maxToolCalls: 5700, - topLogprobs: 3768.35, - maxOutputTokens: null, temperature: null, topP: null, instructions: null, @@ -64,30 +36,6 @@ let value: OpenResponsesStreamEventResponseCompleted = { tools: [], toolChoice: "auto", parallelToolCalls: true, - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - background: false, - previousResponseId: "", - reasoning: { - effort: "medium", - summary: "auto", - }, - serviceTier: null, - store: true, - truncation: "disabled", - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, }, sequenceNumber: 10, }; diff --git a/docs/models/openresponsesstreameventresponsecontentpartadded.md b/docs/models/openresponsesstreameventresponsecontentpartadded.md index 79b9b69c..be64779a 100644 --- a/docs/models/openresponsesstreameventresponsecontentpartadded.md +++ b/docs/models/openresponsesstreameventresponsecontentpartadded.md @@ -15,7 +15,6 @@ let value: OpenResponsesStreamEventResponseContentPartAdded = { part: { type: "output_text", text: "", - annotations: [], }, sequenceNumber: 3, }; diff --git a/docs/models/openresponsesstreameventresponsecontentpartdone.md b/docs/models/openresponsesstreameventresponsecontentpartdone.md index 9285bc88..4d07ca6d 100644 --- a/docs/models/openresponsesstreameventresponsecontentpartdone.md +++ b/docs/models/openresponsesstreameventresponsecontentpartdone.md @@ -15,7 +15,6 @@ let value: OpenResponsesStreamEventResponseContentPartDone = { part: { type: "output_text", text: "Hello! How can I help you?", - annotations: [], }, sequenceNumber: 7, }; diff --git a/docs/models/openresponsesstreameventresponsecreated.md b/docs/models/openresponsesstreameventresponsecreated.md index 0c420244..6979157b 100644 --- a/docs/models/openresponsesstreameventresponsecreated.md +++ b/docs/models/openresponsesstreameventresponsecreated.md @@ -14,35 +14,9 @@ let value: OpenResponsesStreamEventResponseCreated = { object: "response", createdAt: 1704067200, model: "gpt-4", - status: "in_progress", output: [], - user: "Clotilde46", - outputText: "", - promptCacheKey: "", - safetyIdentifier: "", error: null, incompleteDetails: null, - usage: { - inputTokens: 10, - inputTokensDetails: { - cachedTokens: 0, - }, - outputTokens: 25, - outputTokensDetails: { - reasoningTokens: 0, - }, - totalTokens: 35, - cost: 0.0012, - isByok: false, - costDetails: { - upstreamInferenceCost: null, - upstreamInferenceInputCost: 0.0008, - upstreamInferenceOutputCost: 0.0004, - }, - }, - maxToolCalls: 4980.76, - topLogprobs: 2691.9, - maxOutputTokens: null, temperature: null, topP: null, instructions: null, @@ -50,30 +24,6 @@ let value: OpenResponsesStreamEventResponseCreated = { tools: [], toolChoice: "auto", parallelToolCalls: true, - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - background: true, - previousResponseId: "", - reasoning: { - effort: "medium", - summary: "auto", - }, - serviceTier: "scale", - store: true, - truncation: "disabled", - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, }, sequenceNumber: 0, }; diff --git a/docs/models/openresponsesstreameventresponsefailed.md b/docs/models/openresponsesstreameventresponsefailed.md index f41102eb..651c831d 100644 --- a/docs/models/openresponsesstreameventresponsefailed.md +++ b/docs/models/openresponsesstreameventresponsefailed.md @@ -14,35 +14,9 @@ let value: OpenResponsesStreamEventResponseFailed = { object: "response", createdAt: 1704067200, model: "gpt-4", - status: "failed", output: [], - user: "Augustine.Mante39", - outputText: "", - promptCacheKey: "", - safetyIdentifier: "", error: null, incompleteDetails: null, - usage: { - inputTokens: 10, - inputTokensDetails: { - cachedTokens: 0, - }, - outputTokens: 25, - outputTokensDetails: { - reasoningTokens: 0, - }, - totalTokens: 35, - cost: 0.0012, - isByok: true, - costDetails: { - upstreamInferenceCost: null, - upstreamInferenceInputCost: 0.0008, - upstreamInferenceOutputCost: 0.0004, - }, - }, - maxToolCalls: 7933.03, - topLogprobs: 4962.64, - maxOutputTokens: null, temperature: null, topP: null, instructions: null, @@ -50,30 +24,6 @@ let value: OpenResponsesStreamEventResponseFailed = { tools: [], toolChoice: "auto", parallelToolCalls: true, - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - background: false, - previousResponseId: "", - reasoning: { - effort: "medium", - summary: "auto", - }, - serviceTier: "priority", - store: false, - truncation: "auto", - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, }, sequenceNumber: 3, }; diff --git a/docs/models/openresponsesstreameventresponseincomplete.md b/docs/models/openresponsesstreameventresponseincomplete.md index 52ca72a2..6657cb4f 100644 --- a/docs/models/openresponsesstreameventresponseincomplete.md +++ b/docs/models/openresponsesstreameventresponseincomplete.md @@ -14,35 +14,9 @@ let value: OpenResponsesStreamEventResponseIncomplete = { object: "response", createdAt: 1704067200, model: "gpt-4", - status: "incomplete", output: [], - user: "Delia_Koepp20", - outputText: "", - promptCacheKey: "", - safetyIdentifier: "", error: null, incompleteDetails: null, - usage: { - inputTokens: 10, - inputTokensDetails: { - cachedTokens: 0, - }, - outputTokens: 25, - outputTokensDetails: { - reasoningTokens: 0, - }, - totalTokens: 35, - cost: 0.0012, - isByok: true, - costDetails: { - upstreamInferenceCost: null, - upstreamInferenceInputCost: 0.0008, - upstreamInferenceOutputCost: 0.0004, - }, - }, - maxToolCalls: 2849.55, - topLogprobs: 7627.34, - maxOutputTokens: null, temperature: null, topP: null, instructions: null, @@ -50,30 +24,6 @@ let value: OpenResponsesStreamEventResponseIncomplete = { tools: [], toolChoice: "auto", parallelToolCalls: true, - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - background: false, - previousResponseId: "", - reasoning: { - effort: "medium", - summary: "auto", - }, - serviceTier: "priority", - store: true, - truncation: "disabled", - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, }, sequenceNumber: 5, }; diff --git a/docs/models/openresponsesstreameventresponseinprogress.md b/docs/models/openresponsesstreameventresponseinprogress.md index 6b6d7bc1..c789e969 100644 --- a/docs/models/openresponsesstreameventresponseinprogress.md +++ b/docs/models/openresponsesstreameventresponseinprogress.md @@ -14,35 +14,9 @@ let value: OpenResponsesStreamEventResponseInProgress = { object: "response", createdAt: 1704067200, model: "gpt-4", - status: "in_progress", output: [], - user: "Brigitte25", - outputText: "", - promptCacheKey: "", - safetyIdentifier: "", error: null, incompleteDetails: null, - usage: { - inputTokens: 10, - inputTokensDetails: { - cachedTokens: 0, - }, - outputTokens: 25, - outputTokensDetails: { - reasoningTokens: 0, - }, - totalTokens: 35, - cost: 0.0012, - isByok: true, - costDetails: { - upstreamInferenceCost: null, - upstreamInferenceInputCost: 0.0008, - upstreamInferenceOutputCost: 0.0004, - }, - }, - maxToolCalls: 5033.5, - topLogprobs: 3054.26, - maxOutputTokens: null, temperature: null, topP: null, instructions: null, @@ -50,30 +24,6 @@ let value: OpenResponsesStreamEventResponseInProgress = { tools: [], toolChoice: "auto", parallelToolCalls: true, - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - background: true, - previousResponseId: "", - reasoning: { - effort: "medium", - summary: "auto", - }, - serviceTier: "flex", - store: true, - truncation: "disabled", - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, }, sequenceNumber: 1, }; diff --git a/docs/models/openresponsesstreameventresponseoutputitemadded.md b/docs/models/openresponsesstreameventresponseoutputitemadded.md index 4f31d6cd..2ecc4bf2 100644 --- a/docs/models/openresponsesstreameventresponseoutputitemadded.md +++ b/docs/models/openresponsesstreameventresponseoutputitemadded.md @@ -14,7 +14,6 @@ let value: OpenResponsesStreamEventResponseOutputItemAdded = { id: "item-1", role: "assistant", type: "message", - status: "in_progress", content: [], }, sequenceNumber: 2, diff --git a/docs/models/openresponsesstreameventresponseoutputitemdone.md b/docs/models/openresponsesstreameventresponseoutputitemdone.md index 0810d461..23ed3a45 100644 --- a/docs/models/openresponsesstreameventresponseoutputitemdone.md +++ b/docs/models/openresponsesstreameventresponseoutputitemdone.md @@ -14,12 +14,10 @@ let value: OpenResponsesStreamEventResponseOutputItemDone = { id: "item-1", role: "assistant", type: "message", - status: "completed", content: [ { type: "output_text", text: "Hello! How can I help you?", - annotations: [], }, ], }, diff --git a/docs/models/openresponsestoplogprobs.md b/docs/models/openresponsestoplogprobs.md index 5cfb1283..e1258dea 100644 --- a/docs/models/openresponsestoplogprobs.md +++ b/docs/models/openresponsestoplogprobs.md @@ -7,10 +7,7 @@ Alternative token with its log probability ```typescript import { OpenResponsesTopLogprobs } from "@openrouter/sdk/models"; -let value: OpenResponsesTopLogprobs = { - token: "hello", - logprob: -0.5, -}; +let value: OpenResponsesTopLogprobs = {}; ``` ## Fields diff --git a/docs/models/openresponsesusage.md b/docs/models/openresponsesusage.md index ca361891..5f9cd86e 100644 --- a/docs/models/openresponsesusage.md +++ b/docs/models/openresponsesusage.md @@ -17,13 +17,6 @@ let value: OpenResponsesUsage = { reasoningTokens: 0, }, totalTokens: 35, - cost: 0.0012, - isByok: false, - costDetails: { - upstreamInferenceCost: null, - upstreamInferenceInputCost: 0.0008, - upstreamInferenceOutputCost: 0.0004, - }, }; ``` diff --git a/docs/models/openresponseswebsearch20250826tool.md b/docs/models/openresponseswebsearch20250826tool.md index 1f00fd15..594d329b 100644 --- a/docs/models/openresponseswebsearch20250826tool.md +++ b/docs/models/openresponseswebsearch20250826tool.md @@ -9,19 +9,6 @@ import { OpenResponsesWebSearch20250826Tool } from "@openrouter/sdk/models"; let value: OpenResponsesWebSearch20250826Tool = { type: "web_search_2025_08_26", - filters: { - allowedDomains: [ - "example.com", - ], - }, - searchContextSize: "medium", - userLocation: { - type: "approximate", - city: "San Francisco", - country: "USA", - region: "California", - timezone: "America/Los_Angeles", - }, }; ``` diff --git a/docs/models/openresponseswebsearch20250826toolfilters.md b/docs/models/openresponseswebsearch20250826toolfilters.md index 604047a1..2b4a3082 100644 --- a/docs/models/openresponseswebsearch20250826toolfilters.md +++ b/docs/models/openresponseswebsearch20250826toolfilters.md @@ -5,11 +5,7 @@ ```typescript import { OpenResponsesWebSearch20250826ToolFilters } from "@openrouter/sdk/models"; -let value: OpenResponsesWebSearch20250826ToolFilters = { - allowedDomains: [ - "", - ], -}; +let value: OpenResponsesWebSearch20250826ToolFilters = {}; ``` ## Fields diff --git a/docs/models/openresponseswebsearchpreview20250311tool.md b/docs/models/openresponseswebsearchpreview20250311tool.md index eb89da0d..4b569f6f 100644 --- a/docs/models/openresponseswebsearchpreview20250311tool.md +++ b/docs/models/openresponseswebsearchpreview20250311tool.md @@ -9,14 +9,6 @@ import { OpenResponsesWebSearchPreview20250311Tool } from "@openrouter/sdk/model let value: OpenResponsesWebSearchPreview20250311Tool = { type: "web_search_preview_2025_03_11", - searchContextSize: "medium", - userLocation: { - type: "approximate", - city: "New Amelie", - country: "Liberia", - region: null, - timezone: "Europe/Minsk", - }, }; ``` diff --git a/docs/models/openresponseswebsearchpreviewtool.md b/docs/models/openresponseswebsearchpreviewtool.md index 7e441746..ba5a8ef0 100644 --- a/docs/models/openresponseswebsearchpreviewtool.md +++ b/docs/models/openresponseswebsearchpreviewtool.md @@ -9,14 +9,6 @@ import { OpenResponsesWebSearchPreviewTool } from "@openrouter/sdk/models"; let value: OpenResponsesWebSearchPreviewTool = { type: "web_search_preview", - searchContextSize: "medium", - userLocation: { - type: "approximate", - city: "New Amelie", - country: "Liberia", - region: null, - timezone: "Europe/Minsk", - }, }; ``` diff --git a/docs/models/openresponseswebsearchtool.md b/docs/models/openresponseswebsearchtool.md index 478b9805..3c1a076e 100644 --- a/docs/models/openresponseswebsearchtool.md +++ b/docs/models/openresponseswebsearchtool.md @@ -9,19 +9,6 @@ import { OpenResponsesWebSearchTool } from "@openrouter/sdk/models"; let value: OpenResponsesWebSearchTool = { type: "web_search", - filters: { - allowedDomains: [ - "example.com", - ], - }, - searchContextSize: "medium", - userLocation: { - type: "approximate", - city: "San Francisco", - country: "USA", - region: "California", - timezone: "America/Los_Angeles", - }, }; ``` diff --git a/docs/models/openresponseswebsearchtoolfilters.md b/docs/models/openresponseswebsearchtoolfilters.md index ca437aea..69bbb263 100644 --- a/docs/models/openresponseswebsearchtoolfilters.md +++ b/docs/models/openresponseswebsearchtoolfilters.md @@ -5,11 +5,7 @@ ```typescript import { OpenResponsesWebSearchToolFilters } from "@openrouter/sdk/models"; -let value: OpenResponsesWebSearchToolFilters = { - allowedDomains: [ - "", - ], -}; +let value: OpenResponsesWebSearchToolFilters = {}; ``` ## Fields diff --git a/docs/models/operations/createauthkeyscoderequest.md b/docs/models/operations/createauthkeyscoderequest.md index 6bc64fb0..1a4a1f3f 100644 --- a/docs/models/operations/createauthkeyscoderequest.md +++ b/docs/models/operations/createauthkeyscoderequest.md @@ -7,9 +7,6 @@ import { CreateAuthKeysCodeRequest } from "@openrouter/sdk/models/operations"; let value: CreateAuthKeysCodeRequest = { callbackUrl: "https://myapp.com/auth/callback", - codeChallenge: "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM", - codeChallengeMethod: "S256", - limit: 100, }; ``` diff --git a/docs/models/operations/createkeysrequest.md b/docs/models/operations/createkeysrequest.md index 1b45cf6e..f297a136 100644 --- a/docs/models/operations/createkeysrequest.md +++ b/docs/models/operations/createkeysrequest.md @@ -7,9 +7,6 @@ import { CreateKeysRequest } from "@openrouter/sdk/models/operations"; let value: CreateKeysRequest = { name: "My New API Key", - limit: 50, - limitReset: "monthly", - includeByokInLimit: true, }; ``` diff --git a/docs/models/operations/createresponsesresponse.md b/docs/models/operations/createresponsesresponse.md index 47fce7f5..cf5d4010 100644 --- a/docs/models/operations/createresponsesresponse.md +++ b/docs/models/operations/createresponsesresponse.md @@ -11,49 +11,21 @@ const value: models.OpenResponsesNonStreamingResponse = { object: "response", createdAt: 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: [], }, ], }, ], - user: "Alessandro59", - outputText: "", - promptCacheKey: "", - safetyIdentifier: null, error: null, incompleteDetails: null, - usage: { - inputTokens: 10, - inputTokensDetails: { - cachedTokens: 0, - }, - outputTokens: 25, - outputTokensDetails: { - reasoningTokens: 0, - }, - totalTokens: 35, - cost: 5062.45, - isByok: false, - costDetails: { - upstreamInferenceCost: 8999.13, - upstreamInferenceInputCost: 2970.58, - upstreamInferenceOutputCost: 9667.63, - }, - }, - maxToolCalls: 7325.41, - topLogprobs: 2429, - maxOutputTokens: null, temperature: null, topP: null, instructions: null, @@ -61,30 +33,6 @@ const value: models.OpenResponsesNonStreamingResponse = { tools: [], toolChoice: "auto", parallelToolCalls: true, - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - background: null, - previousResponseId: "", - reasoning: { - effort: "medium", - summary: "auto", - }, - serviceTier: "auto", - store: false, - truncation: "auto", - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, }; ``` diff --git a/docs/models/operations/createresponsesresponsebody.md b/docs/models/operations/createresponsesresponsebody.md index a9ce9319..ac16541d 100644 --- a/docs/models/operations/createresponsesresponsebody.md +++ b/docs/models/operations/createresponsesresponsebody.md @@ -15,35 +15,9 @@ let value: CreateResponsesResponseBody = { object: "response", createdAt: 1704067200, model: "gpt-4", - status: "in_progress", output: [], - user: "Ramiro.Schowalter-Kshlerin", - outputText: "", - promptCacheKey: "", - safetyIdentifier: "", error: null, incompleteDetails: null, - usage: { - inputTokens: 10, - inputTokensDetails: { - cachedTokens: 0, - }, - outputTokens: 25, - outputTokensDetails: { - reasoningTokens: 0, - }, - totalTokens: 35, - cost: 0.0012, - isByok: false, - costDetails: { - upstreamInferenceCost: null, - upstreamInferenceInputCost: 0.0008, - upstreamInferenceOutputCost: 0.0004, - }, - }, - maxToolCalls: 264.25, - topLogprobs: 2443.21, - maxOutputTokens: null, temperature: null, topP: null, instructions: null, @@ -51,30 +25,6 @@ let value: CreateResponsesResponseBody = { tools: [], toolChoice: "auto", parallelToolCalls: true, - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - background: null, - previousResponseId: "", - reasoning: { - effort: "medium", - summary: "auto", - }, - serviceTier: "default", - store: true, - truncation: "disabled", - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, }, sequenceNumber: 0, }, diff --git a/docs/models/operations/exchangeauthcodeforapikeyrequest.md b/docs/models/operations/exchangeauthcodeforapikeyrequest.md index 1bcf353d..96b544bc 100644 --- a/docs/models/operations/exchangeauthcodeforapikeyrequest.md +++ b/docs/models/operations/exchangeauthcodeforapikeyrequest.md @@ -7,8 +7,6 @@ import { ExchangeAuthCodeForAPIKeyRequest } from "@openrouter/sdk/models/operati let value: ExchangeAuthCodeForAPIKeyRequest = { code: "auth_code_abc123def456", - codeVerifier: "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", - codeChallengeMethod: "S256", }; ``` diff --git a/docs/models/operations/getmodelsrequest.md b/docs/models/operations/getmodelsrequest.md index 6fed47df..15ad477f 100644 --- a/docs/models/operations/getmodelsrequest.md +++ b/docs/models/operations/getmodelsrequest.md @@ -5,10 +5,7 @@ ```typescript import { GetModelsRequest } from "@openrouter/sdk/models/operations"; -let value: GetModelsRequest = { - category: "", - supportedParameters: "", -}; +let value: GetModelsRequest = {}; ``` ## Fields diff --git a/docs/models/operations/getparametersrequest.md b/docs/models/operations/getparametersrequest.md index 7bafa72e..0e51936b 100644 --- a/docs/models/operations/getparametersrequest.md +++ b/docs/models/operations/getparametersrequest.md @@ -8,7 +8,6 @@ import { GetParametersRequest } from "@openrouter/sdk/models/operations"; let value: GetParametersRequest = { author: "", slug: "", - provider: "Fireworks", }; ``` diff --git a/docs/models/operations/getuseractivityrequest.md b/docs/models/operations/getuseractivityrequest.md index b2a5f1f6..bfd8397b 100644 --- a/docs/models/operations/getuseractivityrequest.md +++ b/docs/models/operations/getuseractivityrequest.md @@ -5,9 +5,7 @@ ```typescript import { GetUserActivityRequest } from "@openrouter/sdk/models/operations"; -let value: GetUserActivityRequest = { - date: "2025-08-24", -}; +let value: GetUserActivityRequest = {}; ``` ## Fields diff --git a/docs/models/operations/listendpointsresponse.md b/docs/models/operations/listendpointsresponse.md index 2d55ed9a..f5df4a08 100644 --- a/docs/models/operations/listendpointsresponse.md +++ b/docs/models/operations/listendpointsresponse.md @@ -33,16 +33,6 @@ let value: ListEndpointsResponse = { pricing: { prompt: "0.00003", completion: "0.00006", - request: "0", - image: "0", - imageOutput: "1000", - audio: "1000", - inputAudioCache: 1000, - webSearch: 1000, - internalReasoning: "1000", - inputCacheRead: 1000, - inputCacheWrite: 1000, - discount: 1993.56, }, providerName: "OpenAI", tag: "openai", @@ -56,7 +46,6 @@ let value: ListEndpointsResponse = { "frequency_penalty", "presence_penalty", ], - status: -5, uptimeLast30m: 99.5, supportsImplicitCaching: true, }, diff --git a/docs/models/operations/listendpointszdrresponse.md b/docs/models/operations/listendpointszdrresponse.md index ddf398b4..5109a585 100644 --- a/docs/models/operations/listendpointszdrresponse.md +++ b/docs/models/operations/listendpointszdrresponse.md @@ -16,16 +16,6 @@ let value: ListEndpointsZdrResponse = { pricing: { prompt: "0.00003", completion: "0.00006", - request: "0", - image: "0", - imageOutput: 1000, - audio: 1000, - inputAudioCache: 1000, - webSearch: 1000, - internalReasoning: 1000, - inputCacheRead: 1000, - inputCacheWrite: 1000, - discount: 2041.73, }, providerName: "OpenAI", tag: "openai", @@ -37,7 +27,6 @@ let value: ListEndpointsZdrResponse = { "top_p", "max_tokens", ], - status: 0, uptimeLast30m: 99.5, supportsImplicitCaching: true, }, diff --git a/docs/models/operations/listprovidersdata.md b/docs/models/operations/listprovidersdata.md index 6f9cdcd7..70193832 100644 --- a/docs/models/operations/listprovidersdata.md +++ b/docs/models/operations/listprovidersdata.md @@ -9,8 +9,6 @@ let value: ListProvidersData = { name: "OpenAI", slug: "openai", privacyPolicyUrl: "https://openai.com/privacy", - termsOfServiceUrl: "https://openai.com/terms", - statusPageUrl: "https://status.openai.com", }; ``` diff --git a/docs/models/operations/listprovidersresponse.md b/docs/models/operations/listprovidersresponse.md index b19884b4..c383f6cd 100644 --- a/docs/models/operations/listprovidersresponse.md +++ b/docs/models/operations/listprovidersresponse.md @@ -13,8 +13,6 @@ let value: ListProvidersResponse = { name: "OpenAI", slug: "openai", privacyPolicyUrl: "https://openai.com/privacy", - termsOfServiceUrl: "https://openai.com/terms", - statusPageUrl: "https://status.openai.com", }, ], }; diff --git a/docs/models/operations/listrequest.md b/docs/models/operations/listrequest.md index 5fa3ae6c..c61f4c07 100644 --- a/docs/models/operations/listrequest.md +++ b/docs/models/operations/listrequest.md @@ -5,10 +5,7 @@ ```typescript import { ListRequest } from "@openrouter/sdk/models/operations"; -let value: ListRequest = { - includeDisabled: "false", - offset: "0", -}; +let value: ListRequest = {}; ``` ## Fields diff --git a/docs/models/operations/sendchatcompletionrequestresponse.md b/docs/models/operations/sendchatcompletionrequestresponse.md index 254a6888..0f0bc60a 100644 --- a/docs/models/operations/sendchatcompletionrequestresponse.md +++ b/docs/models/operations/sendchatcompletionrequestresponse.md @@ -12,22 +12,6 @@ const value: models.ChatResponse = { created: 9184.01, model: "Focus", object: "chat.completion", - systemFingerprint: "", - usage: { - completionTokens: 6813.22, - promptTokens: 9802.3, - totalTokens: 8877.64, - completionTokensDetails: { - reasoningTokens: 1093.75, - audioTokens: 130.3, - acceptedPredictionTokens: 7308.38, - rejectedPredictionTokens: 2801.33, - }, - promptTokensDetails: { - cachedTokens: 1522.95, - audioTokens: 8854.61, - }, - }, }; ``` diff --git a/docs/models/operations/updatekeysrequest.md b/docs/models/operations/updatekeysrequest.md index 324a59cf..1fb14f78 100644 --- a/docs/models/operations/updatekeysrequest.md +++ b/docs/models/operations/updatekeysrequest.md @@ -8,13 +8,7 @@ import { UpdateKeysRequest } from "@openrouter/sdk/models/operations"; let value: UpdateKeysRequest = { hash: "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", - requestBody: { - name: "Updated API Key Name", - disabled: false, - limit: 75, - limitReset: "daily", - includeByokInLimit: true, - }, + requestBody: {}, }; ``` diff --git a/docs/models/operations/updatekeysrequestbody.md b/docs/models/operations/updatekeysrequestbody.md index 6ec3b3df..6d05aec3 100644 --- a/docs/models/operations/updatekeysrequestbody.md +++ b/docs/models/operations/updatekeysrequestbody.md @@ -5,13 +5,7 @@ ```typescript import { UpdateKeysRequestBody } from "@openrouter/sdk/models/operations"; -let value: UpdateKeysRequestBody = { - name: "Updated API Key Name", - disabled: false, - limit: 75, - limitReset: "daily", - includeByokInLimit: true, -}; +let value: UpdateKeysRequestBody = {}; ``` ## Fields diff --git a/docs/models/outputmessage.md b/docs/models/outputmessage.md index 4586d04e..f5cf0ba2 100644 --- a/docs/models/outputmessage.md +++ b/docs/models/outputmessage.md @@ -9,19 +9,10 @@ let value: OutputMessage = { id: "msg-abc123", role: "assistant", type: "message", - status: "completed", content: [ { type: "output_text", text: "Hello! How can I help you today?", - annotations: [ - { - type: "file_citation", - fileId: "file-abc123", - filename: "research_paper.pdf", - index: 0, - }, - ], }, ], }; diff --git a/docs/models/outputmessagecontent.md b/docs/models/outputmessagecontent.md index 253567a7..24ed1552 100644 --- a/docs/models/outputmessagecontent.md +++ b/docs/models/outputmessagecontent.md @@ -9,15 +9,6 @@ const value: models.ResponseOutputText = { type: "output_text", text: "The capital of France is Paris.", - annotations: [ - { - type: "url_citation", - url: "https://en.wikipedia.org/wiki/Paris", - title: "Paris - Wikipedia", - startIndex: 0, - endIndex: 42, - }, - ], }; ``` diff --git a/docs/models/part1.md b/docs/models/part1.md index 7b4ccdba..b1660382 100644 --- a/docs/models/part1.md +++ b/docs/models/part1.md @@ -9,15 +9,6 @@ const value: models.ResponseOutputText = { type: "output_text", text: "The capital of France is Paris.", - annotations: [ - { - type: "url_citation", - url: "https://en.wikipedia.org/wiki/Paris", - title: "Paris - Wikipedia", - startIndex: 0, - endIndex: 42, - }, - ], }; ``` diff --git a/docs/models/part2.md b/docs/models/part2.md index 1a9f50c5..bc698ccc 100644 --- a/docs/models/part2.md +++ b/docs/models/part2.md @@ -9,15 +9,6 @@ const value: models.ResponseOutputText = { type: "output_text", text: "The capital of France is Paris.", - annotations: [ - { - type: "url_citation", - url: "https://en.wikipedia.org/wiki/Paris", - title: "Paris - Wikipedia", - startIndex: 0, - endIndex: 42, - }, - ], }; ``` diff --git a/docs/models/payloadtoolargeresponseerrordata.md b/docs/models/payloadtoolargeresponseerrordata.md index d0553a67..e3c55021 100644 --- a/docs/models/payloadtoolargeresponseerrordata.md +++ b/docs/models/payloadtoolargeresponseerrordata.md @@ -10,11 +10,6 @@ import { PayloadTooLargeResponseErrorData } from "@openrouter/sdk/models"; let value: PayloadTooLargeResponseErrorData = { code: 413, message: "Request payload too large", - metadata: { - "key": "", - "key1": "", - "key2": "", - }, }; ``` diff --git a/docs/models/paymentrequiredresponseerrordata.md b/docs/models/paymentrequiredresponseerrordata.md index 123e3ba9..25760477 100644 --- a/docs/models/paymentrequiredresponseerrordata.md +++ b/docs/models/paymentrequiredresponseerrordata.md @@ -10,7 +10,6 @@ import { PaymentRequiredResponseErrorData } from "@openrouter/sdk/models"; let value: PaymentRequiredResponseErrorData = { code: 402, message: "Insufficient credits. Add more using https://openrouter.ai/credits", - metadata: null, }; ``` diff --git a/docs/models/pdf.md b/docs/models/pdf.md index 026cc207..67850913 100644 --- a/docs/models/pdf.md +++ b/docs/models/pdf.md @@ -5,9 +5,7 @@ ```typescript import { Pdf } from "@openrouter/sdk/models"; -let value: Pdf = { - engine: "native", -}; +let value: Pdf = {}; ``` ## Fields diff --git a/docs/models/plugin.md b/docs/models/plugin.md index 08b905bb..a7b20a73 100644 --- a/docs/models/plugin.md +++ b/docs/models/plugin.md @@ -16,9 +16,6 @@ const value: models.PluginModeration = { ```typescript const value: models.PluginWeb = { id: "web", - maxResults: 7404.94, - searchPrompt: "", - engine: "exa", }; ``` @@ -27,10 +24,6 @@ const value: models.PluginWeb = { ```typescript const value: models.PluginFileParser = { id: "file-parser", - maxFiles: 5518.4, - pdf: { - engine: "mistral-ocr", - }, }; ``` diff --git a/docs/models/pluginfileparser.md b/docs/models/pluginfileparser.md index a97b48f2..22035248 100644 --- a/docs/models/pluginfileparser.md +++ b/docs/models/pluginfileparser.md @@ -7,10 +7,6 @@ import { PluginFileParser } from "@openrouter/sdk/models"; let value: PluginFileParser = { id: "file-parser", - maxFiles: 5518.4, - pdf: { - engine: "mistral-ocr", - }, }; ``` diff --git a/docs/models/pluginweb.md b/docs/models/pluginweb.md index 0338bc69..5cfb0228 100644 --- a/docs/models/pluginweb.md +++ b/docs/models/pluginweb.md @@ -7,9 +7,6 @@ import { PluginWeb } from "@openrouter/sdk/models"; let value: PluginWeb = { id: "web", - maxResults: 7404.94, - searchPrompt: "", - engine: "exa", }; ``` diff --git a/docs/models/pricing.md b/docs/models/pricing.md index 10c6b83d..84e797d7 100644 --- a/docs/models/pricing.md +++ b/docs/models/pricing.md @@ -8,16 +8,6 @@ import { Pricing } from "@openrouter/sdk/models"; let value: Pricing = { prompt: 1000, completion: "1000", - request: "1000", - image: 1000, - imageOutput: 1000, - audio: "1000", - inputAudioCache: 1000, - webSearch: 1000, - internalReasoning: "1000", - inputCacheRead: 1000, - inputCacheWrite: 1000, - discount: 1863.9, }; ``` diff --git a/docs/models/prompttokensdetails.md b/docs/models/prompttokensdetails.md index 29c98865..88b1e3de 100644 --- a/docs/models/prompttokensdetails.md +++ b/docs/models/prompttokensdetails.md @@ -5,10 +5,7 @@ ```typescript import { PromptTokensDetails } from "@openrouter/sdk/models"; -let value: PromptTokensDetails = { - cachedTokens: 9036.33, - audioTokens: 880.11, -}; +let value: PromptTokensDetails = {}; ``` ## Fields diff --git a/docs/models/provider.md b/docs/models/provider.md index 79364a63..e38fcef8 100644 --- a/docs/models/provider.md +++ b/docs/models/provider.md @@ -7,31 +7,7 @@ When multiple model providers are available, optionally indicate your routing pr ```typescript import { Provider } from "@openrouter/sdk/models"; -let value: Provider = { - allowFallbacks: true, - requireParameters: false, - dataCollection: "deny", - zdr: true, - order: null, - only: [ - "OpenAI", - ], - ignore: [ - "OpenAI", - ], - quantizations: [ - "fp16", - ], - sort: "price", - maxPrice: { - prompt: 1000, - completion: 1000, - image: "1000", - audio: 1000, - request: 1000, - }, - experimental: {}, -}; +let value: Provider = {}; ``` ## Fields diff --git a/docs/models/provideroverloadedresponseerrordata.md b/docs/models/provideroverloadedresponseerrordata.md index 3efb1217..da229099 100644 --- a/docs/models/provideroverloadedresponseerrordata.md +++ b/docs/models/provideroverloadedresponseerrordata.md @@ -10,9 +10,6 @@ import { ProviderOverloadedResponseErrorData } from "@openrouter/sdk/models"; let value: ProviderOverloadedResponseErrorData = { code: 529, message: "Provider returned error", - metadata: { - "key": "", - }, }; ``` diff --git a/docs/models/publicendpoint.md b/docs/models/publicendpoint.md index a4323647..4e510942 100644 --- a/docs/models/publicendpoint.md +++ b/docs/models/publicendpoint.md @@ -14,16 +14,6 @@ let value: PublicEndpoint = { pricing: { prompt: "0.00003", completion: "0.00006", - request: "0", - image: "0", - imageOutput: 1000, - audio: 1000, - inputAudioCache: 1000, - webSearch: "1000", - internalReasoning: 1000, - inputCacheRead: "1000", - inputCacheWrite: "1000", - discount: 6580.71, }, providerName: "OpenAI", tag: "openai", @@ -35,7 +25,6 @@ let value: PublicEndpoint = { "top_p", "max_tokens", ], - status: 0, uptimeLast30m: 99.5, supportsImplicitCaching: true, }; diff --git a/docs/models/publicpricing.md b/docs/models/publicpricing.md index ca6eb7bb..8fd536ae 100644 --- a/docs/models/publicpricing.md +++ b/docs/models/publicpricing.md @@ -10,16 +10,6 @@ import { PublicPricing } from "@openrouter/sdk/models"; let value: PublicPricing = { prompt: "0.00003", completion: "0.00006", - request: "0", - image: "0", - imageOutput: 1000, - audio: 1000, - inputAudioCache: 1000, - webSearch: "1000", - internalReasoning: "1000", - inputCacheRead: 1000, - inputCacheWrite: 1000, - discount: 4326.33, }; ``` diff --git a/docs/models/reasoning.md b/docs/models/reasoning.md index 499cbae5..f62c63cc 100644 --- a/docs/models/reasoning.md +++ b/docs/models/reasoning.md @@ -5,10 +5,7 @@ ```typescript import { Reasoning } from "@openrouter/sdk/models"; -let value: Reasoning = { - effort: "low", - summary: "detailed", -}; +let value: Reasoning = {}; ``` ## Fields diff --git a/docs/models/requesttimeoutresponseerrordata.md b/docs/models/requesttimeoutresponseerrordata.md index 63b2345d..035e06a4 100644 --- a/docs/models/requesttimeoutresponseerrordata.md +++ b/docs/models/requesttimeoutresponseerrordata.md @@ -10,9 +10,6 @@ import { RequestTimeoutResponseErrorData } from "@openrouter/sdk/models"; let value: RequestTimeoutResponseErrorData = { code: 408, message: "Operation timed out. Please try again later.", - metadata: { - "key": "", - }, }; ``` diff --git a/docs/models/responseformatjsonschema.md b/docs/models/responseformatjsonschema.md index 8aa1ff1c..7a72cb82 100644 --- a/docs/models/responseformatjsonschema.md +++ b/docs/models/responseformatjsonschema.md @@ -9,13 +9,6 @@ let value: ResponseFormatJSONSchema = { type: "json_schema", jsonSchema: { name: "", - description: "circa or and", - schema: { - "key": "", - "key1": "", - "key2": "", - }, - strict: false, }, }; ``` diff --git a/docs/models/responseformattextconfig.md b/docs/models/responseformattextconfig.md index d8233ea7..4f72b4d3 100644 --- a/docs/models/responseformattextconfig.md +++ b/docs/models/responseformattextconfig.md @@ -27,9 +27,10 @@ const value: models.ResponsesFormatJSONObject = { const value: models.ResponsesFormatTextJSONSchemaConfig = { type: "json_schema", name: "", - description: "innocently rapid what furthermore think despite these vice", - strict: true, - schema: {}, + schema: { + "key": "", + "key1": "", + }, }; ``` diff --git a/docs/models/responseinputfile.md b/docs/models/responseinputfile.md index a17c00e1..93138048 100644 --- a/docs/models/responseinputfile.md +++ b/docs/models/responseinputfile.md @@ -9,10 +9,6 @@ import { ResponseInputFile } from "@openrouter/sdk/models"; let value: ResponseInputFile = { type: "input_file", - fileId: "file-abc123", - fileData: "", - filename: "document.pdf", - fileUrl: "https://outstanding-scholarship.name/", }; ``` diff --git a/docs/models/responseinputimage.md b/docs/models/responseinputimage.md index b693ff52..f59b3fe8 100644 --- a/docs/models/responseinputimage.md +++ b/docs/models/responseinputimage.md @@ -10,7 +10,6 @@ import { ResponseInputImage } from "@openrouter/sdk/models"; let value: ResponseInputImage = { type: "input_image", detail: "auto", - imageUrl: "https://example.com/image.jpg", }; ``` diff --git a/docs/models/responseoutputtext.md b/docs/models/responseoutputtext.md index 91133783..d6c70640 100644 --- a/docs/models/responseoutputtext.md +++ b/docs/models/responseoutputtext.md @@ -8,15 +8,6 @@ import { ResponseOutputText } from "@openrouter/sdk/models"; let value: ResponseOutputText = { type: "output_text", text: "The capital of France is Paris.", - annotations: [ - { - type: "url_citation", - url: "https://en.wikipedia.org/wiki/Paris", - title: "Paris - Wikipedia", - startIndex: 0, - endIndex: 42, - }, - ], }; ``` diff --git a/docs/models/responsesformattextjsonschemaconfig.md b/docs/models/responsesformattextjsonschemaconfig.md index c75bc51c..c641450e 100644 --- a/docs/models/responsesformattextjsonschemaconfig.md +++ b/docs/models/responsesformattextjsonschemaconfig.md @@ -10,8 +10,6 @@ import { ResponsesFormatTextJSONSchemaConfig } from "@openrouter/sdk/models"; let value: ResponsesFormatTextJSONSchemaConfig = { type: "json_schema", name: "", - description: "yet deceivingly between aw compromise wallaby as", - strict: true, schema: { "key": "", "key1": "", diff --git a/docs/models/responsesoutputitem.md b/docs/models/responsesoutputitem.md index 527d9a6e..933bd1a8 100644 --- a/docs/models/responsesoutputitem.md +++ b/docs/models/responsesoutputitem.md @@ -12,19 +12,10 @@ const value: models.ResponsesOutputMessage = { id: "msg-abc123", role: "assistant", type: "message", - status: "completed", content: [ { type: "output_text", text: "Hello! How can I help you today?", - annotations: [ - { - type: "file_citation", - fileId: "file-abc123", - filename: "research_paper.pdf", - index: 0, - }, - ], }, ], }; @@ -35,21 +26,12 @@ const value: models.ResponsesOutputMessage = { ```typescript const value: models.ResponsesOutputItemReasoning = { type: "reasoning", - id: "reasoning-123", - content: [ - { - type: "reasoning_text", - text: "First, we analyze the problem...", - }, - ], summary: [ { type: "summary_text", text: "Analyzed the problem and found the optimal solution.", }, ], - encryptedContent: "", - status: "completed", }; ``` @@ -58,11 +40,9 @@ const value: models.ResponsesOutputItemReasoning = { ```typescript const value: models.ResponsesOutputItemFunctionCall = { type: "function_call", - id: "call-abc123", name: "get_weather", arguments: "{\"location\":\"San Francisco\",\"unit\":\"celsius\"}", callId: "call-abc123", - status: "in_progress", }; ``` diff --git a/docs/models/responsesoutputitemfunctioncall.md b/docs/models/responsesoutputitemfunctioncall.md index 7d4eda69..79a14397 100644 --- a/docs/models/responsesoutputitemfunctioncall.md +++ b/docs/models/responsesoutputitemfunctioncall.md @@ -7,11 +7,9 @@ import { ResponsesOutputItemFunctionCall } from "@openrouter/sdk/models"; let value: ResponsesOutputItemFunctionCall = { type: "function_call", - id: "call-abc123", name: "get_weather", arguments: "{\"location\":\"San Francisco\",\"unit\":\"celsius\"}", callId: "call-abc123", - status: "incomplete", }; ``` diff --git a/docs/models/responsesoutputitemreasoning.md b/docs/models/responsesoutputitemreasoning.md index 51ff91c5..ebc7a2f7 100644 --- a/docs/models/responsesoutputitemreasoning.md +++ b/docs/models/responsesoutputitemreasoning.md @@ -9,21 +9,12 @@ import { ResponsesOutputItemReasoning } from "@openrouter/sdk/models"; let value: ResponsesOutputItemReasoning = { type: "reasoning", - id: "reasoning-123", - content: [ - { - type: "reasoning_text", - text: "First, we analyze the problem...", - }, - ], summary: [ { type: "summary_text", text: "Analyzed the problem and found the optimal solution.", }, ], - encryptedContent: "", - status: "completed", }; ``` diff --git a/docs/models/responsesoutputmessage.md b/docs/models/responsesoutputmessage.md index 51f809c2..993206b5 100644 --- a/docs/models/responsesoutputmessage.md +++ b/docs/models/responsesoutputmessage.md @@ -11,19 +11,10 @@ let value: ResponsesOutputMessage = { id: "msg-abc123", role: "assistant", type: "message", - status: "completed", content: [ { type: "output_text", text: "Hello! How can I help you today?", - annotations: [ - { - type: "file_citation", - fileId: "file-abc123", - filename: "research_paper.pdf", - index: 0, - }, - ], }, ], }; diff --git a/docs/models/responsesoutputmessagecontent.md b/docs/models/responsesoutputmessagecontent.md index f440198e..b7affc9c 100644 --- a/docs/models/responsesoutputmessagecontent.md +++ b/docs/models/responsesoutputmessagecontent.md @@ -9,15 +9,6 @@ const value: models.ResponseOutputText = { type: "output_text", text: "The capital of France is Paris.", - annotations: [ - { - type: "url_citation", - url: "https://en.wikipedia.org/wiki/Paris", - title: "Paris - Wikipedia", - startIndex: 0, - endIndex: 42, - }, - ], }; ``` diff --git a/docs/models/responseswebsearchuserlocation.md b/docs/models/responseswebsearchuserlocation.md index 1075dbc8..862da425 100644 --- a/docs/models/responseswebsearchuserlocation.md +++ b/docs/models/responseswebsearchuserlocation.md @@ -7,13 +7,7 @@ User location information for web search ```typescript import { ResponsesWebSearchUserLocation } from "@openrouter/sdk/models"; -let value: ResponsesWebSearchUserLocation = { - type: "approximate", - city: "San Francisco", - country: "USA", - region: "California", - timezone: "America/Los_Angeles", -}; +let value: ResponsesWebSearchUserLocation = {}; ``` ## Fields diff --git a/docs/models/responsetextconfig.md b/docs/models/responsetextconfig.md index a66de7c8..0a07a5e7 100644 --- a/docs/models/responsetextconfig.md +++ b/docs/models/responsetextconfig.md @@ -7,12 +7,7 @@ Text output configuration including format and verbosity ```typescript import { ResponseTextConfig } from "@openrouter/sdk/models"; -let value: ResponseTextConfig = { - format: { - type: "text", - }, - verbosity: "medium", -}; +let value: ResponseTextConfig = {}; ``` ## Fields diff --git a/docs/models/security.md b/docs/models/security.md index f7147204..887b3028 100644 --- a/docs/models/security.md +++ b/docs/models/security.md @@ -5,9 +5,7 @@ ```typescript import { Security } from "@openrouter/sdk/models"; -let value: Security = { - apiKey: "", -}; +let value: Security = {}; ``` ## Fields diff --git a/docs/models/serviceunavailableresponseerrordata.md b/docs/models/serviceunavailableresponseerrordata.md index f74e2b03..acbb1031 100644 --- a/docs/models/serviceunavailableresponseerrordata.md +++ b/docs/models/serviceunavailableresponseerrordata.md @@ -10,10 +10,6 @@ import { ServiceUnavailableResponseErrorData } from "@openrouter/sdk/models"; let value: ServiceUnavailableResponseErrorData = { code: 503, message: "Service temporarily unavailable", - metadata: { - "key": "", - "key1": "", - }, }; ``` diff --git a/docs/models/streamoptions.md b/docs/models/streamoptions.md index 9eff9054..bac00d5c 100644 --- a/docs/models/streamoptions.md +++ b/docs/models/streamoptions.md @@ -5,9 +5,7 @@ ```typescript import { StreamOptions } from "@openrouter/sdk/models"; -let value: StreamOptions = { - includeUsage: false, -}; +let value: StreamOptions = {}; ``` ## Fields diff --git a/docs/models/systemmessage.md b/docs/models/systemmessage.md index a95e80fd..2b748473 100644 --- a/docs/models/systemmessage.md +++ b/docs/models/systemmessage.md @@ -8,7 +8,6 @@ import { SystemMessage } from "@openrouter/sdk/models"; let value: SystemMessage = { role: "system", content: [], - name: "", }; ``` diff --git a/docs/models/tool.md b/docs/models/tool.md index 59ec10fd..8cce2b1c 100644 --- a/docs/models/tool.md +++ b/docs/models/tool.md @@ -9,12 +9,6 @@ let value: Tool = { type: "function", function: { name: "", - description: "cutover eek excepting behind fall peter even", - parameters: { - "key": "", - "key1": "", - }, - strict: true, }, }; ``` diff --git a/docs/models/toolfunction.md b/docs/models/toolfunction.md index 63b011fc..e336f196 100644 --- a/docs/models/toolfunction.md +++ b/docs/models/toolfunction.md @@ -7,13 +7,6 @@ import { ToolFunction } from "@openrouter/sdk/models"; let value: ToolFunction = { name: "", - description: "culminate whereas ick", - parameters: { - "key": "", - "key1": "", - "key2": "", - }, - strict: null, }; ``` diff --git a/docs/models/toomanyrequestsresponseerrordata.md b/docs/models/toomanyrequestsresponseerrordata.md index 3e2f47f1..5271aa4e 100644 --- a/docs/models/toomanyrequestsresponseerrordata.md +++ b/docs/models/toomanyrequestsresponseerrordata.md @@ -10,10 +10,6 @@ import { TooManyRequestsResponseErrorData } from "@openrouter/sdk/models"; let value: TooManyRequestsResponseErrorData = { code: 429, message: "Rate limit exceeded", - metadata: { - "key": "", - "key1": "", - }, }; ``` diff --git a/docs/models/topproviderinfo.md b/docs/models/topproviderinfo.md index 9dcf3c6c..e318660c 100644 --- a/docs/models/topproviderinfo.md +++ b/docs/models/topproviderinfo.md @@ -8,8 +8,6 @@ Information about the top provider for this model import { TopProviderInfo } from "@openrouter/sdk/models"; let value: TopProviderInfo = { - contextLength: 8192, - maxCompletionTokens: 4096, isModerated: true, }; ``` diff --git a/docs/models/unauthorizedresponseerrordata.md b/docs/models/unauthorizedresponseerrordata.md index c3318801..12ff8937 100644 --- a/docs/models/unauthorizedresponseerrordata.md +++ b/docs/models/unauthorizedresponseerrordata.md @@ -10,7 +10,6 @@ import { UnauthorizedResponseErrorData } from "@openrouter/sdk/models"; let value: UnauthorizedResponseErrorData = { code: 401, message: "Missing Authentication header", - metadata: null, }; ``` diff --git a/docs/models/unprocessableentityresponseerrordata.md b/docs/models/unprocessableentityresponseerrordata.md index aaedd82b..3f171e27 100644 --- a/docs/models/unprocessableentityresponseerrordata.md +++ b/docs/models/unprocessableentityresponseerrordata.md @@ -10,11 +10,6 @@ import { UnprocessableEntityResponseErrorData } from "@openrouter/sdk/models"; let value: UnprocessableEntityResponseErrorData = { code: 422, message: "Invalid argument", - metadata: { - "key": "", - "key1": "", - "key2": "", - }, }; ``` diff --git a/docs/models/usermessage.md b/docs/models/usermessage.md index 74e35f7e..4a060604 100644 --- a/docs/models/usermessage.md +++ b/docs/models/usermessage.md @@ -8,7 +8,6 @@ import { UserMessage } from "@openrouter/sdk/models"; let value: UserMessage = { role: "user", content: "", - name: "", }; ``` diff --git a/docs/models/variables.md b/docs/models/variables.md index be258bdd..743a9cbb 100644 --- a/docs/models/variables.md +++ b/docs/models/variables.md @@ -18,7 +18,6 @@ const value: models.ResponseInputText = { const value: models.ResponseInputImage = { type: "input_image", detail: "auto", - imageUrl: "https://example.com/image.jpg", }; ``` @@ -27,10 +26,6 @@ const value: models.ResponseInputImage = { ```typescript const value: models.ResponseInputFile = { type: "input_file", - fileId: "file-abc123", - fileData: "", - filename: "document.pdf", - fileUrl: "https://prime-bob.info", }; ``` diff --git a/docs/models/websearchpreviewtooluserlocation.md b/docs/models/websearchpreviewtooluserlocation.md index 1acff430..6230e0d9 100644 --- a/docs/models/websearchpreviewtooluserlocation.md +++ b/docs/models/websearchpreviewtooluserlocation.md @@ -7,10 +7,6 @@ import { WebSearchPreviewToolUserLocation } from "@openrouter/sdk/models"; let value: WebSearchPreviewToolUserLocation = { type: "approximate", - city: "Mallieside", - country: "Nigeria", - region: "", - timezone: "Australia/Eucla", }; ``` diff --git a/docs/sdks/analytics/README.md b/docs/sdks/analytics/README.md index f459c48e..065239ee 100644 --- a/docs/sdks/analytics/README.md +++ b/docs/sdks/analytics/README.md @@ -24,9 +24,7 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.analytics.getUserActivity({ - date: "2025-08-24", - }); + const result = await openRouter.analytics.getUserActivity(); console.log(result); } @@ -49,9 +47,7 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await analyticsGetUserActivity(openRouter, { - date: "2025-08-24", - }); + const res = await analyticsGetUserActivity(openRouter); if (res.ok) { const { value: result } = res; console.log(result); diff --git a/docs/sdks/apikeys/README.md b/docs/sdks/apikeys/README.md index 189562d8..fa48e2cf 100644 --- a/docs/sdks/apikeys/README.md +++ b/docs/sdks/apikeys/README.md @@ -29,10 +29,7 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.apiKeys.list({ - includeDisabled: "false", - offset: "0", - }); + const result = await openRouter.apiKeys.list(); console.log(result); } @@ -55,10 +52,7 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await apiKeysList(openRouter, { - includeDisabled: "false", - offset: "0", - }); + const res = await apiKeysList(openRouter); if (res.ok) { const { value: result } = res; console.log(result); @@ -137,9 +131,6 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.apiKeys.create({ name: "My New API Key", - limit: 50, - limitReset: "monthly", - includeByokInLimit: true, }); console.log(result); @@ -165,9 +156,6 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await apiKeysCreate(openRouter, { name: "My New API Key", - limit: 50, - limitReset: "monthly", - includeByokInLimit: true, }); if (res.ok) { const { value: result } = res; @@ -237,13 +225,7 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.apiKeys.update({ hash: "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", - requestBody: { - name: "Updated API Key Name", - disabled: false, - limit: 75, - limitReset: "daily", - includeByokInLimit: true, - }, + requestBody: {}, }); console.log(result); @@ -269,13 +251,7 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await apiKeysUpdate(openRouter, { hash: "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", - requestBody: { - name: "Updated API Key Name", - disabled: false, - limit: 75, - limitReset: "daily", - includeByokInLimit: true, - }, + requestBody: {}, }); if (res.ok) { const { value: result } = res; diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index ca99a574..8224c3ad 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -25,51 +25,6 @@ async function run() { const result = await openRouter.chat.send({ messages: [], model: "Charger", - frequencyPenalty: 8689.88, - logitBias: { - "key": 4876.54, - "key1": 7346.88, - }, - logprobs: false, - topLogprobs: 2140.15, - maxCompletionTokens: 89.43, - maxTokens: 7392.4, - metadata: { - "key": "", - "key1": "", - "key2": "", - }, - presencePenalty: 9132.54, - reasoning: { - effort: "medium", - summary: null, - }, - responseFormat: { - type: "grammar", - grammar: "", - }, - seed: null, - stop: [], - streamOptions: { - includeUsage: true, - }, - temperature: 1, - toolChoice: "", - tools: [ - { - type: "function", - function: { - name: "", - description: "pro even bank rewarding ha modulo aboard mentor", - parameters: { - "key": "", - }, - strict: null, - }, - }, - ], - topP: 1, - user: "Francesco.Bartell", }); console.log(result); @@ -96,51 +51,6 @@ async function run() { const res = await chatSend(openRouter, { messages: [], model: "Charger", - frequencyPenalty: 8689.88, - logitBias: { - "key": 4876.54, - "key1": 7346.88, - }, - logprobs: false, - topLogprobs: 2140.15, - maxCompletionTokens: 89.43, - maxTokens: 7392.4, - metadata: { - "key": "", - "key1": "", - "key2": "", - }, - presencePenalty: 9132.54, - reasoning: { - effort: "medium", - summary: null, - }, - responseFormat: { - type: "grammar", - grammar: "", - }, - seed: null, - stop: [], - streamOptions: { - includeUsage: true, - }, - temperature: 1, - toolChoice: "", - tools: [ - { - type: "function", - function: { - name: "", - description: "pro even bank rewarding ha modulo aboard mentor", - parameters: { - "key": "", - }, - strict: null, - }, - }, - ], - topP: 1, - user: "Francesco.Bartell", }); if (res.ok) { const { value: result } = res; diff --git a/docs/sdks/completions/README.md b/docs/sdks/completions/README.md index 0397d49e..0e5898d5 100644 --- a/docs/sdks/completions/README.md +++ b/docs/sdks/completions/README.md @@ -25,37 +25,6 @@ async function run() { const result = await openRouter.completions.generate({ model: "Model T", prompt: "", - bestOf: 163488, - echo: true, - frequencyPenalty: 27.55, - logitBias: { - "key": 9064.25, - "key1": 7698.06, - "key2": 6481.8, - }, - logprobs: 482258, - maxTokens: null, - n: 629532, - presencePenalty: 5430.28, - seed: 853393, - stop: [ - "", - "", - ], - streamOptions: { - includeUsage: false, - }, - suffix: "", - temperature: null, - topP: 5229.98, - user: "Anita53", - metadata: { - "key": "", - "key1": "", - }, - responseFormat: { - type: "text", - }, }); console.log(result); @@ -82,37 +51,6 @@ async function run() { const res = await completionsGenerate(openRouter, { model: "Model T", prompt: "", - bestOf: 163488, - echo: true, - frequencyPenalty: 27.55, - logitBias: { - "key": 9064.25, - "key1": 7698.06, - "key2": 6481.8, - }, - logprobs: 482258, - maxTokens: null, - n: 629532, - presencePenalty: 5430.28, - seed: 853393, - stop: [ - "", - "", - ], - streamOptions: { - includeUsage: false, - }, - suffix: "", - temperature: null, - topP: 5229.98, - user: "Anita53", - metadata: { - "key": "", - "key1": "", - }, - responseFormat: { - type: "text", - }, }); if (res.ok) { const { value: result } = res; diff --git a/docs/sdks/models/README.md b/docs/sdks/models/README.md index 79a3efa9..39fe2982 100644 --- a/docs/sdks/models/README.md +++ b/docs/sdks/models/README.md @@ -122,10 +122,7 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.models.list({ - category: "", - supportedParameters: "", - }); + const result = await openRouter.models.list(); console.log(result); } @@ -148,10 +145,7 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await modelsList(openRouter, { - category: "", - supportedParameters: "", - }); + const res = await modelsList(openRouter); if (res.ok) { const { value: result } = res; console.log(result); diff --git a/docs/sdks/oauth/README.md b/docs/sdks/oauth/README.md index a28f02dc..582dfee8 100644 --- a/docs/sdks/oauth/README.md +++ b/docs/sdks/oauth/README.md @@ -27,8 +27,6 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.oAuth.exchangeAuthCodeForAPIKey({ code: "auth_code_abc123def456", - codeVerifier: "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", - codeChallengeMethod: "S256", }); console.log(result); @@ -54,8 +52,6 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await oAuthExchangeAuthCodeForAPIKey(openRouter, { code: "auth_code_abc123def456", - codeVerifier: "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", - codeChallengeMethod: "S256", }); if (res.ok) { const { value: result } = res; @@ -124,9 +120,6 @@ const openRouter = new OpenRouter({ async function run() { const result = await openRouter.oAuth.createAuthCode({ callbackUrl: "https://myapp.com/auth/callback", - codeChallenge: "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM", - codeChallengeMethod: "S256", - limit: 100, }); console.log(result); @@ -152,9 +145,6 @@ const openRouter = new OpenRouterCore({ async function run() { const res = await oAuthCreateAuthCode(openRouter, { callbackUrl: "https://myapp.com/auth/callback", - codeChallenge: "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM", - codeChallengeMethod: "S256", - limit: 100, }); if (res.ok) { const { value: result } = res; diff --git a/docs/sdks/responses/README.md b/docs/sdks/responses/README.md index ba9ca76c..92a7fb36 100644 --- a/docs/sdks/responses/README.md +++ b/docs/sdks/responses/README.md @@ -24,115 +24,7 @@ const openRouter = new OpenRouter({ }); async function run() { - const result = await openRouter.beta.responses.send({ - input: [ - { - type: "message", - role: "user", - content: "Hello, how are you?", - }, - ], - instructions: "", - 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", - strict: true, - parameters: { - "type": "object", - "properties": { - "location": { - "type": "string", - }, - }, - }, - }, - ], - toolChoice: { - type: "function", - name: "", - }, - parallelToolCalls: true, - model: "anthropic/claude-4.5-sonnet-20250929", - models: [ - "", - ], - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, - reasoning: { - effort: "high", - summary: "auto", - maxTokens: 8661.16, - enabled: true, - }, - maxOutputTokens: null, - temperature: 0.7, - topP: 0.9, - topK: 193.77, - promptCacheKey: "", - previousResponseId: "", - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - include: [ - "reasoning.encrypted_content", - ], - background: true, - safetyIdentifier: "", - store: true, - serviceTier: "auto", - truncation: "auto", - provider: { - allowFallbacks: null, - requireParameters: true, - dataCollection: "deny", - zdr: true, - order: [ - "OpenAI", - ], - only: [ - "OpenAI", - ], - ignore: null, - quantizations: [ - "fp16", - ], - sort: "price", - maxPrice: { - prompt: "1000", - completion: 1000, - image: 1000, - audio: "1000", - request: 1000, - }, - experimental: {}, - }, - plugins: [ - { - id: "file-parser", - maxFiles: 4870.55, - pdf: { - engine: "mistral-ocr", - }, - }, - ], - user: "Elmer_Yundt72", - }); + const result = await openRouter.beta.responses.send({}); console.log(result); } @@ -155,115 +47,7 @@ const openRouter = new OpenRouterCore({ }); async function run() { - const res = await betaResponsesSend(openRouter, { - input: [ - { - type: "message", - role: "user", - content: "Hello, how are you?", - }, - ], - instructions: "", - 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", - strict: true, - parameters: { - "type": "object", - "properties": { - "location": { - "type": "string", - }, - }, - }, - }, - ], - toolChoice: { - type: "function", - name: "", - }, - parallelToolCalls: true, - model: "anthropic/claude-4.5-sonnet-20250929", - models: [ - "", - ], - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, - reasoning: { - effort: "high", - summary: "auto", - maxTokens: 8661.16, - enabled: true, - }, - maxOutputTokens: null, - temperature: 0.7, - topP: 0.9, - topK: 193.77, - promptCacheKey: "", - previousResponseId: "", - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - include: [ - "reasoning.encrypted_content", - ], - background: true, - safetyIdentifier: "", - store: true, - serviceTier: "auto", - truncation: "auto", - provider: { - allowFallbacks: null, - requireParameters: true, - dataCollection: "deny", - zdr: true, - order: [ - "OpenAI", - ], - only: [ - "OpenAI", - ], - ignore: null, - quantizations: [ - "fp16", - ], - sort: "price", - maxPrice: { - prompt: "1000", - completion: 1000, - image: 1000, - audio: "1000", - request: 1000, - }, - experimental: {}, - }, - plugins: [ - { - id: "file-parser", - maxFiles: 4870.55, - pdf: { - engine: "mistral-ocr", - }, - }, - ], - user: "Elmer_Yundt72", - }); + const res = await betaResponsesSend(openRouter, {}); if (res.ok) { const { value: result } = res; console.log(result); diff --git a/examples/betaResponsesSend.example.ts b/examples/betaResponsesSend.example.ts index 6bef41fe..3a7d364c 100644 --- a/examples/betaResponsesSend.example.ts +++ b/examples/betaResponsesSend.example.ts @@ -18,115 +18,7 @@ const openRouter = new OpenRouter({ }); async function main() { - const result = await openRouter.beta.responses.send({ - input: [ - { - type: "message", - role: "user", - content: "Hello, how are you?", - }, - ], - instructions: "", - 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", - strict: true, - parameters: { - "type": "object", - "properties": { - "location": { - "type": "string", - }, - }, - }, - }, - ], - toolChoice: { - type: "function", - name: "", - }, - parallelToolCalls: true, - model: "anthropic/claude-4.5-sonnet-20250929", - models: [ - "", - ], - text: { - format: { - type: "text", - }, - verbosity: "medium", - }, - reasoning: { - effort: "high", - summary: "auto", - maxTokens: 8661.16, - enabled: true, - }, - maxOutputTokens: null, - temperature: 0.7, - topP: 0.9, - topK: 193.77, - promptCacheKey: "", - previousResponseId: "", - prompt: { - id: "", - variables: { - "key": { - type: "input_text", - text: "Hello, how can I help you?", - }, - }, - }, - include: [ - "reasoning.encrypted_content", - ], - background: true, - safetyIdentifier: "", - store: true, - serviceTier: "auto", - truncation: "auto", - provider: { - allowFallbacks: null, - requireParameters: true, - dataCollection: "deny", - zdr: true, - order: [ - "OpenAI", - ], - only: [ - "OpenAI", - ], - ignore: null, - quantizations: [ - "fp16", - ], - sort: "price", - maxPrice: { - prompt: "1000", - completion: 1000, - image: 1000, - audio: "1000", - request: 1000, - }, - experimental: {}, - }, - plugins: [ - { - id: "file-parser", - maxFiles: 4870.55, - pdf: { - engine: "mistral-ocr", - }, - }, - ], - user: "Elmer_Yundt72", - }); + const result = await openRouter.beta.responses.send({}); console.log(result); } diff --git a/jsr.json b/jsr.json index 8191be97..ae1951ec 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "0.0.1", + "version": "0.1.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index d382b2ae..b2a6fc3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@openrouter/sdk", - "version": "0.0.1", + "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@openrouter/sdk", - "version": "0.0.1", + "version": "0.1.0", "dependencies": { "zod": "^3.25.0 || ^4.0.0" }, diff --git a/package.json b/package.json index e195a7fe..80c8c535 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "0.0.1", + "version": "0.1.0", "author": "OpenRouter", "type": "module", "main": "./esm/index.js", diff --git a/src/lib/config.ts b/src/lib/config.ts index b0b2d588..77f4411d 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -59,7 +59,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "0.0.1", - genVersion: "2.731.6", - userAgent: "speakeasy-sdk/typescript 0.0.1 2.731.6 1.0.0 @openrouter/sdk", + sdkVersion: "0.1.0", + genVersion: "2.739.1", + userAgent: "speakeasy-sdk/typescript 0.1.0 2.739.1 1.0.0 @openrouter/sdk", } as const;