Compare commits

..
Author SHA1 Message Date
speakeasy-github[bot]andspeakeasy-bot 0a66fb531b empty commit to trigger [run-tests] workflow 2026-06-18 01:00:41 +00:00
speakeasybot 15ce4685f3 ## Python SDK Changes:
* `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-18 01:00:24 +00: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
768 changed files with 108778 additions and 34577 deletions
+5
View File
@@ -1,4 +1,9 @@
<div align="center">
<a href="https://codespaces.new/OpenRouterTeam/python-sdk.git/tree/main"><img src="https://github.com/codespaces/badge.svg" /></a>
</div>
<br>
> **Remember to shutdown a GitHub Codespace when it is not in use!**
# Dev Containers Quick Start
@@ -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 }}
+6777 -1761
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -32,7 +32,7 @@ generation:
skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true
python:
version: 0.8.1
version: 0.10.1
additionalDependencies:
dev: {}
main: {}
@@ -59,7 +59,7 @@ python:
flattenGlobalSecurity: true
flattenRequests: true
flatteningOrder: parameters-first
forwardCompatibleUnionsByDefault: "tagged-only"
forwardCompatibleUnionsByDefault: tagged-only
imports:
option: openapi
paths:
+14357 -878
View File
File diff suppressed because it is too large Load Diff
+31913 -18586
View File
File diff suppressed because it is too large Load Diff
@@ -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
+9 -5
View File
@@ -2,19 +2,20 @@ speakeasyVersion: 1.680.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:0795e89fdc7634204a5e1c93c441069d7bfb349fc1c7f43a53db24f0803c72fa
sourceBlobDigest: sha256:bb920e0d3ed7fb2c204d06aa436d9ce9a3635727d3a6147a7a2798333458d12a
sourceRevisionDigest: sha256:b28471bf9c3ac9b7d9b816a09bfb5b5c58d98db2d82dbc971d64f5aa980f4e10
sourceBlobDigest: sha256:8d445ea792f56fb2ebeb3f418757e6404802be1c21ab50520c66d10871bb960a
tags:
- latest
- speakeasy-sdk-regen-1781726096
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:0795e89fdc7634204a5e1c93c441069d7bfb349fc1c7f43a53db24f0803c72fa
sourceBlobDigest: sha256:bb920e0d3ed7fb2c204d06aa436d9ce9a3635727d3a6147a7a2798333458d12a
sourceRevisionDigest: sha256:b28471bf9c3ac9b7d9b816a09bfb5b5c58d98db2d82dbc971d64f5aa980f4e10
sourceBlobDigest: sha256:8d445ea792f56fb2ebeb3f418757e6404802be1c21ab50520c66d10871bb960a
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:c368e0601d6b667625dd99ffcd53e69e3dc98a4b518a45444add6457dde83b22
codeSamplesRevisionDigest: sha256:0bb2447eb2e776cdc9347c290ddcde4be0b9f9ded69c93e5b29231e2c54c3e5f
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.680.0
@@ -26,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
+1
View File
@@ -10,6 +10,7 @@ sources:
- 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?
+66 -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
@@ -246,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.
```
+66 -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
@@ -246,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-18 00:58:22
### 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 - .
+6 -10
View File
@@ -12,12 +12,10 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.beta.responses.send(service_tier="auto", stream=False)
res = open_router.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>
@@ -39,12 +37,10 @@ async def main():
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = await open_router.beta.responses.send_async(service_tier="auto", stream=False)
res = await open_router.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 |
+4 -4
View File
@@ -7,7 +7,7 @@ Detailed completion token usage
| Field | Type | Required | Description |
| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- |
| `reasoning_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Tokens used for reasoning |
| `audio_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Tokens used for audio output |
| `accepted_prediction_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Accepted prediction tokens |
| `rejected_prediction_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Rejected prediction tokens |
| `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 |
-10
View File
@@ -1,10 +0,0 @@
# Data
Model count data
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
| `count` | *float* | :heavy_check_mark: | Total number of available models | 150 |
+4 -4
View File
@@ -7,9 +7,9 @@ Default parameters for this model
| Field | Type | Required | Description |
| ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `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 |
| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `temperature` | *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 |
-15
View File
@@ -1,15 +0,0 @@
# Effort
Constrains effort on reasoning for reasoning models
## Values
| Name | Value |
| --------- | --------- |
| `XHIGH` | xhigh |
| `HIGH` | high |
| `MEDIUM` | medium |
| `LOW` | low |
| `MINIMAL` | minimal |
| `NONE` | none |
+2 -2
View File
@@ -7,5 +7,5 @@ Error information
| Field | Type | Required | Description | Example |
| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- |
| `message` | *str* | :heavy_check_mark: | Error message | Rate limit exceeded |
| `code` | *float* | :heavy_check_mark: | Error code | 429 |
| `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 |
+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 |
+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 |
+21 -17
View File
@@ -5,20 +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/>"top_k": 0,<br/>"frequency_penalty": 0,<br/>"presence_penalty": 0,<br/>"repetition_penalty": 1<br/>} |
| `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 |
| `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 |
+3 -3
View File
@@ -5,6 +5,6 @@ Model count data
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
| `data` | [components.Data](../components/data.md) | :heavy_check_mark: | Model count data | {<br/>"count": 150<br/>} |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `data` | [components.ModelsCountResponseData](../components/modelscountresponsedata.md) | :heavy_check_mark: | Model count data | {<br/>"count": 150<br/>} |
+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/>] |
@@ -5,5 +5,5 @@
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `type` | [components.OpenAIResponsesRefusalContentType](../components/openairesponsesrefusalcontenttype.md) | :heavy_check_mark: | N/A |
| `refusal` | *str* | :heavy_check_mark: | N/A |
| `refusal` | *str* | :heavy_check_mark: | N/A |
| `type` | [components.OpenAIResponsesRefusalContentType](../components/openairesponsesrefusalcontenttype.md) | :heavy_check_mark: | N/A |
@@ -5,5 +5,5 @@
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `type` | [components.OpenAIResponsesToolChoiceTypeFunction](../components/openairesponsestoolchoicetypefunction.md) | :heavy_check_mark: | N/A |
| `name` | *str* | :heavy_check_mark: | N/A |
| `name` | *str* | :heavy_check_mark: | N/A |
| `type` | [components.OpenAIResponsesToolChoiceTypeFunction](../components/openairesponsestoolchoicetypefunction.md) | :heavy_check_mark: | N/A |
@@ -33,3 +33,21 @@ value: components.OpenAIResponsesToolChoiceFunction = /* values here */
value: components.OpenAIResponsesToolChoice = /* values here */
```
### `components.ToolChoiceAllowed`
```python
value: components.ToolChoiceAllowed = /* values here */
```
### `components.OpenAIResponsesToolChoiceApplyPatch`
```python
value: components.OpenAIResponsesToolChoiceApplyPatch = /* values here */
```
### `components.OpenAIResponsesToolChoiceShell`
```python
value: components.OpenAIResponsesToolChoiceShell = /* values here */
```
@@ -5,7 +5,7 @@
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `type` | [components.OutputItemImageGenerationCallType](../components/outputitemimagegenerationcalltype.md) | :heavy_check_mark: | N/A | |
| `id` | *str* | :heavy_check_mark: | N/A | |
| `result` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `status` | [components.ImageGenerationStatus](../components/imagegenerationstatus.md) | :heavy_check_mark: | N/A | completed |
| `status` | [components.ImageGenerationStatus](../components/imagegenerationstatus.md) | :heavy_check_mark: | N/A | completed |
| `type` | [components.OutputItemImageGenerationCallType](../components/outputitemimagegenerationcalltype.md) | :heavy_check_mark: | N/A | |
+5 -5
View File
@@ -5,9 +5,9 @@
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | N/A |
| `role` | [components.OutputMessageRole](../components/outputmessagerole.md) | :heavy_check_mark: | N/A |
| `type` | [components.OutputMessageType](../components/outputmessagetype.md) | :heavy_check_mark: | N/A |
| `status` | [Optional[components.OutputMessageStatusUnion]](../components/outputmessagestatusunion.md) | :heavy_minus_sign: | N/A |
| `content` | List[[components.OutputMessageContent](../components/outputmessagecontent.md)] | :heavy_check_mark: | N/A |
| `phase` | [OptionalNullable[components.OutputMessagePhaseUnion]](../components/outputmessagephaseunion.md) | :heavy_minus_sign: | The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. |
| `id` | *str* | :heavy_check_mark: | N/A |
| `phase` | [OptionalNullable[components.OutputMessagePhaseUnion]](../components/outputmessagephaseunion.md) | :heavy_minus_sign: | The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. |
| `role` | [components.OutputMessageRole](../components/outputmessagerole.md) | :heavy_check_mark: | N/A |
| `status` | [Optional[components.OutputMessageStatusUnion]](../components/outputmessagestatusunion.md) | :heavy_minus_sign: | N/A |
| `type` | [components.OutputMessageType](../components/outputmessagetype.md) | :heavy_check_mark: | N/A |
+10 -7
View File
@@ -3,10 +3,13 @@
## Values
| Name | Value |
| ------------ | ------------ |
| `TEXT` | text |
| `IMAGE` | image |
| `EMBEDDINGS` | embeddings |
| `AUDIO` | audio |
| `VIDEO` | video |
| Name | Value |
| --------------- | --------------- |
| `TEXT` | text |
| `IMAGE` | image |
| `EMBEDDINGS` | embeddings |
| `AUDIO` | audio |
| `VIDEO` | video |
| `RERANK` | rerank |
| `SPEECH` | speech |
| `TRANSCRIPTION` | transcription |
+1 -1
View File
@@ -5,4 +5,4 @@
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `reasoning_tokens` | *float* | :heavy_check_mark: | N/A |
| `reasoning_tokens` | *int* | :heavy_check_mark: | N/A |
+27 -26
View File
@@ -3,29 +3,30 @@
## Values
| Name | Value |
| --------------------- | --------------------- |
| `TEMPERATURE` | temperature |
| `TOP_P` | top_p |
| `TOP_K` | top_k |
| `MIN_P` | min_p |
| `TOP_A` | top_a |
| `FREQUENCY_PENALTY` | frequency_penalty |
| `PRESENCE_PENALTY` | presence_penalty |
| `REPETITION_PENALTY` | repetition_penalty |
| `MAX_TOKENS` | max_tokens |
| `LOGIT_BIAS` | logit_bias |
| `LOGPROBS` | logprobs |
| `TOP_LOGPROBS` | top_logprobs |
| `SEED` | seed |
| `RESPONSE_FORMAT` | response_format |
| `STRUCTURED_OUTPUTS` | structured_outputs |
| `STOP` | stop |
| `TOOLS` | tools |
| `TOOL_CHOICE` | tool_choice |
| `PARALLEL_TOOL_CALLS` | parallel_tool_calls |
| `INCLUDE_REASONING` | include_reasoning |
| `REASONING` | reasoning |
| `REASONING_EFFORT` | reasoning_effort |
| `WEB_SEARCH_OPTIONS` | web_search_options |
| `VERBOSITY` | verbosity |
| Name | Value |
| ----------------------- | ----------------------- |
| `TEMPERATURE` | temperature |
| `TOP_P` | top_p |
| `TOP_K` | top_k |
| `MIN_P` | min_p |
| `TOP_A` | top_a |
| `FREQUENCY_PENALTY` | frequency_penalty |
| `PRESENCE_PENALTY` | presence_penalty |
| `REPETITION_PENALTY` | repetition_penalty |
| `MAX_TOKENS` | max_tokens |
| `MAX_COMPLETION_TOKENS` | max_completion_tokens |
| `LOGIT_BIAS` | logit_bias |
| `LOGPROBS` | logprobs |
| `TOP_LOGPROBS` | top_logprobs |
| `SEED` | seed |
| `RESPONSE_FORMAT` | response_format |
| `STRUCTURED_OUTPUTS` | structured_outputs |
| `STOP` | stop |
| `TOOLS` | tools |
| `TOOL_CHOICE` | tool_choice |
| `PARALLEL_TOOL_CALLS` | parallel_tool_calls |
| `INCLUDE_REASONING` | include_reasoning |
| `REASONING` | reasoning |
| `REASONING_EFFORT` | reasoning_effort |
| `WEB_SEARCH_OPTIONS` | web_search_options |
| `VERBOSITY` | verbosity |
+3 -3
View File
@@ -5,6 +5,6 @@ Options for PDF parsing.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `engine` | [Optional[components.PDFParserEngine]](../components/pdfparserengine.md) | :heavy_minus_sign: | The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `engine` | [Optional[components.PDFParserEngine]](../components/pdfparserengine.md) | :heavy_minus_sign: | The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". | cloudflare-ai |
+2 -2
View File
@@ -7,5 +7,5 @@ Per-request token limits
| Field | Type | Required | Description | Example |
| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |
| `prompt_tokens` | *float* | :heavy_check_mark: | Maximum prompt tokens per request | 1000 |
| `completion_tokens` | *float* | :heavy_check_mark: | Maximum completion tokens per request | 1000 |
| `completion_tokens` | *float* | :heavy_check_mark: | Maximum completion tokens per request | 1000 |
| `prompt_tokens` | *float* | :heavy_check_mark: | Maximum prompt tokens per request | 1000 |
+9 -9
View File
@@ -5,17 +5,17 @@
| Field | Type | Required | Description | Example |
| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- |
| `prompt` | *str* | :heavy_check_mark: | N/A | 1000 |
| `completion` | *str* | :heavy_check_mark: | N/A | 1000 |
| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image_token` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `audio_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `completion` | *str* | :heavy_check_mark: | N/A | 1000 |
| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image_token` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `web_search` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `prompt` | *str* | :heavy_check_mark: | N/A | 1000 |
| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `web_search` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
+4 -4
View File
@@ -7,7 +7,7 @@ Detailed prompt token usage
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `cached_tokens` | *Optional[float]* | :heavy_minus_sign: | Cached prompt tokens |
| `cache_write_tokens` | *Optional[float]* | :heavy_minus_sign: | Tokens written to cache. Only returned for models with explicit caching and cache write pricing. |
| `audio_tokens` | *Optional[float]* | :heavy_minus_sign: | Audio input tokens |
| `video_tokens` | *Optional[float]* | :heavy_minus_sign: | Video input tokens |
| `audio_tokens` | *Optional[int]* | :heavy_minus_sign: | Audio input tokens |
| `cache_write_tokens` | *Optional[int]* | :heavy_minus_sign: | Tokens written to cache. Only returned for models with explicit caching and cache write pricing. |
| `cached_tokens` | *Optional[int]* | :heavy_minus_sign: | Cached prompt tokens |
| `video_tokens` | *Optional[int]* | :heavy_minus_sign: | Video input tokens |
+11 -1
View File
@@ -10,6 +10,7 @@
| `AION_LABS` | AionLabs |
| `ALIBABA` | Alibaba |
| `AMBIENT` | Ambient |
| `BAIDU` | Baidu |
| `AMAZON_BEDROCK` | Amazon Bedrock |
| `AMAZON_NOVA` | Amazon Nova |
| `ANTHROPIC` | Anthropic |
@@ -26,9 +27,14 @@
| `CLARIFAI` | Clarifai |
| `CLOUDFLARE` | Cloudflare |
| `COHERE` | Cohere |
| `CRUCIBLE` | Crucible |
| `CRUSOE` | Crusoe |
| `DARKBLOOM` | Darkbloom |
| `DECART` | Decart |
| `DEEP_INFRA` | DeepInfra |
| `DEEP_SEEK` | DeepSeek |
| `DEKA_LLM` | DekaLLM |
| `DIGITAL_OCEAN` | DigitalOcean |
| `FEATHERLESS` | Featherless |
| `FIREWORKS` | Fireworks |
| `FRIENDLI` | Friendli |
@@ -36,7 +42,6 @@
| `GOOGLE` | Google |
| `GOOGLE_AI_STUDIO` | Google AI Studio |
| `GROQ` | Groq |
| `HYPERBOLIC` | Hyperbolic |
| `INCEPTION` | Inception |
| `INCEPTRON` | Inceptron |
| `INFERENCE_NET` | InferenceNet |
@@ -55,14 +60,18 @@
| `MORPH` | Morph |
| `N_COMPASS` | NCompass |
| `NEBIUS` | Nebius |
| `NEX_AGI` | Nex AGI |
| `NEXT_BIT` | NextBit |
| `NOVITA` | Novita |
| `NVIDIA` | Nvidia |
| `OPEN_AI` | OpenAI |
| `OPEN_INFERENCE` | OpenInference |
| `PARASAIL` | Parasail |
| `POOLSIDE` | Poolside |
| `PERCEPTRON` | Perceptron |
| `PERPLEXITY` | Perplexity |
| `PHALA` | Phala |
| `RECRAFT` | Recraft |
| `REKA` | Reka |
| `RELACE` | Relace |
| `SAMBA_NOVA` | SambaNova |
@@ -76,6 +85,7 @@
| `TOGETHER` | Together |
| `UPSTAGE` | Upstage |
| `VENICE` | Venice |
| `WAFER` | Wafer |
| `WAND_B` | WandB |
| `XIAOMI` | Xiaomi |
| `X_AI` | xAI |
+10 -10
View File
@@ -1,6 +1,6 @@
# ProviderPreferences
Provider routing preferences for the request.
When multiple model providers are available, optionally indicate your routing preference.
## Fields
@@ -8,15 +8,15 @@ Provider routing preferences for the request.
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> | |
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. | |
| `data_collection` | [OptionalNullable[components.DataCollection]](../components/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/><br/>- deny: use only providers which do not collect user data. | allow |
| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true |
| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true |
| `order` | List[[components.ProviderPreferencesOrder](../components/providerpreferencesorder.md)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. | |
| `only` | List[[components.ProviderPreferencesOnly](../components/providerpreferencesonly.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | |
| `ignore` | List[[components.ProviderPreferencesIgnore](../components/providerpreferencesignore.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | |
| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | |
| `sort` | [OptionalNullable[components.ProviderPreferencesSortUnion]](../components/providerpreferencessortunion.md) | :heavy_minus_sign: | N/A | price |
| `max_price` | [Optional[components.ProviderPreferencesMaxPrice]](../components/providerpreferencesmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | |
| `ignore` | List[[components.Ignore](../components/ignore.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | [<br/>"openai",<br/>"anthropic"<br/>] |
| `max_price` | [Optional[components.MaxPrice]](../components/maxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | |
| `only` | List[[components.Only](../components/only.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | [<br/>"openai",<br/>"anthropic"<br/>] |
| `order` | List[[components.Order](../components/order.md)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. | [<br/>"openai",<br/>"anthropic"<br/>] |
| `preferred_max_latency` | [OptionalNullable[components.PreferredMaxLatency]](../components/preferredmaxlatency.md) | :heavy_minus_sign: | Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 5 |
| `preferred_min_throughput` | [OptionalNullable[components.PreferredMinThroughput]](../components/preferredminthroughput.md) | :heavy_minus_sign: | Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 100 |
| `preferred_max_latency` | [OptionalNullable[components.PreferredMaxLatency]](../components/preferredmaxlatency.md) | :heavy_minus_sign: | Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 5 |
| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | |
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. | |
| `sort` | [OptionalNullable[components.Sort]](../components/sort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | price |
| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true |
-13
View File
@@ -1,13 +0,0 @@
# ProviderPreferencesBy
The provider sorting strategy (price, throughput, latency)
## Values
| Name | Value |
| ------------ | ------------ |
| `PRICE` | price |
| `THROUGHPUT` | throughput |
| `LATENCY` | latency |
| `EXACTO` | exacto |
@@ -1,17 +0,0 @@
# ProviderPreferencesIgnore
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -1,14 +0,0 @@
# ProviderPreferencesMaxPrice
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
| `prompt` | *Optional[str]* | :heavy_minus_sign: | Price per million prompt tokens | 1000 |
| `completion` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
@@ -1,17 +0,0 @@
# ProviderPreferencesOnly
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -1,17 +0,0 @@
# ProviderPreferencesOrder
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -1,11 +0,0 @@
# ProviderPreferencesPartition
Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model.
## Values
| Name | Value |
| ------- | ------- |
| `MODEL` | model |
| `NONE` | none |
@@ -1,13 +0,0 @@
# ProviderPreferencesProviderSort
The provider sorting strategy (price, throughput, latency)
## Values
| Name | Value |
| ------------ | ------------ |
| `PRICE` | price |
| `THROUGHPUT` | throughput |
| `LATENCY` | latency |
| `EXACTO` | exacto |
@@ -1,9 +0,0 @@
# ProviderPreferencesProviderSortConfig
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `by` | [OptionalNullable[components.ProviderPreferencesBy]](../components/providerpreferencesby.md) | :heavy_minus_sign: | The provider sorting strategy (price, throughput, latency) | price |
| `partition` | [OptionalNullable[components.ProviderPreferencesPartition]](../components/providerpreferencespartition.md) | :heavy_minus_sign: | Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. | model |
@@ -1,11 +0,0 @@
# ProviderPreferencesProviderSortConfigEnum
## Values
| Name | Value |
| ------------ | ------------ |
| `PRICE` | price |
| `THROUGHPUT` | throughput |
| `LATENCY` | latency |
| `EXACTO` | exacto |
@@ -1,17 +0,0 @@
# ProviderPreferencesProviderSortConfigUnion
## Supported Types
### `components.ProviderPreferencesProviderSortConfig`
```python
value: components.ProviderPreferencesProviderSortConfig = /* values here */
```
### `components.ProviderPreferencesProviderSortConfigEnum`
```python
value: components.ProviderPreferencesProviderSortConfigEnum = /* values here */
```
@@ -1,11 +0,0 @@
# ProviderPreferencesSortEnum
## Values
| Name | Value |
| ------------ | ------------ |
| `PRICE` | price |
| `THROUGHPUT` | throughput |
| `LATENCY` | latency |
| `EXACTO` | exacto |
@@ -1,25 +0,0 @@
# ProviderPreferencesSortUnion
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
## Supported Types
### `components.ProviderPreferencesProviderSort`
```python
value: components.ProviderPreferencesProviderSort = /* values here */
```
### `components.ProviderPreferencesProviderSortConfigUnion`
```python
value: components.ProviderPreferencesProviderSortConfigUnion = /* values here */
```
### `components.ProviderPreferencesSortEnum`
```python
value: components.ProviderPreferencesSortEnum = /* values here */
```
+11 -9
View File
@@ -7,19 +7,21 @@ Information about a specific model endpoint
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | *str* | :heavy_check_mark: | N/A | |
| `context_length` | *int* | :heavy_check_mark: | N/A | |
| `latency_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. | {<br/>"p50": 25.5,<br/>"p75": 35.2,<br/>"p90": 48.7,<br/>"p99": 85.3<br/>} |
| `max_completion_tokens` | *Nullable[int]* | :heavy_check_mark: | N/A | |
| `max_prompt_tokens` | *Nullable[int]* | :heavy_check_mark: | N/A | |
| `model_id` | *str* | :heavy_check_mark: | The unique identifier for the model (permaslug) | openai/gpt-4 |
| `model_name` | *str* | :heavy_check_mark: | N/A | |
| `context_length` | *float* | :heavy_check_mark: | N/A | |
| `name` | *str* | :heavy_check_mark: | N/A | |
| `pricing` | [components.Pricing](../components/pricing.md) | :heavy_check_mark: | N/A | |
| `provider_name` | [components.ProviderName](../components/providername.md) | :heavy_check_mark: | N/A | OpenAI |
| `tag` | *str* | :heavy_check_mark: | N/A | |
| `quantization` | [Nullable[components.PublicEndpointQuantization]](../components/publicendpointquantization.md) | :heavy_check_mark: | N/A | fp16 |
| `max_completion_tokens` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `max_prompt_tokens` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | N/A | |
| `status` | [Optional[components.EndpointStatus]](../components/endpointstatus.md) | :heavy_minus_sign: | N/A | 0 |
| `uptime_last_30m` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | N/A | |
| `supports_implicit_caching` | *bool* | :heavy_check_mark: | N/A | |
| `latency_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. | |
| `throughput_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | N/A | |
| `tag` | *str* | :heavy_check_mark: | N/A | |
| `throughput_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | N/A | {<br/>"p50": 25.5,<br/>"p75": 35.2,<br/>"p90": 48.7,<br/>"p99": 85.3<br/>} |
| `uptime_last_1d` | *Nullable[float]* | :heavy_check_mark: | Uptime percentage over the last 1 day, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data. | |
| `uptime_last_30m` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `uptime_last_5m` | *Nullable[float]* | :heavy_check_mark: | Uptime percentage over the last 5 minutes, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data. | |
+9 -9
View File
@@ -7,17 +7,17 @@ Pricing information for the model
| Field | Type | Required | Description | Example |
| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- |
| `prompt` | *str* | :heavy_check_mark: | N/A | 1000 |
| `completion` | *str* | :heavy_check_mark: | N/A | 1000 |
| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image_token` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `audio_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `completion` | *str* | :heavy_check_mark: | N/A | 1000 |
| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image_token` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `web_search` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `prompt` | *str* | :heavy_check_mark: | N/A | 1000 |
| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `web_search` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
-11
View File
@@ -1,11 +0,0 @@
# Reasoning
Configuration options for reasoning models
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
| `effort` | [OptionalNullable[components.Effort]](../components/effort.md) | :heavy_minus_sign: | Constrains effort on reasoning for reasoning models | medium |
| `summary` | *OptionalNullable[Any]* | :heavy_minus_sign: | N/A | |
+7 -7
View File
@@ -5,10 +5,10 @@ Reasoning detail encrypted schema
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `type` | [components.ReasoningDetailEncryptedType](../components/reasoningdetailencryptedtype.md) | :heavy_check_mark: | N/A |
| `data` | *str* | :heavy_check_mark: | N/A |
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `format_` | [OptionalNullable[components.ReasoningDetailEncryptedFormat]](../components/reasoningdetailencryptedformat.md) | :heavy_minus_sign: | N/A |
| `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `data` | *str* | :heavy_check_mark: | N/A | |
| `format_` | [OptionalNullable[components.ReasoningFormat]](../components/reasoningformat.md) | :heavy_minus_sign: | N/A | unknown |
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `type` | [components.ReasoningDetailEncryptedType](../components/reasoningdetailencryptedtype.md) | :heavy_check_mark: | N/A | |
@@ -1,13 +0,0 @@
# ReasoningDetailEncryptedFormat
## Values
| Name | Value |
| --------------------------- | --------------------------- |
| `UNKNOWN` | unknown |
| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
| `AZURE_OPENAI_RESPONSES_V1` | azure-openai-responses-v1 |
| `XAI_RESPONSES_V1` | xai-responses-v1 |
| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
| `GOOGLE_GEMINI_V1` | google-gemini-v1 |
+7 -7
View File
@@ -5,10 +5,10 @@ Reasoning detail summary schema
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `type` | [components.ReasoningDetailSummaryType](../components/reasoningdetailsummarytype.md) | :heavy_check_mark: | N/A |
| `summary` | *str* | :heavy_check_mark: | N/A |
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `format_` | [OptionalNullable[components.ReasoningDetailSummaryFormat]](../components/reasoningdetailsummaryformat.md) | :heavy_minus_sign: | N/A |
| `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `format_` | [OptionalNullable[components.ReasoningFormat]](../components/reasoningformat.md) | :heavy_minus_sign: | N/A | unknown |
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `summary` | *str* | :heavy_check_mark: | N/A | |
| `type` | [components.ReasoningDetailSummaryType](../components/reasoningdetailsummarytype.md) | :heavy_check_mark: | N/A | |
@@ -1,13 +0,0 @@
# ReasoningDetailSummaryFormat
## Values
| Name | Value |
| --------------------------- | --------------------------- |
| `UNKNOWN` | unknown |
| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
| `AZURE_OPENAI_RESPONSES_V1` | azure-openai-responses-v1 |
| `XAI_RESPONSES_V1` | xai-responses-v1 |
| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
| `GOOGLE_GEMINI_V1` | google-gemini-v1 |
+8 -8
View File
@@ -5,11 +5,11 @@ Reasoning detail text schema
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `type` | [components.ReasoningDetailTextType](../components/reasoningdetailtexttype.md) | :heavy_check_mark: | N/A |
| `text` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `format_` | [OptionalNullable[components.ReasoningDetailTextFormat]](../components/reasoningdetailtextformat.md) | :heavy_minus_sign: | N/A |
| `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `format_` | [OptionalNullable[components.ReasoningFormat]](../components/reasoningformat.md) | :heavy_minus_sign: | N/A | unknown |
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `text` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `type` | [components.ReasoningDetailTextType](../components/reasoningdetailtexttype.md) | :heavy_check_mark: | N/A | |
@@ -1,13 +0,0 @@
# ReasoningDetailTextFormat
## Values
| Name | Value |
| --------------------------- | --------------------------- |
| `UNKNOWN` | unknown |
| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
| `AZURE_OPENAI_RESPONSES_V1` | azure-openai-responses-v1 |
| `XAI_RESPONSES_V1` | xai-responses-v1 |
| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
| `GOOGLE_GEMINI_V1` | google-gemini-v1 |
+6 -6
View File
@@ -5,18 +5,18 @@ Reasoning detail union schema
## Supported Types
### `components.ReasoningDetailSummary`
```python
value: components.ReasoningDetailSummary = /* values here */
```
### `components.ReasoningDetailEncrypted`
```python
value: components.ReasoningDetailEncrypted = /* values here */
```
### `components.ReasoningDetailSummary`
```python
value: components.ReasoningDetailSummary = /* values here */
```
### `components.ReasoningDetailText`
```python
+2 -2
View File
@@ -5,5 +5,5 @@
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `type` | [components.ReasoningSummaryTextType](../components/reasoningsummarytexttype.md) | :heavy_check_mark: | N/A |
| `text` | *str* | :heavy_check_mark: | N/A |
| `text` | *str* | :heavy_check_mark: | N/A |
| `type` | [components.ReasoningSummaryTextType](../components/reasoningsummarytexttype.md) | :heavy_check_mark: | N/A |
+2 -2
View File
@@ -5,5 +5,5 @@
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `type` | [components.ReasoningTextContentType](../components/reasoningtextcontenttype.md) | :heavy_check_mark: | N/A |
| `text` | *str* | :heavy_check_mark: | N/A |
| `text` | *str* | :heavy_check_mark: | N/A |
| `type` | [components.ReasoningTextContentType](../components/reasoningtextcontenttype.md) | :heavy_check_mark: | N/A |
+8 -8
View File
@@ -5,10 +5,10 @@ Response format configuration
## Supported Types
### `components.ChatFormatTextConfig`
### `components.ChatFormatGrammarConfig`
```python
value: components.ChatFormatTextConfig = /* values here */
value: components.ChatFormatGrammarConfig = /* values here */
```
### `components.FormatJSONObjectConfig`
@@ -23,15 +23,15 @@ value: components.FormatJSONObjectConfig = /* values here */
value: components.ChatFormatJSONSchemaConfig = /* values here */
```
### `components.ChatFormatGrammarConfig`
```python
value: components.ChatFormatGrammarConfig = /* values here */
```
### `components.ChatFormatPythonConfig`
```python
value: components.ChatFormatPythonConfig = /* values here */
```
### `components.ChatFormatTextConfig`
```python
value: components.ChatFormatTextConfig = /* values here */
```
+3 -3
View File
@@ -5,7 +5,7 @@
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `type` | [components.ResponseOutputTextType](../components/responseoutputtexttype.md) | :heavy_check_mark: | N/A |
| `text` | *str* | :heavy_check_mark: | N/A |
| `annotations` | List[[components.OpenAIResponsesAnnotation](../components/openairesponsesannotation.md)] | :heavy_minus_sign: | N/A |
| `logprobs` | List[[components.ResponseOutputTextLogprob](../components/responseoutputtextlogprob.md)] | :heavy_minus_sign: | N/A |
| `logprobs` | List[[components.Logprob](../components/logprob.md)] | :heavy_minus_sign: | N/A |
| `text` | *str* | :heavy_check_mark: | N/A |
| `type` | [components.ResponseOutputTextType](../components/responseoutputtexttype.md) | :heavy_check_mark: | N/A |
@@ -5,6 +5,6 @@
| 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 |
| `bytes_` | List[*int*] | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `token` | *str* | :heavy_check_mark: | N/A |
+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 |
+3 -3
View File
@@ -7,6 +7,6 @@ Information about the top provider for this model
| Field | Type | Required | Description | Example |
| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
| `context_length` | *OptionalNullable[float]* | :heavy_minus_sign: | Context length from the top provider | 8192 |
| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum completion tokens from the top provider | 4096 |
| `is_moderated` | *bool* | :heavy_check_mark: | Whether the top provider moderates content | true |
| `context_length` | *OptionalNullable[int]* | :heavy_minus_sign: | Context length from the top provider | 8192 |
| `is_moderated` | *bool* | :heavy_check_mark: | Whether the top provider moderates content | true |
| `max_completion_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum completion tokens from the top provider | 4096 |
-8
View File
@@ -1,8 +0,0 @@
# TypeResponseCompleted
## Values
| Name | Value |
| -------------------- | -------------------- |
| `RESPONSE_COMPLETED` | response.completed |
-8
View File
@@ -1,8 +0,0 @@
# TypeResponseCreated
## Values
| Name | Value |
| ------------------ | ------------------ |
| `RESPONSE_CREATED` | response.created |
-8
View File
@@ -1,8 +0,0 @@
# TypeResponseFailed
## Values
| Name | Value |
| ----------------- | ----------------- |
| `RESPONSE_FAILED` | response.failed |
@@ -1,8 +0,0 @@
# TypeResponseIncomplete
## Values
| Name | Value |
| --------------------- | --------------------- |
| `RESPONSE_INCOMPLETE` | response.incomplete |
@@ -1,8 +0,0 @@
# TypeResponseInProgress
## Values
| Name | Value |
| ---------------------- | ---------------------- |
| `RESPONSE_IN_PROGRESS` | response.in_progress |
@@ -1,8 +0,0 @@
# TypeResponseOutputItemAdded
## Values
| Name | Value |
| ---------------------------- | ---------------------------- |
| `RESPONSE_OUTPUT_ITEM_ADDED` | response.output_item.added |
@@ -1,8 +0,0 @@
# TypeResponseOutputItemDone
## Values
| Name | Value |
| --------------------------- | --------------------------- |
| `RESPONSE_OUTPUT_ITEM_DONE` | response.output_item.done |
+5 -4
View File
@@ -5,8 +5,9 @@
| Field | Type | Required | Description |
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
| `type` | [components.URLCitationType](../components/urlcitationtype.md) | :heavy_check_mark: | N/A |
| `url` | *str* | :heavy_check_mark: | N/A |
| `content` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `end_index` | *int* | :heavy_check_mark: | N/A |
| `start_index` | *int* | :heavy_check_mark: | N/A |
| `title` | *str* | :heavy_check_mark: | N/A |
| `start_index` | *float* | :heavy_check_mark: | N/A |
| `end_index` | *float* | :heavy_check_mark: | N/A |
| `type` | [components.URLCitationType](../components/urlcitationtype.md) | :heavy_check_mark: | N/A |
| `url` | *str* | :heavy_check_mark: | N/A |
+7 -6
View File
@@ -5,9 +5,10 @@ The search engine to use for web search.
## Values
| Name | Value |
| ----------- | ----------- |
| `NATIVE` | native |
| `EXA` | exa |
| `FIRECRAWL` | firecrawl |
| `PARALLEL` | parallel |
| Name | Value |
| ------------ | ------------ |
| `NATIVE` | native |
| `EXA` | exa |
| `FIRECRAWL` | firecrawl |
| `PARALLEL` | parallel |
| `PERPLEXITY` | perplexity |
+1
View File
@@ -8,4 +8,5 @@ Bad Gateway - Provider/upstream API failure
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `error` | [components.BadGatewayResponseErrorData](../components/badgatewayresponseerrordata.md) | :heavy_check_mark: | Error data for BadGatewayResponse | {<br/>"code": 502,<br/>"message": "Provider returned error"<br/>} |
| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
+1
View File
@@ -8,4 +8,5 @@ Bad Request - Invalid request parameters or malformed input
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `error` | [components.BadRequestResponseErrorData](../components/badrequestresponseerrordata.md) | :heavy_check_mark: | Error data for BadRequestResponse | {<br/>"code": 400,<br/>"message": "Invalid request parameters"<br/>} |
| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
@@ -8,4 +8,5 @@ Infrastructure Timeout - Provider request timed out at edge network
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `error` | [components.EdgeNetworkTimeoutResponseErrorData](../components/edgenetworktimeoutresponseerrordata.md) | :heavy_check_mark: | Error data for EdgeNetworkTimeoutResponse | {<br/>"code": 524,<br/>"message": "Request timed out. Please try again later."<br/>} |
| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
+1
View File
@@ -8,4 +8,5 @@ Forbidden - Authentication successful but insufficient permissions
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `error` | [components.ForbiddenResponseErrorData](../components/forbiddenresponseerrordata.md) | :heavy_check_mark: | Error data for ForbiddenResponse | {<br/>"code": 403,<br/>"message": "Only management keys can perform this operation"<br/>} |
| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
@@ -8,4 +8,5 @@ Internal Server Error - Unexpected server error
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `error` | [components.InternalServerResponseErrorData](../components/internalserverresponseerrordata.md) | :heavy_check_mark: | Error data for InternalServerResponse | {<br/>"code": 500,<br/>"message": "Internal Server Error"<br/>} |
| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
+1
View File
@@ -8,4 +8,5 @@ Not Found - Resource does not exist
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `error` | [components.NotFoundResponseErrorData](../components/notfoundresponseerrordata.md) | :heavy_check_mark: | Error data for NotFoundResponse | {<br/>"code": 404,<br/>"message": "Resource not found"<br/>} |
| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
@@ -8,4 +8,5 @@ Payload Too Large - Request payload exceeds size limits
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `error` | [components.PayloadTooLargeResponseErrorData](../components/payloadtoolargeresponseerrordata.md) | :heavy_check_mark: | Error data for PayloadTooLargeResponse | {<br/>"code": 413,<br/>"message": "Request payload too large"<br/>} |
| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
@@ -8,4 +8,5 @@ Payment Required - Insufficient credits or quota to complete request
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `error` | [components.PaymentRequiredResponseErrorData](../components/paymentrequiredresponseerrordata.md) | :heavy_check_mark: | Error data for PaymentRequiredResponse | {<br/>"code": 402,<br/>"message": "Insufficient credits. Add more using https://openrouter.ai/credits"<br/>} |
| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
@@ -8,4 +8,5 @@ Provider Overloaded - Provider is temporarily overloaded
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `error` | [components.ProviderOverloadedResponseErrorData](../components/provideroverloadedresponseerrordata.md) | :heavy_check_mark: | Error data for ProviderOverloadedResponse | {<br/>"code": 529,<br/>"message": "Provider returned error"<br/>} |
| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
@@ -8,4 +8,5 @@ Request Timeout - Operation exceeded time limit
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `error` | [components.RequestTimeoutResponseErrorData](../components/requesttimeoutresponseerrordata.md) | :heavy_check_mark: | Error data for RequestTimeoutResponse | {<br/>"code": 408,<br/>"message": "Operation timed out. Please try again later."<br/>} |
| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
@@ -8,4 +8,5 @@ Service Unavailable - Service temporarily unavailable
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `error` | [components.ServiceUnavailableResponseErrorData](../components/serviceunavailableresponseerrordata.md) | :heavy_check_mark: | Error data for ServiceUnavailableResponse | {<br/>"code": 503,<br/>"message": "Service temporarily unavailable"<br/>} |
| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
@@ -8,4 +8,5 @@ Too Many Requests - Rate limit exceeded
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `error` | [components.TooManyRequestsResponseErrorData](../components/toomanyrequestsresponseerrordata.md) | :heavy_check_mark: | Error data for TooManyRequestsResponse | {<br/>"code": 429,<br/>"message": "Rate limit exceeded"<br/>} |
| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
+1
View File
@@ -8,4 +8,5 @@ Unauthorized - Authentication required or invalid credentials
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `error` | [components.UnauthorizedResponseErrorData](../components/unauthorizedresponseerrordata.md) | :heavy_check_mark: | Error data for UnauthorizedResponse | {<br/>"code": 401,<br/>"message": "Missing Authentication header"<br/>} |
| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
@@ -8,4 +8,5 @@ Unprocessable Entity - Semantic validation failure
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `error` | [components.UnprocessableEntityResponseErrorData](../components/unprocessableentityresponseerrordata.md) | :heavy_check_mark: | Error data for UnprocessableEntityResponse | {<br/>"code": 422,<br/>"message": "Invalid argument"<br/>} |
| `openrouter_metadata` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
-12
View File
@@ -1,12 +0,0 @@
# APIType
Type of API used for the generation
## Values
| Name | Value |
| ------------- | ------------- |
| `COMPLETIONS` | completions |
| `EMBEDDINGS` | embeddings |
| `VIDEO` | video |
@@ -9,4 +9,4 @@
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
| `request_body` | [operations.BulkAssignKeysToGuardrailRequestBody](../operations/bulkassignkeystoguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
| `bulk_assign_keys_request` | [components.BulkAssignKeysRequest](../components/bulkassignkeysrequest.md) | :heavy_check_mark: | N/A | {<br/>"key_hashes": [<br/>"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"<br/>]<br/>} |
@@ -1,8 +0,0 @@
# BulkAssignKeysToGuardrailRequestBody
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| `key_hashes` | List[*str*] | :heavy_check_mark: | Array of API key hashes to assign to the guardrail | [<br/>"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"<br/>] |

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