Compare commits

..
Author SHA1 Message Date
speakeasy-github[bot]andspeakeasy-bot dac146853b empty commit to trigger [run-tests] workflow 2026-06-22 01:01:22 +00:00
speakeasybot 3fb1cee1b1 ## Python SDK Changes:
* `open_router.benchmarks.get_benchmarks()`: **Added**
* `open_router.datasets.get_benchmarks_artificial_analysis()`: **Deleted** **Breaking** ⚠️
* `open_router.datasets.get_benchmarks_design_arena()`: **Deleted** **Breaking** ⚠️
* `open_router.chat.send()`:  `response` **Changed**
* `open_router.embeddings.generate()`:  `response.usage` **Changed**
* `open_router.embeddings.list_models()`:  `response.data.[].reasoning` **Added**
* `open_router.models.get()`:  `response.data.reasoning` **Added**
* `open_router.models.list()`:  `response.data.[].reasoning` **Added**
* `open_router.models.list_for_user()`:  `response.data.[].reasoning` **Added**
2026-06-22 01:01:05 +00:00
146cec3c08 chore: update OpenAPI spec from monorepo (#341)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-19 09:03:24 -07:00
14a62e3451 chore: update OpenAPI spec from monorepo (#339)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-18 16:24:52 -07:00
7e29e408af chore: update OpenAPI spec from monorepo (#333)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-18 10:20:41 -07:00
Christine ChenandGitHub 30bc131b97 feat: auto-merge Speakeasy SDK generation PRs (#332) 2026-06-18 11:05:15 -04:00
Christine Chen 1b0118c365 fix: address review feedback on auto-merge workflow
Pipe gh pr list output through jq instead of passing --arg to gh --jq,
and add a repo-level concurrency group to prevent cross-PR merge races.
2026-06-17 16:54:40 -04:00
Christine Chen cda73e5ebf feat: auto-merge Speakeasy SDK generation PRs
Add a workflow that merges Speakeasy codegen PRs when the bot applies a
semver label, closing superseded regen PRs first. This unblocks
sdk_publish.yaml after mode:pr generation without manual intervention.
2026-06-17 16:28:01 -04:00
b0eda78d3f chore: update OpenAPI spec from monorepo (#330)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-17 12:53:02 -07:00
Christine ChenandGitHub bf682bdb62 fix: use PR mode for spec-change SDK generation (#329) 2026-06-17 15:07:36 -04:00
Christine Chen b322622117 fix: use PR mode for spec-change SDK generation
Switch sdk_generation_for_spec_change.yaml from direct to pr mode so
Speakeasy opens a PR instead of pushing to main. This avoids branch
protection failures and routes publishing through sdk_publish.yaml.
2026-06-17 10:37:08 -04:00
Matt AppersonandGitHub 415450e785 chore: 🐝 Update SDK - Generate 0.10.0 (#317) 2026-06-17 09:48:04 -04:00
speakeasy-github[bot]andspeakeasy-bot 1d488f0117 empty commit to trigger [run-tests] workflow 2026-06-17 01:01:27 +00:00
speakeasybot 4e789208b4 ## Python SDK Changes:
* `open_router.beta.responses.send()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `response` **Changed** **Breaking** ⚠️
* `open_router.presets.create_presets_responses()`:  `request` **Changed** **Breaking** ⚠️
* `open_router.presets.create_presets_chat_completions()`:  `request` **Changed** **Breaking** ⚠️
* `open_router.chat.send()`:  `request` **Changed** **Breaking** ⚠️
* `open_router.workspaces.set_budget()`: **Added**
* `open_router.o_auth.create_auth_code()`: 
  *  `request.workspace_id` **Added**
  *  `error.status[403]` **Added**
* `open_router.files.download()`: **Added**
* `open_router.models.get()`: **Added**
* `open_router.workspaces.list_budgets()`: **Added**
* `open_router.workspaces.delete_budget()`: **Added**
* `open_router.datasets.get_benchmarks_artificial_analysis()`: **Added**
* `open_router.beta.analytics.query_analytics()`:  `response.data.warnings` **Added**
* `open_router.files.delete()`: **Added**
* `open_router.files.retrieve()`: **Added**
* `open_router.files.upload()`: **Added**
* `open_router.embeddings.list_models()`:  `response.data.[].benchmarks` **Added**
* `open_router.models.list()`: 
  *  `request` **Changed**
  *  `response.data.[].benchmarks` **Added**
* `open_router.models.list_for_user()`:  `response.data.[].benchmarks` **Added**
* `open_router.files.list()`: **Added**
* `open_router.presets.create_presets_messages()`:  `request` **Changed**
* `open_router.datasets.get_benchmarks_design_arena()`: **Added**
2026-06-17 01:01:09 +00:00
cdd4dc7302 chore: update OpenAPI spec from monorepo (#328)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-16 16:01:05 -07:00
Christine ChenandGitHub 60708e1e8b docs: remove beta labels from Python SDK README (#327) 2026-06-16 18:58:58 -04:00
Christine Chen 5a324f99ae docs: remove beta labels from Python SDK README
The Python SDK is no longer in beta. Drop the (Beta) title suffix and
remove the Maturity section disclaimer from README and README-PYPI.

SDK-464
2026-06-16 18:09:12 -04:00
d5778dfafb chore: update OpenAPI spec from monorepo (#326)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-16 14:36:02 -07:00
68c251830c chore: update OpenAPI spec from monorepo (#325)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-16 12:52:37 -07:00
2aa2d73d2d chore: update OpenAPI spec from monorepo (#324)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-16 10:37:39 -07:00
58bd390fbd chore: update OpenAPI spec from monorepo (#323)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-16 00:39:20 -07:00
2707901239 chore: update OpenAPI spec from monorepo (#322)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-15 14:21:32 -07:00
a5ed2de8a8 chore: update OpenAPI spec from monorepo (#321)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-15 10:29:12 -07:00
robert-j-yandGitHub 21893dda58 ci: regenerate SDK directly when merged spec changes land (#315) 2026-06-15 09:52:12 -07:00
758a2f3d49 chore: update OpenAPI spec from monorepo (#320)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-15 09:28:46 -07:00
0331f14f19 chore: update OpenAPI spec from monorepo (#319)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-15 06:48:08 -07:00
138b131a35 chore: update OpenAPI spec from monorepo (#318)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-12 22:08:18 -07:00
Christine ChenandGitHub 55c0d5c7fd docs: update outdated model counts in SDK documentation (#313) 2026-06-12 17:37:19 -04:00
e98a7a8260 chore: update OpenAPI spec from monorepo (#316)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-12 13:38:51 -07:00
Christine Chen 7e7787cb23 docs: update outdated model counts in SDK documentation
Refresh README and overview copy to reflect 400+ available models instead of 300+.
2026-06-12 15:47:18 -04:00
c4b508f045 chore: update OpenAPI spec from monorepo (#314)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-12 12:44:30 -07:00
52e7853d21 chore: update OpenAPI spec from monorepo (#312)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-12 10:46:58 -07:00
d43061f722 chore: update OpenAPI spec from monorepo (#311)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-12 10:09:55 -07:00
7b10fd47d8 chore: update OpenAPI spec from monorepo (#310)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-12 07:28:06 -07:00
95f2c87bfa chore: update OpenAPI spec from monorepo (#309)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-12 06:51:21 -07:00
c756fc51e0 chore: update OpenAPI spec from monorepo (#308)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-11 17:50:16 -07:00
386db75669 chore: update OpenAPI spec from monorepo (#307)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-11 13:27:05 -07:00
e3dc2e6f4c chore: update OpenAPI spec from monorepo (#306)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-11 12:10:20 -07:00
70c8757fc0 chore: update OpenAPI spec from monorepo (#305)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-11 11:10:32 -07:00
b794150ed9 chore: update OpenAPI spec from monorepo (#304)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-11 09:18:46 -07:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
0f116c9792 chore: 🐝 Update SDK - Generate 0.9.2 (#205)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-11 12:10:31 -04:00
0c735989c1 chore: update OpenAPI spec from monorepo (#303)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-10 22:01:22 -07:00
3b2f5b2316 chore: update OpenAPI spec from monorepo (#301)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-10 16:46:14 -07:00
3883438f02 chore: update OpenAPI spec from monorepo (#300)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-10 16:00:58 -07:00
1cd1e66e2d chore: update OpenAPI spec from monorepo (#299)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-10 11:13:43 -07:00
f29a61de7e chore: update OpenAPI spec from monorepo (#298)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-10 10:06:09 -07:00
1725abad89 chore: update OpenAPI spec from monorepo (#297)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-10 06:22:51 -07:00
8df520997d chore: update OpenAPI spec from monorepo (#296)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-09 19:48:29 -07:00
c4843278fd chore: update OpenAPI spec from monorepo (#295)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-09 17:13:15 -07:00
ccbd6d16f8 chore: update OpenAPI spec from monorepo (#294)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-09 16:50:55 -07:00
80646bd8a6 chore: update OpenAPI spec from monorepo (#293)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-09 15:54:33 -07:00
68fc6f0ee9 chore: update OpenAPI spec from monorepo (#292)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-09 12:37:51 -07:00
23ee599564 chore: update OpenAPI spec from monorepo (#291)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-09 11:13:04 -07:00
2203de96b4 chore: update OpenAPI spec from monorepo (#290)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-08 16:40:27 -04:00
b7d5098042 chore: update OpenAPI spec from monorepo (#289)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-08 12:07:59 -04:00
b9f588d84b chore: update OpenAPI spec from monorepo (#288)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-08 10:28:12 -04:00
5caa85a52c chore: update OpenAPI spec from monorepo (#287)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-05 10:37:07 -04:00
fc328cd45d chore: update OpenAPI spec from monorepo (#286)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-04 16:17:54 -04:00
234901509f chore: update OpenAPI spec from monorepo (#285)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-03 16:57:01 -04:00
771a5b1a52 chore: update OpenAPI spec from monorepo (#284)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-01 20:54:31 -07:00
93dd1b59fd chore: update OpenAPI spec from monorepo (#282)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-29 17:59:39 -07:00
698e7d6d7e chore: update OpenAPI spec from monorepo (#281)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-29 15:52:56 -07:00
fe4080dfda chore: update OpenAPI spec from monorepo (#280)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-28 14:04:37 -07:00
1090ab30b2 chore: update OpenAPI spec from monorepo (#279)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-28 10:52:41 -07:00
51a8873f33 chore: update OpenAPI spec from monorepo (#278)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-28 08:22:21 -07:00
a95178f8b3 chore: update OpenAPI spec from monorepo (#277)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-28 03:20:57 -07:00
63b73f57d4 chore: update OpenAPI spec from monorepo (#276)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-27 23:21:46 -07:00
6ceb25ca84 chore: update OpenAPI spec from monorepo (#275)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-26 20:08:49 -07:00
b5aca7806b chore: update OpenAPI spec from monorepo (#274)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-26 17:38:30 -07:00
4610ea4719 chore: update OpenAPI spec from monorepo (#273)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-26 14:05:37 -07:00
67bd50597a chore: update OpenAPI spec from monorepo (#272)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-26 06:46:07 -07:00
859e89d545 chore: update OpenAPI spec from monorepo (#271)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-24 04:32:12 -07:00
f94fcc1eb1 chore: update OpenAPI spec from monorepo (#270)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-22 18:00:36 -07:00
c361f61f5b chore: update OpenAPI spec from monorepo (#268)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-22 09:44:53 -07:00
f119275b26 chore: update OpenAPI spec from monorepo (#267)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-20 14:45:06 -07:00
460658428f chore: update OpenAPI spec from monorepo (#263)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-19 17:32:47 -07:00
5d441447a9 chore: update OpenAPI spec from monorepo (#262)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-19 14:12:00 -07:00
d549103228 chore: update OpenAPI spec from monorepo (#261)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-19 12:50:36 -07:00
Matt AppersonandGitHub 3e77e61a5c chore: bump speakeasy version to 1.763.2 (#260) 2026-05-19 15:18:43 -04:00
e0dddac466 chore: update OpenAPI spec from monorepo (#259)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-18 22:55:48 -07:00
32c6c506cf chore: update OpenAPI spec from monorepo (#258)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-18 17:30:34 -07:00
59a8775ed7 chore: update OpenAPI spec from monorepo (#257)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-18 15:36:40 -07:00
e7a06917b2 chore: update OpenAPI spec from monorepo (#256)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-16 20:34:21 -07:00
d8c617dfd2 chore: update OpenAPI spec from monorepo (#255)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-16 18:53:40 -07:00
752156a9ad chore: update OpenAPI spec from monorepo (#254)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-16 14:13:23 -07:00
688c063276 chore: update OpenAPI spec from monorepo (#253)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-16 11:20:24 -07:00
da19555f7f chore: update OpenAPI spec from monorepo (#252)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-15 16:01:52 -07:00
0ecf2ef253 chore: update OpenAPI spec from monorepo (#251)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-15 13:49:07 -07:00
a7fd661299 chore: update OpenAPI spec from monorepo (#250)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-15 11:26:30 -07:00
c5e2532cc4 chore: update OpenAPI spec from monorepo (#249)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-15 06:27:29 -07:00
0aa6eabffd chore: update OpenAPI spec from monorepo (#248)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-14 17:00:01 -07:00
205749ae6b chore: update OpenAPI spec from monorepo (#247)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-14 13:13:22 -07:00
bf8a2c6adc chore: update OpenAPI spec from monorepo (#246)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-14 07:02:37 -07:00
9312cabf22 chore: update OpenAPI spec from monorepo (#245)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-13 18:10:03 -07:00
ec85ab283b chore: update OpenAPI spec from monorepo (#244)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-13 14:58:31 -07:00
4c5911ffee chore: update OpenAPI spec from monorepo (#243)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-13 13:33:16 -07:00
882f4a0811 chore: update OpenAPI spec from monorepo (#242)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-13 09:29:14 -07:00
90f661ff73 chore: update OpenAPI spec from monorepo (#241)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-13 07:25:17 -07:00
bb74b7fabc chore: update OpenAPI spec from monorepo (#240)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-13 00:43:55 -07:00
a7bb403311 chore: update OpenAPI spec from monorepo (#239)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-12 23:54:21 -07:00
522b03abf3 chore: update OpenAPI spec from monorepo (#238)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-12 21:49:55 -07:00
be479e24fd chore: update OpenAPI spec from monorepo (#237)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-12 18:12:04 -07:00
a4197ac1db chore: update OpenAPI spec from monorepo (#236)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-11 19:37:39 -07:00
f587c3ce45 chore: update OpenAPI spec from monorepo (#235)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-11 16:37:12 -07:00
a4ae8297ce chore: update OpenAPI spec from monorepo (#234)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-09 00:28:51 -07:00
4664c73492 chore: update OpenAPI spec from monorepo (#233)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-08 15:25:45 -07:00
e150991aa7 chore: update OpenAPI spec from monorepo (#232)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-08 07:42:24 -07:00
5f18dd0131 chore: update OpenAPI spec from monorepo (#231)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-07 15:00:54 -07:00
5441e86fee chore: update OpenAPI spec from monorepo (#230)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-06 15:46:15 -07:00
bb505b71e5 chore: update OpenAPI spec from monorepo (#229)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-06 15:03:26 -07:00
45c3ace681 chore: update OpenAPI spec from monorepo (#228)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-06 12:18:59 -07:00
d208cc6cf8 chore: update OpenAPI spec from monorepo (#227)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-06 09:58:16 -07:00
fb31150e8f chore: update OpenAPI spec from monorepo (#226)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-06 03:37:55 -07:00
e0e80c538a chore: update OpenAPI spec from monorepo (#224)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-05 21:16:03 -07:00
7db74e51d1 chore: update OpenAPI spec from monorepo (#223)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-05 18:17:00 -07:00
27c12d4d59 chore: update OpenAPI spec from monorepo (#222)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-05 09:56:31 -07:00
cd24443470 chore: update OpenAPI spec from monorepo (#221)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-05 08:47:57 -07:00
2fc0ea8084 chore: update OpenAPI spec from monorepo (#220)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-04 15:06:32 -05:00
330cff1158 chore: update OpenAPI spec from monorepo (#219)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-04 14:33:14 -05:00
8ac9dede84 chore: update OpenAPI spec from monorepo (#218)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-05-02 12:45:50 -05:00
c10bbfe084 chore: update OpenAPI spec from monorepo (#216)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-30 12:23:07 -05:00
3d1fdef97a chore: update OpenAPI spec from monorepo (#215)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-30 04:07:15 -05:00
067cdc027a chore: update OpenAPI spec from monorepo (#214)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-27 20:53:22 -05:00
5bad276c29 chore: update OpenAPI spec from monorepo (#211)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-24 09:05:21 -05:00
f3699017d5 chore: update OpenAPI spec from monorepo (#193)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-23 10:06:30 -05:00
b202e599ae chore: update OpenAPI spec from monorepo (#190)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-23 00:06:20 -05:00
be9056bcbe chore: update OpenAPI spec from monorepo (#177)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-22 09:03:32 -05:00
cb23cec150 chore: update OpenAPI spec from monorepo (#164)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-21 14:55:33 -05:00
312ffce1c5 chore: update OpenAPI spec from monorepo (#151)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-20 13:33:39 -05:00
c5e87b6ab2 chore: update OpenAPI spec from monorepo (#150)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-20 07:44:12 -05:00
a23c20f60b chore: update OpenAPI spec from monorepo (#146)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-19 10:30:32 -05:00
e6703a5038 chore: update OpenAPI spec from monorepo (#143)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-18 23:28:56 -05:00
9ce403745a chore: update OpenAPI spec from monorepo (#141)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-18 20:28:30 -05:00
175b135377 chore: update OpenAPI spec from monorepo (#135)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-17 19:46:43 -05:00
0503928934 chore: update OpenAPI spec from monorepo (#132)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-16 15:19:12 -05:00
6006c3a84f chore: update OpenAPI spec from monorepo (#131)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-16 12:44:05 -05:00
c2a933ff6b chore: update OpenAPI spec from monorepo (#130)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-16 09:56:09 -05:00
a34a1456a1 chore: update OpenAPI spec from monorepo (#126)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-15 16:04:08 -05:00
a40c0019c1 chore: update OpenAPI spec from monorepo (#125)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-15 09:38:49 -05:00
5881e47375 chore: update OpenAPI spec from monorepo (#124)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-14 15:01:06 -05:00
6989ad4f40 chore: update OpenAPI spec from monorepo (#122)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-14 11:59:16 -05:00
Matt AppersonandGitHub b2386114cd fix: add overlay to remove nullable from pagination offset params (#121) 2026-04-14 12:48:15 -04:00
2bba049182 chore: update OpenAPI spec from monorepo (#119)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-14 09:43:17 -05:00
e8953c70bd chore: update OpenAPI spec from monorepo (#113)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-13 12:55:39 -05:00
29fdfcedc3 chore: update OpenAPI spec from monorepo (#112)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-13 11:15:35 -05:00
c0959955c1 chore: update OpenAPI spec from monorepo (#110)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-13 03:41:31 -05:00
a0a7edecfa chore: update OpenAPI spec from monorepo (#106)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-12 12:21:17 -05:00
4e84bb736b chore: update OpenAPI spec from monorepo (#98)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-10 21:16:40 -04:00
947e92e68d chore: update OpenAPI spec from monorepo (#99)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-10 21:16:13 -04:00
bdbd8becc2 chore: update OpenAPI spec from monorepo (#97)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-10 21:15:46 -04:00
6ef088e7c7 chore: update OpenAPI spec from monorepo (#100)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-10 21:15:45 -04:00
e4e5cc259a chore: update OpenAPI spec from monorepo (#101)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-04-10 21:14:47 -04:00
Matt AppersonandGitHub 06bea2ae0f chore: set forwardCompatibleUnionsByDefault to tagged-only (#76) 2026-04-08 10:46:15 -04:00
Matt AppersonandGitHub 6b1b7e6a9d fix: add overlay to convert boolean query params to boolean type (#75) 2026-04-08 09:22:13 -04:00
Matt AppersonandGitHub dd8e6bdac2 fix: add generic overlay to remove redundant allOf inline enums (#73) 2026-04-03 18:37:50 -04:00
Matt Apperson e6b0242969 chore: clean up removed docs and update generated SDK files
Remove obsolete component documentation and update speakeasy-generated
files to match the latest OpenAPI spec regeneration.
2026-04-02 10:21:41 -04:00
OpenRouter SDK Bot 5ab44f08f0 feat: regenerate SDK with updated OpenAPI spec
Speakeasy regeneration with latest schema changes including
type renames and new server tool models.
2026-03-27 15:18:14 -04:00
robert-j-yandGitHub e72a84e82d chore: sync from monorepo (#61) 2026-02-23 17:02:29 -06:00
OpenRouter Team c734c52d9c Commits included in this export:
- 56d382078cfce7fa597d1da2bce531af2d060b47
  - 9ef6db7e04c9401536763a321b05d00311cef31a
  - bf855082e30820d466f0f86a6d6e87de2ecfb06f
  - 335b1cbe361214e48b945b987b4e164457aa817b
  - 648485fdc7f9d8ae86fd857eccedcc5e41fb2e69
  - 80c49474a15a2bd549a5f26efad3858aa45b7c7b
  - 70e8ac317f9c4472db3decd024d1819650df4182
  - 9f2a6659ab6dbf111a0c29e4366328c3d2048826
  - a3a28b1fc6ec7d2941232a4ebde8c5f470497876
  - 4b5dc9193480b7c5c9ddb882ccf3ee2128ca0d51
  - bb413e979a46ef67c2f266743f7ebd798af42afb
  - b60e92d5dcec83f31986164f51c010d1728b2b17
  - 45687f423707f5838461585c568a024a19eb2f06
  - 3103d3ca68b6e42ccdb6136588ec2b6edc8dcab0
  - fd9f991606027cd86116317c71f8eb7b4e2aa3eb
  - 0f312019161edd76c1e5923d142c788d22f096d5
  - 5dbab2094bc744db4a90b3097520d897e5d0d634
  - 4c47d1af1735db18a1c1a7f463e801c7f71ad4e5

GitOrigin-RevId: 56d382078cfce7fa597d1da2bce531af2d060b47
2026-02-23 21:34:42 +00:00
1246 changed files with 138780 additions and 48558 deletions
@@ -0,0 +1,86 @@
name: Auto-merge Speakeasy PR
# Speakeasy mode:pr opens PRs (speakeasy-sdk-regen-*) and labels them
# patch/minor/major. Merge automatically so sdk_publish.yaml can run.
on:
pull_request:
types: [labeled]
permissions:
contents: write
pull-requests: write
concurrency:
group: auto-merge-speakeasy
cancel-in-progress: false
jobs:
auto-merge:
if: |
github.event.sender.login == 'github-actions[bot]' &&
github.event.pull_request.user.login == 'github-actions[bot]' &&
startsWith(github.event.pull_request.head.ref, 'speakeasy-sdk-regen-') &&
contains(github.event.pull_request.title, '🐝 Update SDK') &&
contains(fromJSON('["patch", "minor", "major"]'), github.event.label.name)
runs-on: ubuntu-latest
steps:
- name: Close superseded Speakeasy PRs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
CURRENT_PR="${{ github.event.pull_request.number }}"
PRIOR_JSON=$(gh pr list \
--repo "${{ github.repository }}" \
--state open \
--search "head:speakeasy-sdk-regen-" \
--limit 500 \
--json number \
| jq -r --arg cur "$CURRENT_PR" \
'[.[].number | select(tostring != $cur)] | .[]')
if [ -z "$PRIOR_JSON" ]; then
echo "No superseded Speakeasy PRs to close"
exit 0
fi
mapfile -t PRIOR <<< "$PRIOR_JSON"
echo "Closing ${#PRIOR[@]} superseded Speakeasy PR(s)"
for N in "${PRIOR[@]}"; do
gh pr close "$N" --repo "${{ github.repository }}" --delete-branch \
--comment "Superseded by newer Speakeasy SDK generation PR #${CURRENT_PR}" \
|| echo "::warning::Failed to close PR #$N (continuing)"
sleep 1
done
- name: Auto-merge Speakeasy PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
PR_NUM="${{ github.event.pull_request.number }}"
REPO="${{ github.repository }}"
STATE=$(gh pr view "$PR_NUM" --repo "$REPO" --json state --jq .state)
if [ "$STATE" != "OPEN" ]; then
echo "PR #$PR_NUM is $STATE — skipping merge"
exit 0
fi
# Prefer GitHub auto-merge when required checks exist; otherwise
# squash-merge directly (same pattern as sdk-release-prs.yaml).
AUTO_MERGE_NOOP_PATTERN='is in clean status|protected branch rules|Branch does not have required protected branch rules'
if gh pr merge "$PR_NUM" --repo "$REPO" --squash --auto --delete-branch 2> /tmp/gh-merge.err; then
echo "Auto-merge enabled for Speakeasy PR #$PR_NUM"
elif grep -qiE "$AUTO_MERGE_NOOP_PATTERN" /tmp/gh-merge.err; then
echo "Auto-merge not applicable — merging PR #$PR_NUM directly"
cat /tmp/gh-merge.err >&2
gh pr merge "$PR_NUM" --repo "$REPO" --squash --delete-branch
else
echo "::error::Failed to enable auto-merge on Speakeasy PR #$PR_NUM"
cat /tmp/gh-merge.err >&2
exit 1
fi
@@ -0,0 +1,36 @@
name: Generate (spec change merged)
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
id-token: write
"on":
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
set_version:
description: optionally set a specific SDK version
type: string
pull_request:
types: [closed]
branches:
- main
paths:
- .speakeasy/in.openapi.yaml
jobs:
generate:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
force: ${{ github.event.inputs.force }}
mode: pr
set_version: ${{ github.event.inputs.set_version }}
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
+14 -2
View File
@@ -1,13 +1,25 @@
.venv/
venv/
src/*.egg-info/
**/__pycache__/
.pytest_cache/
.python-version
.DS_Store
pyrightconfig.json
**/.speakeasy/temp/
**/.speakeasy/logs/
.speakeasy/reports
# Build artifacts
/dist
__pycache__/
*.py[cod]
*.egg-info/
*.egg
# Speakeasy generation artifacts (generated in OSS repo, not here)
.speakeasy/*.lock
.speakeasy/*.openapi.yaml
/docs
# Environment
.env
.env.local
.env.*.local
.DS_Store
.venv/
+9617 -1018
View File
File diff suppressed because it is too large Load Diff
+5 -1
View File
@@ -25,13 +25,14 @@ generation:
schemas:
allOfMergeStrategy: shallowMerge
requestBodyFieldName: ""
persistentEdits: {}
tests:
generateTests: false
generateNewTests: true
skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true
python:
version: 0.6.0
version: 0.10.1
additionalDependencies:
dev: {}
main: {}
@@ -46,6 +47,7 @@ python:
- OpenRouter
baseErrorName: OpenRouterError
clientServerStatusCodesAsErrors: true
constFieldCasing: upper
defaultErrorName: OpenRouterDefaultError
description: Official Python Client SDK for OpenRouter.
enableCustomCodeRegions: false
@@ -57,6 +59,7 @@ python:
flattenGlobalSecurity: true
flattenRequests: true
flatteningOrder: parameters-first
forwardCompatibleUnionsByDefault: tagged-only
imports:
option: openapi
paths:
@@ -77,6 +80,7 @@ python:
outputModelSuffix: output
packageManager: uv
packageName: openrouter
preApplyUnionDiscriminators: false
pytestFilterWarnings: []
pytestTimeout: 0
responseFormat: flat
+31541 -12680
View File
File diff suppressed because it is too large Load Diff
+31469 -12727
View File
File diff suppressed because it is too large Load Diff
+12 -3
View File
@@ -1,17 +1,18 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Add HTTP-Referer and X-Title as global parameters
title: Add HTTP-Referer and X-OpenRouter-Title as global parameters
version: 0.0.0
actions:
# Add global parameters for app identification
- target: $
description: Add x-speakeasy-globals for HTTP-Referer and X-Title headers
description: Add x-speakeasy-globals for HTTP-Referer, X-OpenRouter-Title, and X-OpenRouter-Categories headers
update:
x-speakeasy-globals:
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
# Add component parameters
- target: $.components
@@ -27,12 +28,19 @@ actions:
The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
AppDisplayName:
name: X-Title
name: X-OpenRouter-Title
in: header
schema:
type: string
description: |
The app display name allows you to customize how your app appears in OpenRouter's dashboard.
AppCategories:
name: X-OpenRouter-Categories
in: header
schema:
type: string
description: |
Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
# Add header parameters to all paths so Speakeasy matches them with globals
- target: $.paths[*]
@@ -41,3 +49,4 @@ actions:
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
@@ -0,0 +1,11 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Simplify redundant allOf inline schemas
version: 0.0.0
actions:
- target: "$..allOf[?@.enum && !@['$ref']]"
description: >
Remove inline enum definitions that duplicate a $ref enum in the same
allOf. These are artifacts from zod-openapi .extend() serialization.
remove: true
@@ -0,0 +1,10 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Convert boolean query params from string to boolean
version: 0.0.0
actions:
- target: $..parameters[?@.schema["x-openrouter-type"] == "boolean"].schema
description: Convert x-openrouter-type boolean params from string to boolean
update:
type: boolean
@@ -0,0 +1,10 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Fix nullable pagination params
version: 0.0.0
actions:
- target: $..parameters[?@.name == "offset" && @.in == "query"].schema
description: Remove nullable from offset query params to fix mypy errors in pagination helpers
update:
nullable: false
+11 -14
View File
@@ -1,30 +1,24 @@
speakeasyVersion: 1.666.0
speakeasyVersion: 1.680.0
sources:
-OAS:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:01256c8494de6bfc13c36d82ae316a6a13d402194f844618bcd4d59e34f325f3
sourceBlobDigest: sha256:4c80e48fd5e1cd030e68d664eb93984b4d5946867252ff1755a2bd2a05eccd4e
tags:
- latest
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:2dbe784978f60cb53a0d081e1b5f4cbb42ca86b1ff8f4361869fa78c42e042ee
sourceBlobDigest: sha256:851aadf3180735f9dbfdb2904011de231d3805d187499c24a450a224cacf1ed2
sourceRevisionDigest: sha256:1e8bbe0cea645a95cb24c3e0061459d903aca98286d2c74de7cb8359b8c3c29d
sourceBlobDigest: sha256:42b4b8df42026cfc885ee4b34e7a30aaa906f40dc6ad99ea9e6c65e4bad495de
tags:
- latest
- main
- speakeasy-sdk-regen-1781885111
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:2dbe784978f60cb53a0d081e1b5f4cbb42ca86b1ff8f4361869fa78c42e042ee
sourceBlobDigest: sha256:851aadf3180735f9dbfdb2904011de231d3805d187499c24a450a224cacf1ed2
sourceRevisionDigest: sha256:1e8bbe0cea645a95cb24c3e0061459d903aca98286d2c74de7cb8359b8c3c29d
sourceBlobDigest: sha256:42b4b8df42026cfc885ee4b34e7a30aaa906f40dc6ad99ea9e6c65e4bad495de
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:cf9f3fd9983864e3c5dd5bc3fa9198efc9493f4fbc671130e8f07e87722c43dd
codeSamplesRevisionDigest: sha256:a16acd4648a2b2c90df0256551f25bb6515c70ea239dba657f07fce770e459d5
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.666.0
speakeasyVersion: 1.680.0
sources:
OpenRouter API:
inputs:
@@ -33,6 +27,9 @@ workflow:
- location: .speakeasy/overlays/open-enums.overlay.yaml
- location: .speakeasy/overlays/remove-rss-responses.overlay.yaml
- location: .speakeasy/overlays/add-headers.overlay.yaml
- location: .speakeasy/overlays/allof-simplify.overlay.yaml
- location: .speakeasy/overlays/boolean-query-params.overlay.yaml
- location: .speakeasy/overlays/fix-nullable-pagination.overlay.yaml
output: .speakeasy/out.openapi.yaml
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
+4 -1
View File
@@ -1,5 +1,5 @@
workflowVersion: 1.0.0
speakeasyVersion: 1.666.0
speakeasyVersion: 1.680.0
sources:
OpenRouter API:
inputs:
@@ -8,6 +8,9 @@ sources:
- location: .speakeasy/overlays/open-enums.overlay.yaml
- location: .speakeasy/overlays/remove-rss-responses.overlay.yaml
- location: .speakeasy/overlays/add-headers.overlay.yaml
- location: .speakeasy/overlays/allof-simplify.overlay.yaml
- location: .speakeasy/overlays/boolean-query-params.overlay.yaml
- location: .speakeasy/overlays/fix-nullable-pagination.overlay.yaml
output: .speakeasy/out.openapi.yaml
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
+1 -1
View File
@@ -1,6 +1,6 @@
# OpenRouter Python SDK
The OpenRouter Python SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.
The OpenRouter Python SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.
## Why use the OpenRouter SDK?
+72 -9
View File
@@ -1,6 +1,6 @@
# OpenRouter SDK (Beta)
# OpenRouter SDK
The [OpenRouter SDK](https://openrouter.ai/docs/sdks/python) is a Python toolkit designed to help you build AI-powered features and solutions. Giving you easy access to over 300 models across providers in an easy and type-safe way.
The [OpenRouter SDK](https://openrouter.ai/docs/sdks/python) is a Python toolkit designed to help you build AI-powered features and solutions. Giving you easy access to 400+ models across providers in an easy and type-safe way.
To learn more about how to use the OpenRouter SDK, check out our [API Reference](https://openrouter.ai/docs/sdks/python/reference) and [Documentation](https://openrouter.ai/docs/sdks/python).
@@ -169,6 +169,69 @@ asyncio.run(main())
<!-- No Custom HTTP Client [http-client] -->
<!-- Start Pagination [pagination] -->
## Pagination
Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
returned response object will have a `Next` method that can be called to pull down the next group of results. If the
return value of `Next` is `None`, then there are no more pages to be fetched.
Here's an example of one such pagination call:
```python
from openrouter import OpenRouter
import os
with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.byok.list()
while res is not None:
# Handle items
res = res.next()
```
<!-- End Pagination [pagination] -->
<!-- Start File uploads [file-upload] -->
## File uploads
Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
> [!TIP]
>
> For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files.
>
```python
from openrouter import OpenRouter
import os
with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.files.upload(file={
"file_name": "example.file",
"content": open("example.file", "rb"),
})
# Handle response
print(res)
```
<!-- End File uploads [file-upload] -->
<!-- Start Resource Management [resource-management] -->
## Resource Management
@@ -182,6 +245,9 @@ import os
def main():
with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
# Rest of application here...
@@ -191,6 +257,9 @@ def main():
async def amain():
async with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
# Rest of application here...
@@ -240,10 +309,4 @@ To run the test suite, you'll need to set up your environment with an OpenRouter
```bash
pytest
```
## Maturity
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
looking for the latest version.
```
+70 -11
View File
@@ -1,6 +1,6 @@
# OpenRouter SDK (Beta)
# OpenRouter SDK
The [OpenRouter SDK](https://openrouter.ai/docs/sdks/python) is a Python toolkit designed to help you build AI-powered features and solutions. Giving you easy access to over 300 models across providers in an easy and type-safe way.
The [OpenRouter SDK](https://openrouter.ai/docs/sdks/python) is a Python toolkit designed to help you build AI-powered features and solutions. Giving you easy access to 400+ models across providers in an easy and type-safe way.
To learn more about how to use the OpenRouter SDK, check out our [API Reference](https://openrouter.ai/docs/sdks/python/reference) and [Documentation](https://openrouter.ai/docs/sdks/python).
@@ -169,6 +169,69 @@ asyncio.run(main())
<!-- No Custom HTTP Client [http-client] -->
<!-- Start Pagination [pagination] -->
## Pagination
Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
returned response object will have a `Next` method that can be called to pull down the next group of results. If the
return value of `Next` is `None`, then there are no more pages to be fetched.
Here's an example of one such pagination call:
```python
from openrouter import OpenRouter
import os
with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.byok.list()
while res is not None:
# Handle items
res = res.next()
```
<!-- End Pagination [pagination] -->
<!-- Start File uploads [file-upload] -->
## File uploads
Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
> [!TIP]
>
> For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files.
>
```python
from openrouter import OpenRouter
import os
with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.files.upload(file={
"file_name": "example.file",
"content": open("example.file", "rb"),
})
# Handle response
print(res)
```
<!-- End File uploads [file-upload] -->
<!-- Start Resource Management [resource-management] -->
## Resource Management
@@ -183,7 +246,8 @@ def main():
with OpenRouter(
http_referer="<value>",
x_title="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
# Rest of application here...
@@ -194,7 +258,8 @@ async def amain():
async with OpenRouter(
http_referer="<value>",
x_title="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
# Rest of application here...
@@ -244,10 +309,4 @@ To run the test suite, you'll need to set up your environment with an OpenRouter
```bash
pytest
```
## Maturity
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
looking for the latest version.
```
+31 -1
View File
@@ -8,4 +8,34 @@ Based on:
### Generated
- [python v0.0.16] .
### Releases
- [PyPI v0.0.16] https://pypi.org/project/openrouter/0.0.16 - .
- [PyPI v0.0.16] https://pypi.org/project/openrouter/0.0.16 - .
## 2026-06-11 00:55:55
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.9.2] .
### Releases
- [PyPI v0.9.2] https://pypi.org/project/openrouter/0.9.2 - .
## 2026-06-17 00:59:07
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.0] .
### Releases
- [PyPI v0.10.0] https://pypi.org/project/openrouter/0.10.0 - .
## 2026-06-22 00:59:00
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.1] .
### Releases
- [PyPI v0.10.1] https://pypi.org/project/openrouter/0.10.1 - .
+10 -12
View File
@@ -7,16 +7,15 @@ import os
with OpenRouter(
http_referer="<value>",
x_title="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.beta.responses.send(service_tier="auto", stream=False)
res = open_router.analytics.get_user_activity()
with res as event_stream:
for event in event_stream:
# handle event
print(event, flush=True)
# Handle response
print(res)
```
</br>
@@ -33,16 +32,15 @@ async def main():
async with OpenRouter(
http_referer="<value>",
x_title="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = await open_router.beta.responses.send_async(service_tier="auto", stream=False)
res = await open_router.analytics.get_user_activity_async()
async with res as event_stream:
async for event in event_stream:
# handle event
print(event, flush=True)
# Handle response
print(res)
asyncio.run(main())
```
+7 -7
View File
@@ -5,14 +5,14 @@
| Field | Type | Required | Description | Example |
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
| `byok_usage_inference` | *float* | :heavy_check_mark: | BYOK inference cost in USD (external credits spent) | 0.012 |
| `completion_tokens` | *int* | :heavy_check_mark: | Total completion tokens generated | 125 |
| `date_` | *str* | :heavy_check_mark: | Date of the activity (YYYY-MM-DD format) | 2025-08-24 |
| `endpoint_id` | *str* | :heavy_check_mark: | Unique identifier for the endpoint | 550e8400-e29b-41d4-a716-446655440000 |
| `model` | *str* | :heavy_check_mark: | Model slug (e.g., "openai/gpt-4.1") | openai/gpt-4.1 |
| `model_permaslug` | *str* | :heavy_check_mark: | Model permaslug (e.g., "openai/gpt-4.1-2025-04-14") | openai/gpt-4.1-2025-04-14 |
| `endpoint_id` | *str* | :heavy_check_mark: | Unique identifier for the endpoint | 550e8400-e29b-41d4-a716-446655440000 |
| `prompt_tokens` | *int* | :heavy_check_mark: | Total prompt tokens used | 50 |
| `provider_name` | *str* | :heavy_check_mark: | Name of the provider serving this endpoint | OpenAI |
| `usage` | *float* | :heavy_check_mark: | Total cost in USD (OpenRouter credits spent) | 0.015 |
| `byok_usage_inference` | *float* | :heavy_check_mark: | BYOK inference cost in USD (external credits spent) | 0.012 |
| `requests` | *float* | :heavy_check_mark: | Number of requests made | 5 |
| `prompt_tokens` | *float* | :heavy_check_mark: | Total prompt tokens used | 50 |
| `completion_tokens` | *float* | :heavy_check_mark: | Total completion tokens generated | 125 |
| `reasoning_tokens` | *float* | :heavy_check_mark: | Total reasoning tokens used | 25 |
| `reasoning_tokens` | *int* | :heavy_check_mark: | Total reasoning tokens used | 25 |
| `requests` | *int* | :heavy_check_mark: | Number of requests made | 5 |
| `usage` | *float* | :heavy_check_mark: | Total cost in USD (OpenRouter credits spent) | 0.015 |
+4 -4
View File
@@ -7,8 +7,8 @@ Model architecture information
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `tokenizer` | [Nullable[components.Tokenizer]](../components/tokenizer.md) | :heavy_check_mark: | N/A | GPT |
| `instruct_type` | [Nullable[components.InstructType]](../components/instructtype.md) | :heavy_check_mark: | Instruction format type | |
| `modality` | *Nullable[str]* | :heavy_check_mark: | Primary modality of the model | text |
| `input_modalities` | List[[components.InputModality](../components/inputmodality.md)] | :heavy_check_mark: | Supported input modalities | |
| `output_modalities` | List[[components.OutputModality](../components/outputmodality.md)] | :heavy_check_mark: | Supported output modalities | |
| `instruct_type` | [Nullable[components.InstructType]](../components/instructtype.md) | :heavy_check_mark: | Instruction format type | chatml |
| `modality` | *Nullable[str]* | :heavy_check_mark: | Primary modality of the model | text |
| `output_modalities` | List[[components.OutputModality](../components/outputmodality.md)] | :heavy_check_mark: | Supported output modalities | |
| `tokenizer` | [Nullable[components.Tokenizer]](../components/tokenizer.md) | :heavy_check_mark: | N/A | GPT |
-15
View File
@@ -1,15 +0,0 @@
# AssistantMessage
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `role` | *Literal["assistant"]* | :heavy_check_mark: | N/A |
| `content` | [OptionalNullable[components.AssistantMessageContent]](../components/assistantmessagecontent.md) | :heavy_minus_sign: | N/A |
| `name` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `tool_calls` | List[[components.ChatMessageToolCall](../components/chatmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `reasoning_details` | List[[components.Schema19](../components/schema19.md)] | :heavy_minus_sign: | N/A |
| `images` | List[[components.Image](../components/image.md)] | :heavy_minus_sign: | N/A |
@@ -1,17 +0,0 @@
# AssistantMessageContent
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `List[components.ChatMessageContentItem]`
```python
value: List[components.ChatMessageContentItem] = /* values here */
```
@@ -1,8 +0,0 @@
# AssistantMessageImageURL
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `url` | *str* | :heavy_check_mark: | N/A |
@@ -1,4 +1,6 @@
# Sort
# By
The provider sorting strategy (price, throughput, latency)
## Values
@@ -7,4 +9,5 @@
| ------------ | ------------ |
| `PRICE` | price |
| `THROUGHPUT` | throughput |
| `LATENCY` | latency |
| `LATENCY` | latency |
| `EXACTO` | exacto |
-10
View File
@@ -1,10 +0,0 @@
# ChainID
## Values
| Name | Value |
| --------------------------------------------- | --------------------------------------------- |
| `ONE` | 1 |
| `ONE_HUNDRED_AND_THIRTY_SEVEN` | 137 |
| `EIGHT_THOUSAND_FOUR_HUNDRED_AND_FIFTY_THREE` | 8453 |
@@ -1,12 +0,0 @@
# ChatCompletionFinishReason
## Values
| Name | Value |
| ---------------- | ---------------- |
| `TOOL_CALLS` | tool_calls |
| `STOP` | stop |
| `LENGTH` | length |
| `CONTENT_FILTER` | content_filter |
| `ERROR` | error |
-11
View File
@@ -1,11 +0,0 @@
# ChatErrorError
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `code` | [Nullable[components.Code]](../components/code.md) | :heavy_check_mark: | N/A |
| `message` | *str* | :heavy_check_mark: | N/A |
| `param` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `type` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
-36
View File
@@ -1,36 +0,0 @@
# ChatGenerationParams
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `provider` | [OptionalNullable[components.Schema0]](../components/schema0.md) | :heavy_minus_sign: | N/A |
| `plugins` | List[[components.Schema17](../components/schema17.md)] | :heavy_minus_sign: | N/A |
| `route` | [OptionalNullable[components.Route]](../components/route.md) | :heavy_minus_sign: | N/A |
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `session_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `messages` | List[[components.Message](../components/message.md)] | :heavy_check_mark: | N/A |
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | N/A |
| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | N/A |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `reasoning` | [Optional[components.Reasoning]](../components/reasoning.md) | :heavy_minus_sign: | N/A |
| `response_format` | [Optional[components.ResponseFormat]](../components/responseformat.md) | :heavy_minus_sign: | N/A |
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `stop` | [OptionalNullable[components.Stop]](../components/stop.md) | :heavy_minus_sign: | N/A |
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../components/chatstreamoptions.md) | :heavy_minus_sign: | N/A |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `tools` | List[[components.ToolDefinitionJSON](../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `debug` | [Optional[components.Debug]](../components/debug.md) | :heavy_minus_sign: | N/A |
| `image_config` | Dict[str, [components.ChatGenerationParamsImageConfig](../components/chatgenerationparamsimageconfig.md)] | :heavy_minus_sign: | N/A |
| `modalities` | List[[components.Modality](../components/modality.md)] | :heavy_minus_sign: | N/A |
@@ -1,9 +0,0 @@
# ChatGenerationParamsEngine
## Values
| Name | Value |
| -------- | -------- |
| `NATIVE` | native |
| `EXA` | exa |
@@ -1,23 +0,0 @@
# ChatGenerationParamsImageConfig
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `float`
```python
value: float = /* values here */
```
### `List[Any]`
```python
value: List[Any] = /* values here */
```
@@ -1,8 +0,0 @@
# ChatGenerationParamsPdf
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `engine` | [Optional[components.ChatGenerationParamsPdfEngine]](../components/chatgenerationparamspdfengine.md) | :heavy_minus_sign: | N/A |
@@ -1,10 +0,0 @@
# ChatGenerationParamsPdfEngine
## Values
| Name | Value |
| ------------- | ------------- |
| `MISTRAL_OCR` | mistral-ocr |
| `PDF_TEXT` | pdf-text |
| `NATIVE` | native |
@@ -1,9 +0,0 @@
# ChatGenerationParamsRoute
## Values
| Name | Value |
| ---------- | ---------- |
| `FALLBACK` | fallback |
| `SORT` | sort |
@@ -1,12 +0,0 @@
# ChatGenerationTokenUsage
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `completion_tokens` | *float* | :heavy_check_mark: | N/A |
| `prompt_tokens` | *float* | :heavy_check_mark: | N/A |
| `total_tokens` | *float* | :heavy_check_mark: | N/A |
| `completion_tokens_details` | [OptionalNullable[components.CompletionTokensDetails]](../components/completiontokensdetails.md) | :heavy_minus_sign: | N/A |
| `prompt_tokens_details` | [OptionalNullable[components.PromptTokensDetails]](../components/prompttokensdetails.md) | :heavy_minus_sign: | N/A |
-35
View File
@@ -1,35 +0,0 @@
# ChatMessageContentItem
## Supported Types
### `components.ChatMessageContentItemText`
```python
value: components.ChatMessageContentItemText = /* values here */
```
### `components.ChatMessageContentItemImage`
```python
value: components.ChatMessageContentItemImage = /* values here */
```
### `components.ChatMessageContentItemAudio`
```python
value: components.ChatMessageContentItemAudio = /* values here */
```
### `components.ChatMessageContentItemVideo`
```python
value: components.ChatMessageContentItemVideo = /* values here */
```
### `components.ChatMessageContentItemVideo`
```python
value: components.ChatMessageContentItemVideo = /* values here */
```
@@ -1,9 +0,0 @@
# ChatMessageContentItemAudio
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `type` | *Literal["input_audio"]* | :heavy_check_mark: | N/A |
| `input_audio` | [components.ChatMessageContentItemAudioInputAudio](../components/chatmessagecontentitemaudioinputaudio.md) | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageContentItemAudioInputAudio
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `data` | *str* | :heavy_check_mark: | N/A |
| `format_` | *str* | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageContentItemCacheControl
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `type` | *Literal["ephemeral"]* | :heavy_check_mark: | N/A |
| `ttl` | [Optional[components.TTL]](../components/ttl.md) | :heavy_minus_sign: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageContentItemImage
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `type` | *Literal["image_url"]* | :heavy_check_mark: | N/A |
| `image_url` | [components.ChatMessageContentItemImageImageURL](../components/chatmessagecontentitemimageimageurl.md) | :heavy_check_mark: | N/A |
@@ -1,10 +0,0 @@
# ChatMessageContentItemImageDetail
## Values
| Name | Value |
| ------ | ------ |
| `AUTO` | auto |
| `LOW` | low |
| `HIGH` | high |
@@ -1,9 +0,0 @@
# ChatMessageContentItemImageImageURL
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `url` | *str* | :heavy_check_mark: | N/A |
| `detail` | [Optional[components.ChatMessageContentItemImageDetail]](../components/chatmessagecontentitemimagedetail.md) | :heavy_minus_sign: | N/A |
@@ -1,10 +0,0 @@
# ChatMessageContentItemText
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
| `text` | *str* | :heavy_check_mark: | N/A |
| `cache_control` | [Optional[components.ChatMessageContentItemCacheControl]](../components/chatmessagecontentitemcachecontrol.md) | :heavy_minus_sign: | N/A |
@@ -1,17 +0,0 @@
# ChatMessageContentItemVideo
## Supported Types
### `components.ChatMessageContentItemVideoInputVideo`
```python
value: components.ChatMessageContentItemVideoInputVideo = /* values here */
```
### `components.ChatMessageContentItemVideoVideoURL`
```python
value: components.ChatMessageContentItemVideoVideoURL = /* values here */
```
@@ -1,9 +0,0 @@
# ChatMessageContentItemVideoInputVideo
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `type` | *Literal["input_video"]* | :heavy_check_mark: | N/A |
| `video_url` | [components.VideoURL1](../components/videourl1.md) | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageContentItemVideoVideoURL
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `type` | *Literal["video_url"]* | :heavy_check_mark: | N/A |
| `video_url` | [components.VideoURL2](../components/videourl2.md) | :heavy_check_mark: | N/A |
@@ -1,11 +0,0 @@
# ChatMessageTokenLogprob
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `token` | *str* | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
| `top_logprobs` | List[[components.ChatMessageTokenLogprobTopLogprob](../components/chatmessagetokenlogprobtoplogprob.md)] | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageTokenLogprobs
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `content` | List[[components.ChatMessageTokenLogprob](../components/chatmessagetokenlogprob.md)] | :heavy_check_mark: | N/A |
| `refusal` | List[[components.ChatMessageTokenLogprob](../components/chatmessagetokenlogprob.md)] | :heavy_check_mark: | N/A |
@@ -1,10 +0,0 @@
# ChatMessageTokenLogprobTopLogprob
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `token` | *str* | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
-10
View File
@@ -1,10 +0,0 @@
# ChatMessageToolCall
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | N/A |
| `type` | *Literal["function"]* | :heavy_check_mark: | N/A |
| `function` | [components.ChatMessageToolCallFunction](../components/chatmessagetoolcallfunction.md) | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageToolCallFunction
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `name` | *str* | :heavy_check_mark: | N/A |
| `arguments` | *str* | :heavy_check_mark: | N/A |
-14
View File
@@ -1,14 +0,0 @@
# ChatResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `id` | *str* | :heavy_check_mark: | N/A |
| `choices` | List[[components.ChatResponseChoice](../components/chatresponsechoice.md)] | :heavy_check_mark: | N/A |
| `created` | *float* | :heavy_check_mark: | N/A |
| `model` | *str* | :heavy_check_mark: | N/A |
| `object` | *Literal["chat.completion"]* | :heavy_check_mark: | N/A |
| `system_fingerprint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `usage` | [Optional[components.ChatGenerationTokenUsage]](../components/chatgenerationtokenusage.md) | :heavy_minus_sign: | N/A |
-11
View File
@@ -1,11 +0,0 @@
# ChatResponseChoice
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `finish_reason` | [Nullable[components.ChatCompletionFinishReason]](../components/chatcompletionfinishreason.md) | :heavy_check_mark: | N/A |
| `index` | *float* | :heavy_check_mark: | N/A |
| `message` | [components.AssistantMessage](../components/assistantmessage.md) | :heavy_check_mark: | N/A |
| `logprobs` | [OptionalNullable[components.ChatMessageTokenLogprobs]](../components/chatmessagetokenlogprobs.md) | :heavy_minus_sign: | N/A |
-11
View File
@@ -1,11 +0,0 @@
# ChatStreamingChoice
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `delta` | [components.ChatStreamingMessageChunk](../components/chatstreamingmessagechunk.md) | :heavy_check_mark: | N/A |
| `finish_reason` | [Nullable[components.ChatCompletionFinishReason]](../components/chatcompletionfinishreason.md) | :heavy_check_mark: | N/A |
| `index` | *float* | :heavy_check_mark: | N/A |
| `logprobs` | [OptionalNullable[components.ChatMessageTokenLogprobs]](../components/chatmessagetokenlogprobs.md) | :heavy_minus_sign: | N/A |
@@ -1,13 +0,0 @@
# ChatStreamingMessageChunk
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `role` | [Optional[components.ChatStreamingMessageChunkRole]](../components/chatstreamingmessagechunkrole.md) | :heavy_minus_sign: | N/A |
| `content` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `tool_calls` | List[[components.ChatStreamingMessageToolCall](../components/chatstreamingmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
| `reasoning_details` | List[[components.Schema19](../components/schema19.md)] | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# ChatStreamingMessageChunkRole
## Values
| Name | Value |
| ----------- | ----------- |
| `ASSISTANT` | assistant |
@@ -1,11 +0,0 @@
# ChatStreamingMessageToolCall
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `index` | *float* | :heavy_check_mark: | N/A |
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `type` | *Optional[Literal["function"]]* | :heavy_minus_sign: | N/A |
| `function` | [Optional[components.ChatStreamingMessageToolCallFunction]](../components/chatstreamingmessagetoolcallfunction.md) | :heavy_minus_sign: | N/A |
@@ -1,9 +0,0 @@
# ChatStreamingMessageToolCallFunction
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `name` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `arguments` | *Optional[str]* | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# ChatStreamingResponseChunk
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `data` | [components.ChatStreamingResponseChunkData](../components/chatstreamingresponsechunkdata.md) | :heavy_check_mark: | N/A |
@@ -1,15 +0,0 @@
# ChatStreamingResponseChunkData
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | N/A |
| `choices` | List[[components.ChatStreamingChoice](../components/chatstreamingchoice.md)] | :heavy_check_mark: | N/A |
| `created` | *float* | :heavy_check_mark: | N/A |
| `model` | *str* | :heavy_check_mark: | N/A |
| `object` | *Literal["chat.completion.chunk"]* | :heavy_check_mark: | N/A |
| `system_fingerprint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `error` | [Optional[components.ChatStreamingResponseChunkError]](../components/chatstreamingresponsechunkerror.md) | :heavy_minus_sign: | N/A |
| `usage` | [Optional[components.ChatGenerationTokenUsage]](../components/chatgenerationtokenusage.md) | :heavy_minus_sign: | N/A |
@@ -1,9 +0,0 @@
# ChatStreamingResponseChunkError
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `message` | *str* | :heavy_check_mark: | N/A |
| `code` | *float* | :heavy_check_mark: | N/A |
+5 -3
View File
@@ -1,8 +1,10 @@
# ChatStreamOptions
Streaming configuration options
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `include_usage` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ~~`include_usage`~~ | *Optional[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>Deprecated: This field has no effect. Full usage details are always included. | true |
+21 -13
View File
@@ -1,17 +1,25 @@
# Code
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `float`
```python
value: float = /* values here */
```
## Values
| Name | Value |
| -------------------------------- | -------------------------------- |
| `SERVER_ERROR` | server_error |
| `RATE_LIMIT_EXCEEDED` | rate_limit_exceeded |
| `INVALID_PROMPT` | invalid_prompt |
| `VECTOR_STORE_TIMEOUT` | vector_store_timeout |
| `INVALID_IMAGE` | invalid_image |
| `INVALID_IMAGE_FORMAT` | invalid_image_format |
| `INVALID_BASE64_IMAGE` | invalid_base64_image |
| `INVALID_IMAGE_URL` | invalid_image_url |
| `IMAGE_TOO_LARGE` | image_too_large |
| `IMAGE_TOO_SMALL` | image_too_small |
| `IMAGE_PARSE_ERROR` | image_parse_error |
| `IMAGE_CONTENT_POLICY_VIOLATION` | image_content_policy_violation |
| `INVALID_IMAGE_MODE` | invalid_image_mode |
| `IMAGE_FILE_TOO_LARGE` | image_file_too_large |
| `UNSUPPORTED_IMAGE_MEDIA_TYPE` | unsupported_image_media_type |
| `EMPTY_IMAGE_FILE` | empty_image_file |
| `FAILED_TO_DOWNLOAD_IMAGE` | failed_to_download_image |
| `IMAGE_FILE_NOT_FOUND` | image_file_not_found |
-25
View File
@@ -1,25 +0,0 @@
# CodeEnum
## Values
| Name | Value |
| -------------------------------- | -------------------------------- |
| `SERVER_ERROR` | server_error |
| `RATE_LIMIT_EXCEEDED` | rate_limit_exceeded |
| `INVALID_PROMPT` | invalid_prompt |
| `VECTOR_STORE_TIMEOUT` | vector_store_timeout |
| `INVALID_IMAGE` | invalid_image |
| `INVALID_IMAGE_FORMAT` | invalid_image_format |
| `INVALID_BASE64_IMAGE` | invalid_base64_image |
| `INVALID_IMAGE_URL` | invalid_image_url |
| `IMAGE_TOO_LARGE` | image_too_large |
| `IMAGE_TOO_SMALL` | image_too_small |
| `IMAGE_PARSE_ERROR` | image_parse_error |
| `IMAGE_CONTENT_POLICY_VIOLATION` | image_content_policy_violation |
| `INVALID_IMAGE_MODE` | invalid_image_mode |
| `IMAGE_FILE_TOO_LARGE` | image_file_too_large |
| `UNSUPPORTED_IMAGE_MEDIA_TYPE` | unsupported_image_media_type |
| `EMPTY_IMAGE_FILE` | empty_image_file |
| `FAILED_TO_DOWNLOAD_IMAGE` | failed_to_download_image |
| `IMAGE_FILE_NOT_FOUND` | image_file_not_found |
-23
View File
@@ -1,23 +0,0 @@
# Completion
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `str`
```python
value: str = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
+6 -4
View File
@@ -1,11 +1,13 @@
# CompletionTokensDetails
Detailed completion token usage
## Fields
| Field | Type | Required | Description |
| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- |
| `reasoning_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `audio_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `accepted_prediction_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `rejected_prediction_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `accepted_prediction_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Accepted prediction tokens |
| `audio_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Tokens used for audio output |
| `reasoning_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Tokens used for reasoning |
| `rejected_prediction_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Rejected prediction tokens |
+7 -5
View File
@@ -1,10 +1,12 @@
# CostDetails
Breakdown of upstream inference costs
## Fields
| Field | Type | Required | Description |
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
| `upstream_inference_cost` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `upstream_inference_input_cost` | *float* | :heavy_check_mark: | N/A |
| `upstream_inference_output_cost` | *float* | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |
| `upstream_inference_completions_cost` | *float* | :heavy_check_mark: | N/A |
| `upstream_inference_cost` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `upstream_inference_prompt_cost` | *float* | :heavy_check_mark: | N/A |
-12
View File
@@ -1,12 +0,0 @@
# CreateChargeRequest
Create a Coinbase charge for crypto payment
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
| `amount` | *float* | :heavy_check_mark: | N/A |
| `sender` | *str* | :heavy_check_mark: | N/A |
| `chain_id` | [components.ChainID](../components/chainid.md) | :heavy_check_mark: | N/A |
-8
View File
@@ -1,8 +0,0 @@
# Debug
## Fields
| Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- |
| `echo_upstream_body` | *Optional[bool]* | :heavy_minus_sign: | N/A |
+5 -2
View File
@@ -7,6 +7,9 @@ Default parameters for this model
| Field | Type | Required | Description |
| ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
-10
View File
@@ -1,10 +0,0 @@
# DeveloperMessage
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `role` | *Literal["developer"]* | :heavy_check_mark: | N/A |
| `content` | [components.DeveloperMessageContent](../components/developermessagecontent.md) | :heavy_check_mark: | N/A |
| `name` | *Optional[str]* | :heavy_minus_sign: | N/A |
@@ -1,17 +0,0 @@
# DeveloperMessageContent
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `List[components.ChatMessageContentItemText]`
```python
value: List[components.ChatMessageContentItemText] = /* values here */
```
-13
View File
@@ -1,13 +0,0 @@
# Effort
## Values
| Name | Value |
| --------- | --------- |
| `XHIGH` | xhigh |
| `HIGH` | high |
| `MEDIUM` | medium |
| `LOW` | low |
| `MINIMAL` | minimal |
| `NONE` | none |
-9
View File
@@ -1,9 +0,0 @@
# Engine
## Values
| Name | Value |
| -------- | -------- |
| `NATIVE` | native |
| `EXA` | exa |
+11
View File
@@ -0,0 +1,11 @@
# Error
Error information
## Fields
| Field | Type | Required | Description | Example |
| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- |
| `code` | *int* | :heavy_check_mark: | Error code | 429 |
| `message` | *str* | :heavy_check_mark: | Error message | Rate limit exceeded |
+2 -2
View File
@@ -5,7 +5,7 @@
| Field | Type | Required | Description |
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
| `type` | [components.FileCitationType](../components/filecitationtype.md) | :heavy_check_mark: | N/A |
| `file_id` | *str* | :heavy_check_mark: | N/A |
| `filename` | *str* | :heavy_check_mark: | N/A |
| `index` | *float* | :heavy_check_mark: | N/A |
| `index` | *int* | :heavy_check_mark: | N/A |
| `type` | [components.FileCitationType](../components/filecitationtype.md) | :heavy_check_mark: | N/A |
+2 -2
View File
@@ -5,6 +5,6 @@
| Field | Type | Required | Description |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
| `type` | [components.FilePathType](../components/filepathtype.md) | :heavy_check_mark: | N/A |
| `file_id` | *str* | :heavy_check_mark: | N/A |
| `index` | *float* | :heavy_check_mark: | N/A |
| `index` | *int* | :heavy_check_mark: | N/A |
| `type` | [components.FilePathType](../components/filepathtype.md) | :heavy_check_mark: | N/A |
-8
View File
@@ -1,8 +0,0 @@
# IDAutoRouter
## Values
| Name | Value |
| ------------- | ------------- |
| `AUTO_ROUTER` | auto-router |
-8
View File
@@ -1,8 +0,0 @@
# IDFileParser
## Values
| Name | Value |
| ------------- | ------------- |
| `FILE_PARSER` | file-parser |
-8
View File
@@ -1,8 +0,0 @@
# IDModeration
## Values
| Name | Value |
| ------------ | ------------ |
| `MODERATION` | moderation |
-8
View File
@@ -1,8 +0,0 @@
# IDResponseHealing
## Values
| Name | Value |
| ------------------ | ------------------ |
| `RESPONSE_HEALING` | response-healing |
-8
View File
@@ -1,8 +0,0 @@
# IDWeb
## Values
| Name | Value |
| ----- | ----- |
| `WEB` | web |
-17
View File
@@ -1,17 +0,0 @@
# Ignore
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
-8
View File
@@ -1,8 +0,0 @@
# Image
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `image_url` | [components.AssistantMessageImageURL](../components/assistantmessageimageurl.md) | :heavy_check_mark: | N/A |
+1 -1
View File
@@ -5,4 +5,4 @@
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `cached_tokens` | *float* | :heavy_check_mark: | N/A |
| `cached_tokens` | *int* | :heavy_check_mark: | N/A |
-11
View File
@@ -1,11 +0,0 @@
# JSONSchemaConfig
## Fields
| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `name` | *str* | :heavy_check_mark: | N/A |
| `description` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `schema_` | Dict[str, *Any*] | :heavy_minus_sign: | N/A |
| `strict` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
+5 -5
View File
@@ -7,9 +7,9 @@ List of available endpoints for a model
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | Unique identifier for the model | openai/gpt-4 |
| `name` | *str* | :heavy_check_mark: | Display name of the model | GPT-4 |
| `created` | *float* | :heavy_check_mark: | Unix timestamp of when the model was created | 1692901234 |
| `architecture` | [components.Architecture](../components/architecture.md) | :heavy_check_mark: | N/A | {<br/>"input_modalities": [<br/>"text"<br/>],<br/>"instruct_type": "chatml",<br/>"modality": "text-\u003etext",<br/>"output_modalities": [<br/>"text"<br/>],<br/>"tokenizer": "GPT"<br/>} |
| `created` | *int* | :heavy_check_mark: | Unix timestamp of when the model was created | 1692901234 |
| `description` | *str* | :heavy_check_mark: | Description of the model | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. |
| `architecture` | [components.Architecture](../components/architecture.md) | :heavy_check_mark: | N/A | {<br/>"tokenizer": "GPT",<br/>"instruct_type": "chatml",<br/>"modality": "text-\u003etext",<br/>"input_modalities": [<br/>"text"<br/>],<br/>"output_modalities": [<br/>"text"<br/>]<br/>} |
| `endpoints` | List[[components.PublicEndpoint](../components/publicendpoint.md)] | :heavy_check_mark: | List of available endpoints for this model | |
| `endpoints` | List[[components.PublicEndpoint](../components/publicendpoint.md)] | :heavy_check_mark: | List of available endpoints for this model | |
| `id` | *str* | :heavy_check_mark: | Unique identifier for the model | openai/gpt-4 |
| `name` | *str* | :heavy_check_mark: | Display name of the model | GPT-4 |
-11
View File
@@ -1,11 +0,0 @@
# Logprob
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `token` | *str* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `top_logprobs` | List[[components.ResponseOutputTextTopLogprob](../components/responseoutputtexttoplogprob.md)] | :heavy_check_mark: | N/A |
-35
View File
@@ -1,35 +0,0 @@
# Message
## Supported Types
### `components.SystemMessage`
```python
value: components.SystemMessage = /* values here */
```
### `components.UserMessage`
```python
value: components.UserMessage = /* values here */
```
### `components.DeveloperMessage`
```python
value: components.DeveloperMessage = /* values here */
```
### `components.AssistantMessage`
```python
value: components.AssistantMessage = /* values here */
```
### `components.ToolResponseMessage`
```python
value: components.ToolResponseMessage = /* values here */
```
+2 -1
View File
@@ -6,4 +6,5 @@
| Name | Value |
| ------- | ------- |
| `TEXT` | text |
| `IMAGE` | image |
| `IMAGE` | image |
| `AUDIO` | audio |
+21 -16
View File
@@ -5,19 +5,24 @@ Information about an AI model available on OpenRouter
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | Unique identifier for the model | openai/gpt-4 |
| `canonical_slug` | *str* | :heavy_check_mark: | Canonical slug for the model | openai/gpt-4 |
| `hugging_face_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Hugging Face model identifier, if applicable | microsoft/DialoGPT-medium |
| `name` | *str* | :heavy_check_mark: | Display name of the model | GPT-4 |
| `created` | *float* | :heavy_check_mark: | Unix timestamp of when the model was created | 1692901234 |
| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the model | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. |
| `pricing` | [components.PublicPricing](../components/publicpricing.md) | :heavy_check_mark: | Pricing information for the model | {<br/>"prompt": "0.00003",<br/>"completion": "0.00006",<br/>"request": "0",<br/>"image": "0"<br/>} |
| `context_length` | *Nullable[float]* | :heavy_check_mark: | Maximum context length in tokens | 8192 |
| `architecture` | [components.ModelArchitecture](../components/modelarchitecture.md) | :heavy_check_mark: | Model architecture information | {<br/>"tokenizer": "GPT",<br/>"instruct_type": "chatml",<br/>"modality": "text-\u003etext",<br/>"input_modalities": [<br/>"text"<br/>],<br/>"output_modalities": [<br/>"text"<br/>]<br/>} |
| `top_provider` | [components.TopProviderInfo](../components/topproviderinfo.md) | :heavy_check_mark: | Information about the top provider for this model | {<br/>"context_length": 8192,<br/>"max_completion_tokens": 4096,<br/>"is_moderated": true<br/>} |
| `per_request_limits` | [Nullable[components.PerRequestLimits]](../components/perrequestlimits.md) | :heavy_check_mark: | Per-request token limits | {<br/>"prompt_tokens": 1000,<br/>"completion_tokens": 1000<br/>} |
| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | List of supported parameters for this model | |
| `default_parameters` | [Nullable[components.DefaultParameters]](../components/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {<br/>"temperature": 0.7,<br/>"top_p": 0.9,<br/>"frequency_penalty": 0<br/>} |
| `expiration_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 |
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `architecture` | [components.ModelArchitecture](../components/modelarchitecture.md) | :heavy_check_mark: | Model architecture information | {<br/>"input_modalities": [<br/>"text"<br/>],<br/>"instruct_type": "chatml",<br/>"modality": "text-\u003etext",<br/>"output_modalities": [<br/>"text"<br/>],<br/>"tokenizer": "GPT"<br/>} |
| `benchmarks` | [Optional[components.ModelBenchmarks]](../components/modelbenchmarks.md) | :heavy_minus_sign: | Third-party benchmark rankings for this model. Omitted when no benchmark data is available. | {<br/>"artificial_analysis": {<br/>"agentic_index": 55.8,<br/>"coding_index": 63.2,<br/>"intelligence_index": 71.4<br/>},<br/>"design_arena": [<br/>{<br/>"arena": "models",<br/>"category": "website",<br/>"elo": 1385.2,<br/>"rank": 5,<br/>"win_rate": 62.5<br/>}<br/>]<br/>} |
| `canonical_slug` | *str* | :heavy_check_mark: | Canonical slug for the model | openai/gpt-4 |
| `context_length` | *Nullable[int]* | :heavy_check_mark: | Maximum context length in tokens | 8192 |
| `created` | *int* | :heavy_check_mark: | Unix timestamp of when the model was created | 1692901234 |
| `default_parameters` | [Nullable[components.DefaultParameters]](../components/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {<br/>"frequency_penalty": 0,<br/>"presence_penalty": 0,<br/>"repetition_penalty": 1,<br/>"temperature": 0.7,<br/>"top_k": 0,<br/>"top_p": 0.9<br/>} |
| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the model | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. |
| `expiration_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 |
| `hugging_face_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Hugging Face model identifier, if applicable | microsoft/DialoGPT-medium |
| `id` | *str* | :heavy_check_mark: | Unique identifier for the model | openai/gpt-4 |
| `knowledge_cutoff` | *OptionalNullable[str]* | :heavy_minus_sign: | The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. | 2024-10-01 |
| `links` | [components.ModelLinks](../components/modellinks.md) | :heavy_check_mark: | Related API endpoints and resources for this model. | {<br/>"details": "/api/v1/models/openai/gpt-5.4/endpoints"<br/>} |
| `name` | *str* | :heavy_check_mark: | Display name of the model | GPT-4 |
| `per_request_limits` | [Nullable[components.PerRequestLimits]](../components/perrequestlimits.md) | :heavy_check_mark: | Per-request token limits | {<br/>"completion_tokens": 1000,<br/>"prompt_tokens": 1000<br/>} |
| `pricing` | [components.PublicPricing](../components/publicpricing.md) | :heavy_check_mark: | Pricing information for the model | {<br/>"completion": "0.00006",<br/>"image": "0",<br/>"prompt": "0.00003",<br/>"request": "0"<br/>} |
| `reasoning` | [Optional[components.ModelReasoning]](../components/modelreasoning.md) | :heavy_minus_sign: | Reasoning effort configuration. Omitted for non-reasoning models and dynamic router models. | {<br/>"default_effort": "medium",<br/>"default_enabled": true,<br/>"mandatory": false,<br/>"supported_efforts": [<br/>"high",<br/>"medium",<br/>"low",<br/>"minimal"<br/>]<br/>} |
| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | List of supported parameters for this model | |
| `supported_voices` | List[*str*] | :heavy_check_mark: | List of supported voice identifiers for TTS models. Null for non-TTS models. | <nil> |
| `top_provider` | [components.TopProviderInfo](../components/topproviderinfo.md) | :heavy_check_mark: | Information about the top provider for this model | {<br/>"context_length": 8192,<br/>"is_moderated": true,<br/>"max_completion_tokens": 4096<br/>} |
+3 -3
View File
@@ -7,8 +7,8 @@ Model architecture information
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `tokenizer` | [Optional[components.ModelGroup]](../components/modelgroup.md) | :heavy_minus_sign: | Tokenizer type used by the model | GPT |
| `input_modalities` | List[[components.InputModality](../components/inputmodality.md)] | :heavy_check_mark: | Supported input modalities | |
| `instruct_type` | [OptionalNullable[components.ModelArchitectureInstructType]](../components/modelarchitectureinstructtype.md) | :heavy_minus_sign: | Instruction format type | chatml |
| `modality` | *Nullable[str]* | :heavy_check_mark: | Primary modality of the model | text->text |
| `input_modalities` | List[[components.InputModality](../components/inputmodality.md)] | :heavy_check_mark: | Supported input modalities | |
| `output_modalities` | List[[components.OutputModality](../components/outputmodality.md)] | :heavy_check_mark: | Supported output modalities | |
| `output_modalities` | List[[components.OutputModality](../components/outputmodality.md)] | :heavy_check_mark: | Supported output modalities | |
| `tokenizer` | [Optional[components.ModelGroup]](../components/modelgroup.md) | :heavy_minus_sign: | Tokenizer type used by the model | GPT |
+1
View File
@@ -13,6 +13,7 @@ Tokenizer type used by the model
| `GPT` | GPT |
| `CLAUDE` | Claude |
| `GEMINI` | Gemini |
| `GEMMA` | Gemma |
| `GROK` | Grok |
| `COHERE` | Cohere |
| `NOVA` | Nova |
@@ -1,10 +0,0 @@
# ModelsCountResponseData
Model count data
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
| `count` | *float* | :heavy_check_mark: | Total number of available models | 150 |
+3 -3
View File
@@ -5,6 +5,6 @@ List of available models
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `data` | List[[components.Model](../components/model.md)] | :heavy_check_mark: | List of available models |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `data` | List[[components.Model](../components/model.md)] | :heavy_check_mark: | List of available models | [<br/>{<br/>"architecture": {<br/>"input_modalities": [<br/>"text"<br/>],<br/>"instruct_type": "chatml",<br/>"modality": "text-\u003etext",<br/>"output_modalities": [<br/>"text"<br/>],<br/>"tokenizer": "GPT"<br/>},<br/>"canonical_slug": "openai/gpt-4",<br/>"context_length": 8192,<br/>"created": 1692901234,<br/>"default_parameters": null,<br/>"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",<br/>"expiration_date": null,<br/>"id": "openai/gpt-4",<br/>"knowledge_cutoff": null,<br/>"links": {<br/>"details": "/api/v1/models/openai/gpt-5.4/endpoints"<br/>},<br/>"name": "GPT-4",<br/>"per_request_limits": null,<br/>"pricing": {<br/>"completion": "0.00006",<br/>"image": "0",<br/>"prompt": "0.00003",<br/>"request": "0"<br/>},<br/>"supported_parameters": [<br/>"temperature",<br/>"top_p",<br/>"max_tokens"<br/>],<br/>"supported_voices": null,<br/>"top_provider": {<br/>"context_length": 8192,<br/>"is_moderated": true,<br/>"max_completion_tokens": 4096<br/>}<br/>}<br/>] |
-9
View File
@@ -1,9 +0,0 @@
# NamedToolChoice
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `type` | *Literal["function"]* | :heavy_check_mark: | N/A |
| `function` | [components.NamedToolChoiceFunction](../components/namedtoolchoicefunction.md) | :heavy_check_mark: | N/A |
@@ -1,8 +0,0 @@
# NamedToolChoiceFunction
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `name` | *str* | :heavy_check_mark: | N/A |
-8
View File
@@ -1,8 +0,0 @@
# Object
## Values
| Name | Value |
| ---------- | ---------- |
| `RESPONSE` | response |
-17
View File
@@ -1,17 +0,0 @@
# Only
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -1,12 +0,0 @@
# OpenAIResponsesIncludable
## Values
| Name | Value |
| --------------------------------------- | --------------------------------------- |
| `FILE_SEARCH_CALL_RESULTS` | file_search_call.results |
| `MESSAGE_INPUT_IMAGE_IMAGE_URL` | message.input_image.image_url |
| `COMPUTER_CALL_OUTPUT_OUTPUT_IMAGE_URL` | computer_call_output.output.image_url |
| `REASONING_ENCRYPTED_CONTENT` | reasoning.encrypted_content |
| `CODE_INTERPRETER_CALL_OUTPUTS` | code_interpreter_call.outputs |
@@ -1,8 +0,0 @@
# OpenAIResponsesIncompleteDetails
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
| `reason` | [Optional[components.Reason]](../components/reason.md) | :heavy_minus_sign: | N/A |

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