11lockVersion: 2.0.0
22id: 8b6cd71c-ea04-44da-af45-e43968b5928d
33management:
4- docChecksum: 21d34ad219f16d5944497a609bd0c936
4+ docChecksum: bcccd1abd05f6654a822386f2eefbd8a
55 docVersion: 1.0.0
6- speakeasyVersion: 1.649 .0
7- generationVersion: 2.739.1
8- releaseVersion: 0.1.1
9- configChecksum: c28c46b34a103eebef5cf4e55b42c8b7
6+ speakeasyVersion: 1.659 .0
7+ generationVersion: 2.755.9
8+ releaseVersion: 0.1.18
9+ configChecksum: ad5a220c1110e01ccea49eed2d7bb48c
1010 repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git
1111 installationURL: https://github.com/OpenRouterTeam/typescript-sdk
1212 published: true
@@ -15,7 +15,7 @@ features:
1515 acceptHeaders: 2.81.2
1616 additionalDependencies: 0.1.0
1717 constsAndDefaults: 0.1.12
18- core: 3.26.0
18+ core: 3.26.7
1919 customCodeRegions: 0.1.0
2020 defaultEnabledRetries: 0.1.0
2121 deprecations: 2.81.1
@@ -26,13 +26,13 @@ features:
2626 globalSecurityCallbacks: 0.1.0
2727 globalSecurityFlattening: 0.1.0
2828 globalServerURLs: 2.83.0
29+ globals: 2.82.2
2930 groups: 2.81.3
3031 methodArguments: 0.1.2
3132 methodSecurity: 2.82.6
3233 nameOverrides: 2.81.2
3334 nullables: 0.1.1
3435 openEnums: 0.1.1
35- reactQueryHooks: 0.2.3
3636 responseFormat: 0.2.3
3737 retries: 2.83.0
3838 sdkHooks: 0.3.0
@@ -46,7 +46,6 @@ generatedFiles:
4646 - .devcontainer/setup.sh
4747 - .gitattributes
4848 - FUNCTIONS.md
49- - REACT_QUERY.md
5049 - RUNTIMES.md
5150 - USAGE.md
5251 - docs/lib/utils/retryconfig.md
@@ -70,9 +69,14 @@ generatedFiles:
7069 - docs/models/chatmessagecontentitemaudio.md
7170 - docs/models/chatmessagecontentitemaudioformat.md
7271 - docs/models/chatmessagecontentitemaudioinputaudio.md
72+ - docs/models/chatmessagecontentitemfile.md
7373 - docs/models/chatmessagecontentitemimage.md
7474 - docs/models/chatmessagecontentitemimagedetail.md
7575 - docs/models/chatmessagecontentitemtext.md
76+ - docs/models/chatmessagecontentitemvideo.md
77+ - docs/models/chatmessagecontentitemvideoinputvideo.md
78+ - docs/models/chatmessagecontentitemvideovideourl.md
79+ - docs/models/chatmessagecontentitemvideovideourlvideourl.md
7680 - docs/models/chatmessagetokenlogprob.md
7781 - docs/models/chatmessagetokenlogprobs.md
7882 - docs/models/chatmessagetoolcall.md
@@ -125,11 +129,11 @@ generatedFiles:
125129 - docs/models/errors/toomanyrequestsresponseerror.md
126130 - docs/models/errors/unauthorizedresponseerror.md
127131 - docs/models/errors/unprocessableentityresponseerror.md
128- - docs/models/experimental.md
129132 - docs/models/filecitation.md
130133 - docs/models/filecitationtype.md
131134 - docs/models/filepath.md
132135 - docs/models/filepathtype.md
136+ - docs/models/filet.md
133137 - docs/models/forbiddenresponseerrordata.md
134138 - docs/models/idfileparser.md
135139 - docs/models/idmoderation.md
@@ -294,6 +298,9 @@ generatedFiles:
294298 - docs/models/openresponseswebsearchtooltype.md
295299 - docs/models/operations/apitype.md
296300 - docs/models/operations/calldata.md
301+ - docs/models/operations/content.md
302+ - docs/models/operations/contentimageurl.md
303+ - docs/models/operations/contenttext.md
297304 - docs/models/operations/createauthkeyscodecodechallengemethod.md
298305 - docs/models/operations/createauthkeyscodedata.md
299306 - docs/models/operations/createauthkeyscoderequest.md
@@ -312,17 +319,13 @@ generatedFiles:
312319 - docs/models/operations/createkeysresponse.md
313320 - docs/models/operations/createresponsesresponse.md
314321 - docs/models/operations/createresponsesresponsebody.md
315- - docs/models/operations/datacollection.md
316322 - docs/models/operations/deletekeysrequest.md
317323 - docs/models/operations/deletekeysresponse.md
318324 - docs/models/operations/embedding.md
319325 - docs/models/operations/encodingformat.md
320- - docs/models/operations/encodingformatbase64.md
321- - docs/models/operations/encodingformatfloat.md
322326 - docs/models/operations/exchangeauthcodeforapikeycodechallengemethod.md
323327 - docs/models/operations/exchangeauthcodeforapikeyrequest.md
324328 - docs/models/operations/exchangeauthcodeforapikeyresponse.md
325- - docs/models/operations/experimental.md
326329 - docs/models/operations/getcreditsresponse.md
327330 - docs/models/operations/getcurrentkeydata.md
328331 - docs/models/operations/getcurrentkeyresponse.md
@@ -341,7 +344,9 @@ generatedFiles:
341344 - docs/models/operations/getuseractivityrequest.md
342345 - docs/models/operations/getuseractivityresponse.md
343346 - docs/models/operations/ignore.md
347+ - docs/models/operations/imageurl.md
344348 - docs/models/operations/input.md
349+ - docs/models/operations/inputunion.md
345350 - docs/models/operations/listdata.md
346351 - docs/models/operations/listendpointsrequest.md
347352 - docs/models/operations/listendpointsresponse.md
@@ -359,9 +364,10 @@ generatedFiles:
359364 - docs/models/operations/order.md
360365 - docs/models/operations/ratelimit.md
361366 - docs/models/operations/sendchatcompletionrequestresponse.md
362- - docs/models/operations/sort.md
363367 - docs/models/operations/supportedparameter.md
364368 - docs/models/operations/transferintent.md
369+ - docs/models/operations/typeimageurl.md
370+ - docs/models/operations/typetext.md
365371 - docs/models/operations/updatekeysdata.md
366372 - docs/models/operations/updatekeyslimitreset.md
367373 - docs/models/operations/updatekeysrequest.md
@@ -400,6 +406,7 @@ generatedFiles:
400406 - docs/models/provider.md
401407 - docs/models/providername.md
402408 - docs/models/provideroverloadedresponseerrordata.md
409+ - docs/models/providersort.md
403410 - docs/models/publicendpoint.md
404411 - docs/models/publicendpointquantization.md
405412 - docs/models/publicpricing.md
@@ -470,14 +477,13 @@ generatedFiles:
470477 - docs/models/security.md
471478 - docs/models/servicetier.md
472479 - docs/models/serviceunavailableresponseerrordata.md
473- - docs/models/sort.md
474480 - docs/models/streamoptions.md
475481 - docs/models/systemmessage.md
476482 - docs/models/systemmessagecontent.md
477483 - docs/models/tokenizer.md
478- - docs/models/tool.md
479484 - docs/models/toolcallstatus.md
480- - docs/models/toolfunction.md
485+ - docs/models/tooldefinitionjson.md
486+ - docs/models/tooldefinitionjsonfunction.md
481487 - docs/models/toolresponsemessage.md
482488 - docs/models/toolresponsemessagecontent.md
483489 - docs/models/toomanyrequestsresponseerrordata.md
@@ -509,6 +515,7 @@ generatedFiles:
509515 - docs/models/usermessage.md
510516 - docs/models/usermessagecontent.md
511517 - docs/models/variables.md
518+ - docs/models/videourl.md
512519 - docs/models/websearchpreviewtooluserlocation.md
513520 - docs/models/websearchpreviewtooluserlocationtype.md
514521 - docs/models/websearchstatus.md
@@ -546,6 +553,7 @@ generatedFiles:
546553 - src/funcs/creditsCreateCoinbaseCharge.ts
547554 - src/funcs/creditsGetCredits.ts
548555 - src/funcs/embeddingsGenerate.ts
556+ - src/funcs/embeddingsListModels.ts
549557 - src/funcs/endpointsList.ts
550558 - src/funcs/endpointsListZdrEndpoints.ts
551559 - src/funcs/generationsGetGeneration.ts
@@ -581,20 +589,20 @@ generatedFiles:
581589 - src/models/assistantmessage.ts
582590 - src/models/badgatewayresponseerrordata.ts
583591 - src/models/badrequestresponseerrordata.ts
584- - src/models/chatcompletionfinishreason.ts
585592 - src/models/chaterror.ts
586593 - src/models/chatgenerationparams.ts
587594 - src/models/chatgenerationtokenusage.ts
588595 - src/models/chatmessagecontentitem.ts
589596 - src/models/chatmessagecontentitemaudio.ts
597+ - src/models/chatmessagecontentitemfile.ts
590598 - src/models/chatmessagecontentitemimage.ts
591599 - src/models/chatmessagecontentitemtext.ts
600+ - src/models/chatmessagecontentitemvideo.ts
592601 - src/models/chatmessagetokenlogprob.ts
593602 - src/models/chatmessagetokenlogprobs.ts
594603 - src/models/chatmessagetoolcall.ts
595604 - src/models/chatresponse.ts
596605 - src/models/chatresponsechoice.ts
597- - src/models/chatstreamingchoice.ts
598606 - src/models/chatstreamingmessagechunk.ts
599607 - src/models/chatstreamingmessagetoolcall.ts
600608 - src/models/chatstreamingresponsechunk.ts
@@ -605,6 +613,7 @@ generatedFiles:
605613 - src/models/completionresponse.ts
606614 - src/models/completionusage.ts
607615 - src/models/createchargerequest.ts
616+ - src/models/datacollection.ts
608617 - src/models/defaultparameters.ts
609618 - src/models/edgenetworktimeoutresponseerrordata.ts
610619 - src/models/endpointstatus.ts
@@ -718,6 +727,7 @@ generatedFiles:
718727 - src/models/perrequestlimits.ts
719728 - src/models/providername.ts
720729 - src/models/provideroverloadedresponseerrordata.ts
730+ - src/models/providersort.ts
721731 - src/models/publicendpoint.ts
722732 - src/models/publicpricing.ts
723733 - src/models/quantization.ts
@@ -750,43 +760,18 @@ generatedFiles:
750760 - src/models/security.ts
751761 - src/models/serviceunavailableresponseerrordata.ts
752762 - src/models/systemmessage.ts
753- - src/models/tool.ts
754763 - src/models/toolcallstatus.ts
764+ - src/models/tooldefinitionjson.ts
755765 - src/models/toolresponsemessage.ts
756766 - src/models/toomanyrequestsresponseerrordata.ts
757767 - src/models/topproviderinfo.ts
758768 - src/models/unauthorizedresponseerrordata.ts
759769 - src/models/unprocessableentityresponseerrordata.ts
760770 - src/models/urlcitation.ts
761771 - src/models/usermessage.ts
772+ - src/models/videourl.ts
762773 - src/models/websearchpreviewtooluserlocation.ts
763774 - src/models/websearchstatus.ts
764- - src/react-query/_context.tsx
765- - src/react-query/_types.ts
766- - src/react-query/analyticsGetUserActivity.ts
767- - src/react-query/apiKeysCreate.ts
768- - src/react-query/apiKeysDelete.ts
769- - src/react-query/apiKeysGet.ts
770- - src/react-query/apiKeysGetCurrentKeyMetadata.ts
771- - src/react-query/apiKeysList.ts
772- - src/react-query/apiKeysUpdate.ts
773- - src/react-query/betaResponsesSend.ts
774- - src/react-query/chatSend.ts
775- - src/react-query/completionsGenerate.ts
776- - src/react-query/creditsCreateCoinbaseCharge.ts
777- - src/react-query/creditsGetCredits.ts
778- - src/react-query/embeddingsGenerate.ts
779- - src/react-query/endpointsList.ts
780- - src/react-query/endpointsListZdrEndpoints.ts
781- - src/react-query/generationsGetGeneration.ts
782- - src/react-query/index.ts
783- - src/react-query/modelsCount.ts
784- - src/react-query/modelsList.ts
785- - src/react-query/modelsListForUser.ts
786- - src/react-query/oAuthCreateAuthCode.ts
787- - src/react-query/oAuthExchangeAuthCodeForAPIKey.ts
788- - src/react-query/parametersGetParameters.ts
789- - src/react-query/providersList.ts
790775 - src/sdk/analytics.ts
791776 - src/sdk/apikeys.ts
792777 - src/sdk/beta.ts
@@ -1523,7 +1508,7 @@ examples:
15231508 id: "<id>"
15241509 responses:
15251510 "200":
1526- application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_video_prompt": 0, " num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions"}}
1511+ application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions"}}
15271512 default:
15281513 application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"}
15291514 4XX:
@@ -1790,4 +1775,22 @@ examples:
17901775 application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}}
17911776 "529":
17921777 application/json: {"error": {"code": 529, "message": "Provider returned error"}}
1778+ listModelsEmbeddings:
1779+ speakeasy-default-list-models-embeddings:
1780+ responses:
1781+ "200":
1782+ 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}]}
1783+ "400":
1784+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
1785+ "500":
1786+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
1787+ listEmbeddingsModels:
1788+ speakeasy-default-list-embeddings-models:
1789+ responses:
1790+ "200":
1791+ 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}]}
1792+ "400":
1793+ application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
1794+ "500":
1795+ application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
17931796examplesVersion: 1.0.2
0 commit comments