diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 2acf41ce..717b3074 100644
--- a/.speakeasy/gen.lock
+++ b/.speakeasy/gen.lock
@@ -1,19 +1,19 @@
lockVersion: 2.0.0
id: c48cf606-fb42-4a45-9c23-8f0555307828
management:
- docChecksum: 3810bb959aba463025335b25d590ba30
+ docChecksum: 891fbcc80cd0cddb9ee1333803b10898
docVersion: 1.0.0
speakeasyVersion: 1.803.2
generationVersion: 2.950.13
- releaseVersion: 1.3.100
- configChecksum: 57f22e4b4f4a78469b00dc2ee6f5f47d
+ releaseVersion: 1.3.101
+ configChecksum: b28398272824ebb18f86644269dcb6d6
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
- generation_id: 63b97cf4-7a29-4adc-899c-cf4272e2127e
- pristine_commit_hash: f7b36f02f2c6eba97fc0b2e0af03c236a2e528b0
- pristine_tree_hash: 32a63e85f6ae10fcd36471b8bf27173d026185b0
+ generation_id: 3976c670-c417-48d9-98ac-f12e8f0bb0ba
+ pristine_commit_hash: b53e06395bda0d1287882cb1a23b183f6e65bbf7
+ pristine_tree_hash: d92c865e1a92b6260734931c39f7c6f3352eba21
features:
python:
acceptHeaders: 3.0.0
@@ -5616,12 +5616,20 @@ trackedFiles:
pristine_git_object: 09effe2d3fe45536c8b0aa0f23c02ce19b15f62c
docs/components/openresponsesresult.mdx:
id: d0fed85674d2
- last_write_checksum: sha1:bda0b105f96e85e60a883b196adadec411bf3553
- pristine_git_object: d7b84c4c6dc8d46ef9648b8ad9f9e66857857812
+ last_write_checksum: sha1:34c227e4bc5e7f81e92539b4504f5445042a167b
+ pristine_git_object: 07a251d195675e9d2caff76690e958d2310d98d1
+ docs/components/openresponsesresultaccessprograms.mdx:
+ id: 8bdc604d9577
+ last_write_checksum: sha1:e5af38fcce3b2ccabc68b0b963f244618c10fafa
+ pristine_git_object: 70d5cd224974383c89789860fb7284403aee9ffe
docs/components/openresponsesresultallowedcaller.mdx:
id: 09e2289416bf
last_write_checksum: sha1:5971a2111c35fa89208cf827bb317262e14915ba
pristine_git_object: 4f5070dbcbb616dabc54a771a3639fb4210fc4fd
+ docs/components/openresponsesresultcyber.mdx:
+ id: 0dfff76f09bb
+ last_write_checksum: sha1:b0a0dfa80614339720fc2f64a39100a81dc46b83
+ pristine_git_object: 4ff018999981d19c72078ad8ebd48feeac1ed06b
docs/components/openresponsesresultobject.mdx:
id: 93b1fcc70132
last_write_checksum: sha1:7579ee1bb9e0d20c55cf54a8ca2ccbc950d2921d
@@ -7092,12 +7100,20 @@ trackedFiles:
pristine_git_object: aa7c89233d761c71c471d4f9ee808e648e683fcf
docs/components/responsesrequest.mdx:
id: 0dbcef40a4b1
- last_write_checksum: sha1:256db93f6eedd62fb5bbeaf298b7813ccc22d01b
- pristine_git_object: a8ac7bc77c317c39ea302963578d54047f99c7ea
+ last_write_checksum: sha1:a02164702854c71a53627f65a5c46d5f7f664b47
+ pristine_git_object: aed35107c8ec8cccf4c7e2076480be9e7cdbc579
+ docs/components/responsesrequestaccessprograms.mdx:
+ id: 5601238f0623
+ last_write_checksum: sha1:50c603ddf87595ee886e479ca39ee53aa4e6cf2b
+ pristine_git_object: 92c40984d93a0521e0b0ee785ddd1e56196ea6cc
docs/components/responsesrequestallowedcaller.mdx:
id: 07ac030bdf1b
last_write_checksum: sha1:9370b318e4620662b13a773ac1a47a93ea201b55
pristine_git_object: 336dddcd54b549c4572c7d4f316396ae6449d303
+ docs/components/responsesrequestcyber.mdx:
+ id: 5726d5486018
+ last_write_checksum: sha1:22981e22540f2f645c5b6ec06acbd338ba905c5b
+ pristine_git_object: 8a39349e93da8589f253746d1078f66a3c928ffb
docs/components/responsesrequestplugin.mdx:
id: 4d550c41c85f
last_write_checksum: sha1:33fd23a59ea84d642dbe158a27e48621b5514a06
@@ -10596,8 +10612,8 @@ trackedFiles:
pristine_git_object: 46fe09f0c09e01c11b8b88fc5265802ac48ee05d
docs/sdks/betaresponses/README.mdx:
id: 8a1e987c9840
- last_write_checksum: sha1:5b693384462b368f59a138cc965d334906593482
- pristine_git_object: 2641add7985541f22a274afac2f885ccfbd43638
+ last_write_checksum: sha1:88f9f1f25424bfe9b303ae964593d4235fa05ad3
+ pristine_git_object: 602c654ec2a93444f60d5f514a0b67cae81eaccf
docs/sdks/byok/README.mdx:
id: 17792f3b180d
last_write_checksum: sha1:fed0d8f340b51772ad7577aab8a0f0703565743e
@@ -10676,8 +10692,8 @@ trackedFiles:
pristine_git_object: 4762825df814e75d1f9c2c4067444270f4ec7b60
docs/sdks/presets/README.mdx:
id: eeb505928d52
- last_write_checksum: sha1:f1abe2d901d7812f60b9e55ec60ae793f4e17365
- pristine_git_object: e442ecccb64f8b759a9d6c610cec84fd12da1e44
+ last_write_checksum: sha1:3f1c467508c8efa76a7ed482e1ec9db8ef059cb6
+ pristine_git_object: 10dbc7da31e08f14827c9bab01ff6997b5837094
docs/sdks/privateendpoints/README.mdx:
id: 54dee70b8cc7
last_write_checksum: sha1:d3959235845b4eb2f3ba2893837a13533f4b4329
@@ -10696,8 +10712,8 @@ trackedFiles:
pristine_git_object: 4e10c25ed694e617695e7fc6192b7b25302977d6
docs/sdks/responses/README.mdx:
id: abab319e080e
- last_write_checksum: sha1:9b3c7758b598da5a9b1f22ff0e6ede9bd0e9afc6
- pristine_git_object: edd7ea5214145f80634bca4e4a613fe39e3f1ec9
+ last_write_checksum: sha1:ec32ab6c2dcb69ca872b020401396de6ed74293e
+ pristine_git_object: 4d2e846c13e798a58d0bc37ae6b7f1e5ab07ef1f
docs/sdks/scim/README.mdx:
id: fd6d8a91a053
last_write_checksum: sha1:28c02b55a629845b4912e9eac168cfc0cb7eb785
@@ -10736,8 +10752,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
- last_write_checksum: sha1:2f924759fc5fd5193d32c0915b8c2a6ff69819db
- pristine_git_object: 47295f170deb1dc65c2f3b1930b9196b59d85790
+ last_write_checksum: sha1:60a23c9c539a6a5009470745816dc4beaff9fc4b
+ pristine_git_object: b4b9c12351be58ca1b631223b7fba0c788aa30a8
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -10764,8 +10780,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
- last_write_checksum: sha1:492ecd3ae0fae43fd53c40b02b82bca5b734d025
- pristine_git_object: 7b6327c667d32c6b7b3e3917351f15475aa0ddb4
+ last_write_checksum: sha1:a384c91148fe7af26faf1f4ed7790985b80b7b56
+ pristine_git_object: f21312c240f249cd03a1b3d06e17a98f2e2909df
src/openrouter/alpha.py:
id: 306c4d93308d
last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766
@@ -10796,8 +10812,8 @@ trackedFiles:
pristine_git_object: aa95a65cf560fd7edb0c3c6f5fed707ca5015da3
src/openrouter/beta_responses.py:
id: 001eaf848bf1
- last_write_checksum: sha1:8b7bb5f528472f0f62f550a1e83892e8f5b78624
- pristine_git_object: e9bae7b641ce3b858197497c3f48807e5835869c
+ last_write_checksum: sha1:9fc9beb75facbed656d7757b34bf63724c78815a
+ pristine_git_object: c3407b839ccc12fbe61aee7e522386e3e28df043
src/openrouter/byok.py:
id: bec352462ae1
last_write_checksum: sha1:2c6adc3f1205dbfc0c73be9db646118855b8fb0f
@@ -10812,8 +10828,8 @@ trackedFiles:
pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1
src/openrouter/components/__init__.py:
id: 81754e97b3f4
- last_write_checksum: sha1:c0b37e8243526ef606f1b8dee052727b121761af
- pristine_git_object: 9d5f56952989fd5239415358ef6d02a761d343ed
+ last_write_checksum: sha1:f61b76a14bb861286ff7f67b0a3799435af7646d
+ pristine_git_object: 79cf89c08859ae44581a90f212caaf369ccb5e33
src/openrouter/components/aabenchmarkentry.py:
id: e2e0f0b48c82
last_write_checksum: sha1:fab4d9a24d2cea937bb749d46c5f83941e99d65c
@@ -13044,8 +13060,8 @@ trackedFiles:
pristine_git_object: 08d990d8cc07b7928158fc55784cd9d613f4c58b
src/openrouter/components/openresponsesresult.py:
id: 78f7e33b19e6
- last_write_checksum: sha1:49fbbbceae52d9595b35123406d23e9c77602aac
- pristine_git_object: 0e1f8dafe2210d3f5bc7c25225f630d164fdc45d
+ last_write_checksum: sha1:efefeab1914ae1f1d978084bbd1f01f6844dc463
+ pristine_git_object: 703b72543c0783ae1d97a7fab4a7fc45474509ce
src/openrouter/components/openrouterfile.py:
id: df1961bcb130
last_write_checksum: sha1:1a9a1b1e640f4d0ef78ce0caa160b5ab342f02cc
@@ -13632,8 +13648,8 @@ trackedFiles:
pristine_git_object: 900bf08ec940565a8cbf55712a437775db00ca46
src/openrouter/components/responsesrequest.py:
id: 8c850080ec5d
- last_write_checksum: sha1:dad2c4bad8a36d07ac573f4309d58b4ca270f6ed
- pristine_git_object: 366b5e9ec43f16c67d7cd93c05a764409b6a78e7
+ last_write_checksum: sha1:a63d2e86e801fa49295f6df110cc52acf0b5db67
+ pristine_git_object: b49331a97779198d07fae43c41b2b9c774b17274
src/openrouter/components/responsesstreamingresponse.py:
id: 142379f3bd90
last_write_checksum: sha1:a48d6f3610f5d15248ef4d25a0d88a0a4a1a9db7
@@ -15092,8 +15108,8 @@ trackedFiles:
pristine_git_object: 228602282f43dd94fb7703bb47b45a570c1aa8d2
src/openrouter/presets.py:
id: bd0c40379dcd
- last_write_checksum: sha1:e3eff582e7c9c51cc9c23d4716a419f4a86baa7f
- pristine_git_object: 26ecf767f8e1f98145acfa7d0fa14ffcf13955d6
+ last_write_checksum: sha1:894f5db393b856f7f745ce938a358b161efc58f2
+ pristine_git_object: 4edc4e886abe1848022ee7931877859e2d809bfb
src/openrouter/private_endpoints.py:
id: fdbce8846ed0
last_write_checksum: sha1:1b13e618b76900d06fafa5660126f0cd46f7121e
@@ -15116,8 +15132,8 @@ trackedFiles:
pristine_git_object: 9db3cc719bd343ee7be0183d0c87b50c29e5eb31
src/openrouter/responses.py:
id: f2108fb635e1
- last_write_checksum: sha1:f68f72c792c636928a0c6e31a34ce27357bbfa76
- pristine_git_object: 1aa587d5efdb8e61d83b88ef26532151601edb77
+ last_write_checksum: sha1:476a8c3fced50876b320581685a93d81577404cf
+ pristine_git_object: ebebd8b60406ca8420d4d5abb3b24b01799f36f1
src/openrouter/scim.py:
id: 351afd6b616e
last_write_checksum: sha1:4c9a81e177e1dbc246e0955e90365d653d2ba876
@@ -19786,4 +19802,6 @@ examples:
examplesVersion: 1.0.2
releaseNotes: |
## Python SDK Changes:
- * `open_router.models.list_for_user()`: `request.client` **Added**
+ * `open_router.batch.create_batches()`: `response.results[].response.body.union(OpenResponsesResult).access_programs` **Added**
+ * `open_router.batch.get_batches()`: `response.results[].response.body.union(OpenResponsesResult).access_programs` **Added**
+ * `open_router.presets.create_presets_responses()`: `request.access_programs` **Added**
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index 0759e6ef..7772ba83 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -37,7 +37,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
- version: 1.3.100
+ version: 1.3.101
additionalDependencies:
dev:
pytest: '>=8.3'
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index 2f571be2..7a15a5e6 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -23598,6 +23598,24 @@ components:
allOf:
- $ref: '#/components/schemas/BaseResponsesResult'
- properties:
+ access_programs:
+ default: null
+ description: 'Access program the upstream provider reported for this response (OpenAI `access_programs`). `null` when the provider reported none, including OpenAI''s implicit Standard program.'
+ example:
+ cyber: 'standard'
+ properties:
+ cyber:
+ enum:
+ - 'standard'
+ - 'daybreak_blue'
+ - 'daybreak_red'
+ type: 'string'
+ x-speakeasy-unknown-values: allow
+ required:
+ - 'cyber'
+ type:
+ - 'object'
+ - 'null'
alignment:
$ref: '#/components/schemas/Alignment'
error:
@@ -29626,6 +29644,19 @@ components:
type: 'function'
top_p: 0.9
properties:
+ access_programs:
+ description: 'OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter''s own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter''s OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.'
+ example:
+ cyber: 'standard'
+ properties:
+ cyber:
+ enum:
+ - 'standard'
+ - 'daybreak_blue'
+ - 'daybreak_red'
+ type: 'string'
+ x-speakeasy-unknown-values: allow
+ type: 'object'
background:
type:
- 'boolean'
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 30999cd2..1a7dfa6d 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -2,8 +2,8 @@ speakeasyVersion: 1.803.2
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:32ea4c71d1cc026c47909f3a7dbeba5a8aaa058da5221ad57628e0a8f6f3e73f
- sourceBlobDigest: sha256:f6c865e0940b6265b0c93868d059dceddc83a136c5f915316ae231ae6ef4b092
+ sourceRevisionDigest: sha256:ccc96c5353fb2491ea1283b289e1862413351f3483ae6a03636fafc98144a5f8
+ sourceBlobDigest: sha256:0f96ca3b3857d32836394a87ae1612c437ac45a5cb70745f5fc7340e176f8a22
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:32ea4c71d1cc026c47909f3a7dbeba5a8aaa058da5221ad57628e0a8f6f3e73f
- sourceBlobDigest: sha256:f6c865e0940b6265b0c93868d059dceddc83a136c5f915316ae231ae6ef4b092
+ sourceRevisionDigest: sha256:ccc96c5353fb2491ea1283b289e1862413351f3483ae6a03636fafc98144a5f8
+ sourceBlobDigest: sha256:0f96ca3b3857d32836394a87ae1612c437ac45a5cb70745f5fc7340e176f8a22
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:72935df278582f5ec42dc61a75d11ce8c7e14328cf699618aa49649e7ac37e12
+ codeSamplesRevisionDigest: sha256:7902840af4493cd0ab8bd1ae9f0524227e09edaa1c245681123e55d922e51f8b
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.803.2
diff --git a/RELEASES.md b/RELEASES.md
index c310980d..93620581 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -3769,4 +3769,14 @@ Based on:
### Generated
- [python v1.3.100] .
### Releases
-- [PyPI v1.3.100] https://pypi.org/project/openrouter/1.3.100 - .
\ No newline at end of file
+- [PyPI v1.3.100] https://pypi.org/project/openrouter/1.3.100 - .
+
+## 2026-10-30 13:17:51
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.3.101] .
+### Releases
+- [PyPI v1.3.101] https://pypi.org/project/openrouter/1.3.101 - .
\ No newline at end of file
diff --git a/docs/components/openresponsesresult.mdx b/docs/components/openresponsesresult.mdx
index d7b84c4c..07a251d1 100644
--- a/docs/components/openresponsesresult.mdx
+++ b/docs/components/openresponsesresult.mdx
@@ -44,6 +44,7 @@ Complete non-streaming response from the Responses API
| `truncation` | [OptionalNullable[components.Truncation]](../components/truncation.mdx) | ➖ | N/A | auto |
| `usage` | [OptionalNullable[components.Usage]](../components/usage.mdx) | ➖ | Token usage information for the response | \{
"cost": 0.0012,
"cost_details": \{
"upstream_inference_cost": null,
"upstream_inference_input_cost": 0.0008,
"upstream_inference_output_cost": 0.0004
},
"input_tokens": 10,
"input_tokens_details": \{
"cached_tokens": 0
},
"output_tokens": 25,
"output_tokens_details": \{
"reasoning_tokens": 0
},
"total_tokens": 35
} |
| `user` | *OptionalNullable[str]* | ➖ | N/A | |
+| `access_programs` | [OptionalNullable[components.OpenResponsesResultAccessPrograms]](../components/openresponsesresultaccessprograms.mdx) | ➖ | Access program the upstream provider reported for this response (OpenAI `access_programs`). `null` when the provider reported none, including OpenAI's implicit Standard program. | \{
"cyber": "standard"
} |
| `alignment` | [Optional[components.Alignment]](../components/alignment.mdx) | ➖ | Beta. The result of the alignment plugin for this request; the shape may change. | \{
"calls": [
\{
"call": 1,
"outcome": "allowed",
"rules": [
\{
"applicable": true,
"broken": false,
"probability": 0.04
}
]
}
]
} |
| `error_type` | [Optional[components.APIErrorType]](../components/apierrortype.mdx) | ➖ | Canonical OpenRouter error type, stable across all API formats | rate_limit_exceeded |
| `openrouter_metadata` | [Optional[components.OpenRouterMetadata]](../components/openroutermetadata.mdx) | ➖ | N/A | \{
"attempt": 1,
"endpoints": \{
"available": [
\{
"model": "openai/gpt-4o",
"provider": "OpenAI",
"selected": true
}
],
"total": 1
},
"generation_time": 2016,
"is_byok": false,
"region": "iad",
"requested": "openai/gpt-4o",
"strategy": "direct",
"summary": "available=1, selected=OpenAI"
} |
diff --git a/docs/components/openresponsesresultaccessprograms.mdx b/docs/components/openresponsesresultaccessprograms.mdx
new file mode 100644
index 00000000..70d5cd22
--- /dev/null
+++ b/docs/components/openresponsesresultaccessprograms.mdx
@@ -0,0 +1,12 @@
+---
+title: "OpenResponsesResultAccessPrograms"
+---
+
+Access program the upstream provider reported for this response (OpenAI `access_programs`). `null` when the provider reported none, including OpenAI's implicit Standard program.
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
+| `cyber` | [components.OpenResponsesResultCyber](../components/openresponsesresultcyber.mdx) | ✔️ | N/A |
\ No newline at end of file
diff --git a/docs/components/openresponsesresultcyber.mdx b/docs/components/openresponsesresultcyber.mdx
new file mode 100644
index 00000000..4ff01899
--- /dev/null
+++ b/docs/components/openresponsesresultcyber.mdx
@@ -0,0 +1,21 @@
+---
+title: "OpenResponsesResultCyber"
+---
+
+## Example Usage
+
+```python
+from openrouter.components import OpenResponsesResultCyber
+
+# Open enum: unrecognized values are captured as UnrecognizedStr
+value: OpenResponsesResultCyber = "standard"
+```
+
+
+## Values
+
+This is an open enum. Unrecognized values will not fail type checks.
+
+- `"standard"`
+- `"daybreak_blue"`
+- `"daybreak_red"`
diff --git a/docs/components/responsesrequest.mdx b/docs/components/responsesrequest.mdx
index a8ac7bc7..aed35107 100644
--- a/docs/components/responsesrequest.mdx
+++ b/docs/components/responsesrequest.mdx
@@ -7,46 +7,47 @@ Request schema for Responses endpoint
## Fields
-| Field | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `background` | *OptionalNullable[bool]* | ➖ | N/A | |
-| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../components/anthropiccachecontroldirective.mdx) | ➖ | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. | \{
"type": "ephemeral"
} |
-| `debug` | [Optional[components.ChatDebugOptions]](../components/chatdebugoptions.mdx) | ➖ | Debug options for inspecting request transformations (streaming only) | \{
"echo_upstream_body": true
} |
-| `deferred_tools` | [Optional[components.DeferredToolsControl]](../components/deferredtoolscontrol.mdx) | ➖ | Opt-in versioned router-level deferred-tool protocol. Replay assistant reasoning unchanged on continuation; keep the catalog unchanged. | \{
"profile": "portable",
"protocol": "v1",
"search": \{
"max_results": 5,
"type": "bm25"
},
"validation": "runtime"
} |
-| `frequency_penalty` | *OptionalNullable[float]* | ➖ | N/A | |
-| `image_config` | Dict[str, [components.ImageConfig](../components/imageconfig.mdx)] | ➖ | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. | \{
"aspect_ratio": "16:9",
"quality": "high"
} |
-| `include` | List[[components.ResponseIncludesEnum](../components/responseincludesenum.mdx)] | ➖ | N/A | |
-| `input` | [Optional[components.InputsUnion]](../components/inputsunion.mdx) | ➖ | Input for a response request - can be a string or array of items | [
\{
"content": "What is the weather today?",
"role": "user"
}
] |
-| `instructions` | *OptionalNullable[str]* | ➖ | N/A | |
-| `max_output_tokens` | *OptionalNullable[int]* | ➖ | N/A | |
-| `max_tool_calls` | *OptionalNullable[int]* | ➖ | Maximum number of server-tool (e.g. `openrouter:web_search`) agent steps the model may take during a request. Defaults to 30, which is also the maximum. Ignored when `stop_server_tools_when` is set. | 30 |
-| `metadata` | Dict[str, *str*] | ➖ | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | \{
"session_id": "abc-def-ghi",
"user_id": "123"
} |
-| `modalities` | List[[components.OutputModalityEnum](../components/outputmodalityenum.mdx)] | ➖ | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] |
-| `model` | *Optional[str]* | ➖ | N/A | |
-| `models` | List[*str*] | ➖ | N/A | |
-| `parallel_tool_calls` | *OptionalNullable[bool]* | ➖ | N/A | |
-| `plugins` | List[[components.ResponsesRequestPlugin](../components/responsesrequestplugin.mdx)] | ➖ | Plugins you want to enable for this request, including their settings. | |
-| `presence_penalty` | *OptionalNullable[float]* | ➖ | N/A | |
-| `previous_response_id` | *Optional[Any]* | ➖ | Not supported on this proxy. Each response request is independent: no responses are stored, so a previous response cannot be referenced. Requests with a non-null value are rejected with a 400 error. Send the full conversation history in `input` instead. | |
-| `prompt` | [OptionalNullable[components.StoredPromptTemplate]](../components/storedprompttemplate.mdx) | ➖ | N/A | \{
"id": "prompt-abc123",
"variables": \{
"name": "John"
}
} |
-| `prompt_cache_key` | *OptionalNullable[str]* | ➖ | N/A | |
-| `prompt_cache_options` | [OptionalNullable[components.PromptCacheOptions]](../components/promptcacheoptions.mdx) | ➖ | Request-level prompt-cache controls. `mode: "explicit"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. `ttl` sets the minimum cache lifetime for every breakpoint the request writes: "30m" (default) or "12h" (billed at the higher 12h cache-write rate). Only supported by OpenAI GPT-5.6 and newer. | \{
"mode": "explicit",
"ttl": "30m"
} |
-| `provider` | [OptionalNullable[components.ProviderPreferences]](../components/providerpreferences.mdx) | ➖ | When multiple model providers are available, optionally indicate your routing preference. | \{
"allow_fallbacks": true
} |
-| `reasoning` | [OptionalNullable[components.ReasoningConfig]](../components/reasoningconfig.mdx) | ➖ | Configuration for reasoning mode in the response | \{
"enabled": true,
"summary": "auto"
} |
-| `safety_identifier` | *OptionalNullable[str]* | ➖ | Recommended per-end-user identifier for abuse isolation. Use a stable ID, hash, or pseudonym. When a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards it raw. If omitted, requests use an account-level identity, so provider policy blocks can affect the whole account. | user-123 |
-| `service_tier` | [OptionalNullable[components.ResponsesRequestServiceTier]](../components/responsesrequestservicetier.mdx) | ➖ | The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints. | |
-| `session_id` | *Optional[str]* | ➖ | A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | |
-| `stop` | [OptionalNullable[components.ResponsesRequestStop]](../components/responsesrequeststop.mdx) | ➖ | Stop sequences (up to 4) | [
"\n"
] |
-| `stop_server_tools_when` | List[[components.StopServerToolsWhenCondition](../components/stopservertoolswhencondition.mdx)] | ➖ | Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. When a condition fires while the model is still emitting tool calls, the pending tool calls are executed and one final turn is made with tool calls disabled so the response ends with a natural-language answer instead of an unfinished tool call. | [
\{
"step_count": 5,
"type": "step_count_is"
},
\{
"max_cost_in_dollars": 0.5,
"type": "max_cost"
}
] |
-| `store` | *Optional[Literal[False]]* | ➖ | N/A | |
-| `stream` | *Optional[bool]* | ➖ | N/A | |
-| `temperature` | *OptionalNullable[float]* | ➖ | N/A | |
-| `text` | [Optional[components.TextExtendedConfig]](../components/textextendedconfig.mdx) | ➖ | Text output configuration including format and verbosity | \{
"format": \{
"type": "text"
}
} |
-| `tool_choice` | [Optional[components.OpenAIResponsesToolChoiceUnion]](../components/openairesponsestoolchoiceunion.mdx) | ➖ | N/A | auto |
-| `tools` | List[[components.ResponsesRequestToolUnion](../components/responsesrequesttoolunion.mdx)] | ➖ | N/A | |
-| `top_k` | *Optional[int]* | ➖ | N/A | |
-| `top_logprobs` | *OptionalNullable[int]* | ➖ | N/A | |
-| `top_p` | *OptionalNullable[float]* | ➖ | N/A | |
-| `trace` | [Optional[components.TraceConfig]](../components/traceconfig.mdx) | ➖ | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | \{
"trace_id": "trace-abc123",
"trace_name": "my-app-trace"
} |
-| `truncation` | [OptionalNullable[components.OpenAIResponsesTruncation]](../components/openairesponsestruncation.mdx) | ➖ | N/A | auto |
-| `user` | *Optional[str]* | ➖ | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. | |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `access_programs` | [Optional[components.ResponsesRequestAccessPrograms]](../components/responsesrequestaccessprograms.mdx) | ➖ | OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program. | \{
"cyber": "standard"
} |
+| `background` | *OptionalNullable[bool]* | ➖ | N/A | |
+| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../components/anthropiccachecontroldirective.mdx) | ➖ | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. | \{
"type": "ephemeral"
} |
+| `debug` | [Optional[components.ChatDebugOptions]](../components/chatdebugoptions.mdx) | ➖ | Debug options for inspecting request transformations (streaming only) | \{
"echo_upstream_body": true
} |
+| `deferred_tools` | [Optional[components.DeferredToolsControl]](../components/deferredtoolscontrol.mdx) | ➖ | Opt-in versioned router-level deferred-tool protocol. Replay assistant reasoning unchanged on continuation; keep the catalog unchanged. | \{
"profile": "portable",
"protocol": "v1",
"search": \{
"max_results": 5,
"type": "bm25"
},
"validation": "runtime"
} |
+| `frequency_penalty` | *OptionalNullable[float]* | ➖ | N/A | |
+| `image_config` | Dict[str, [components.ImageConfig](../components/imageconfig.mdx)] | ➖ | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. | \{
"aspect_ratio": "16:9",
"quality": "high"
} |
+| `include` | List[[components.ResponseIncludesEnum](../components/responseincludesenum.mdx)] | ➖ | N/A | |
+| `input` | [Optional[components.InputsUnion]](../components/inputsunion.mdx) | ➖ | Input for a response request - can be a string or array of items | [
\{
"content": "What is the weather today?",
"role": "user"
}
] |
+| `instructions` | *OptionalNullable[str]* | ➖ | N/A | |
+| `max_output_tokens` | *OptionalNullable[int]* | ➖ | N/A | |
+| `max_tool_calls` | *OptionalNullable[int]* | ➖ | Maximum number of server-tool (e.g. `openrouter:web_search`) agent steps the model may take during a request. Defaults to 30, which is also the maximum. Ignored when `stop_server_tools_when` is set. | 30 |
+| `metadata` | Dict[str, *str*] | ➖ | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | \{
"session_id": "abc-def-ghi",
"user_id": "123"
} |
+| `modalities` | List[[components.OutputModalityEnum](../components/outputmodalityenum.mdx)] | ➖ | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] |
+| `model` | *Optional[str]* | ➖ | N/A | |
+| `models` | List[*str*] | ➖ | N/A | |
+| `parallel_tool_calls` | *OptionalNullable[bool]* | ➖ | N/A | |
+| `plugins` | List[[components.ResponsesRequestPlugin](../components/responsesrequestplugin.mdx)] | ➖ | Plugins you want to enable for this request, including their settings. | |
+| `presence_penalty` | *OptionalNullable[float]* | ➖ | N/A | |
+| `previous_response_id` | *Optional[Any]* | ➖ | Not supported on this proxy. Each response request is independent: no responses are stored, so a previous response cannot be referenced. Requests with a non-null value are rejected with a 400 error. Send the full conversation history in `input` instead. | |
+| `prompt` | [OptionalNullable[components.StoredPromptTemplate]](../components/storedprompttemplate.mdx) | ➖ | N/A | \{
"id": "prompt-abc123",
"variables": \{
"name": "John"
}
} |
+| `prompt_cache_key` | *OptionalNullable[str]* | ➖ | N/A | |
+| `prompt_cache_options` | [OptionalNullable[components.PromptCacheOptions]](../components/promptcacheoptions.mdx) | ➖ | Request-level prompt-cache controls. `mode: "explicit"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. `ttl` sets the minimum cache lifetime for every breakpoint the request writes: "30m" (default) or "12h" (billed at the higher 12h cache-write rate). Only supported by OpenAI GPT-5.6 and newer. | \{
"mode": "explicit",
"ttl": "30m"
} |
+| `provider` | [OptionalNullable[components.ProviderPreferences]](../components/providerpreferences.mdx) | ➖ | When multiple model providers are available, optionally indicate your routing preference. | \{
"allow_fallbacks": true
} |
+| `reasoning` | [OptionalNullable[components.ReasoningConfig]](../components/reasoningconfig.mdx) | ➖ | Configuration for reasoning mode in the response | \{
"enabled": true,
"summary": "auto"
} |
+| `safety_identifier` | *OptionalNullable[str]* | ➖ | Recommended per-end-user identifier for abuse isolation. Use a stable ID, hash, or pseudonym. When a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards it raw. If omitted, requests use an account-level identity, so provider policy blocks can affect the whole account. | user-123 |
+| `service_tier` | [OptionalNullable[components.ResponsesRequestServiceTier]](../components/responsesrequestservicetier.mdx) | ➖ | The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints. | |
+| `session_id` | *Optional[str]* | ➖ | A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | |
+| `stop` | [OptionalNullable[components.ResponsesRequestStop]](../components/responsesrequeststop.mdx) | ➖ | Stop sequences (up to 4) | [
"\n"
] |
+| `stop_server_tools_when` | List[[components.StopServerToolsWhenCondition](../components/stopservertoolswhencondition.mdx)] | ➖ | Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. When a condition fires while the model is still emitting tool calls, the pending tool calls are executed and one final turn is made with tool calls disabled so the response ends with a natural-language answer instead of an unfinished tool call. | [
\{
"step_count": 5,
"type": "step_count_is"
},
\{
"max_cost_in_dollars": 0.5,
"type": "max_cost"
}
] |
+| `store` | *Optional[Literal[False]]* | ➖ | N/A | |
+| `stream` | *Optional[bool]* | ➖ | N/A | |
+| `temperature` | *OptionalNullable[float]* | ➖ | N/A | |
+| `text` | [Optional[components.TextExtendedConfig]](../components/textextendedconfig.mdx) | ➖ | Text output configuration including format and verbosity | \{
"format": \{
"type": "text"
}
} |
+| `tool_choice` | [Optional[components.OpenAIResponsesToolChoiceUnion]](../components/openairesponsestoolchoiceunion.mdx) | ➖ | N/A | auto |
+| `tools` | List[[components.ResponsesRequestToolUnion](../components/responsesrequesttoolunion.mdx)] | ➖ | N/A | |
+| `top_k` | *Optional[int]* | ➖ | N/A | |
+| `top_logprobs` | *OptionalNullable[int]* | ➖ | N/A | |
+| `top_p` | *OptionalNullable[float]* | ➖ | N/A | |
+| `trace` | [Optional[components.TraceConfig]](../components/traceconfig.mdx) | ➖ | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | \{
"trace_id": "trace-abc123",
"trace_name": "my-app-trace"
} |
+| `truncation` | [OptionalNullable[components.OpenAIResponsesTruncation]](../components/openairesponsestruncation.mdx) | ➖ | N/A | auto |
+| `user` | *Optional[str]* | ➖ | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. | |
\ No newline at end of file
diff --git a/docs/components/responsesrequestaccessprograms.mdx b/docs/components/responsesrequestaccessprograms.mdx
new file mode 100644
index 00000000..92c40984
--- /dev/null
+++ b/docs/components/responsesrequestaccessprograms.mdx
@@ -0,0 +1,12 @@
+---
+title: "ResponsesRequestAccessPrograms"
+---
+
+OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
+| `cyber` | [Optional[components.ResponsesRequestCyber]](../components/responsesrequestcyber.mdx) | ➖ | N/A |
\ No newline at end of file
diff --git a/docs/components/responsesrequestcyber.mdx b/docs/components/responsesrequestcyber.mdx
new file mode 100644
index 00000000..8a39349e
--- /dev/null
+++ b/docs/components/responsesrequestcyber.mdx
@@ -0,0 +1,21 @@
+---
+title: "ResponsesRequestCyber"
+---
+
+## Example Usage
+
+```python
+from openrouter.components import ResponsesRequestCyber
+
+# Open enum: unrecognized values are captured as UnrecognizedStr
+value: ResponsesRequestCyber = "standard"
+```
+
+
+## Values
+
+This is an open enum. Unrecognized values will not fail type checks.
+
+- `"standard"`
+- `"daybreak_blue"`
+- `"daybreak_red"`
diff --git a/docs/sdks/betaresponses/README.mdx b/docs/sdks/betaresponses/README.mdx
index 2641add7..602c654e 100644
--- a/docs/sdks/betaresponses/README.mdx
+++ b/docs/sdks/betaresponses/README.mdx
@@ -62,53 +62,54 @@ with OpenRouter(
### Parameters
-| Parameter | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
-| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `x_open_router_metadata` | [Optional[components.MetadataLevel]](../../components/metadatalevel.mdx) | ➖ | Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility. | enabled |
-| `background` | *OptionalNullable[bool]* | ➖ | N/A | |
-| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../../components/anthropiccachecontroldirective.mdx) | ➖ | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. | \{
"type": "ephemeral"
} |
-| `debug` | [Optional[components.ChatDebugOptions]](../../components/chatdebugoptions.mdx) | ➖ | Debug options for inspecting request transformations (streaming only) | \{
"echo_upstream_body": true
} |
-| `deferred_tools` | [Optional[components.DeferredToolsControl]](../../components/deferredtoolscontrol.mdx) | ➖ | Opt-in versioned router-level deferred-tool protocol. Replay assistant reasoning unchanged on continuation; keep the catalog unchanged. | \{
"profile": "portable",
"protocol": "v1",
"search": \{
"max_results": 5,
"type": "bm25"
},
"validation": "runtime"
} |
-| `frequency_penalty` | *OptionalNullable[float]* | ➖ | N/A | |
-| `image_config` | Dict[str, [components.ImageConfig](../../components/imageconfig.mdx)] | ➖ | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. | \{
"aspect_ratio": "16:9",
"quality": "high"
} |
-| `include` | List[[components.ResponseIncludesEnum](../../components/responseincludesenum.mdx)] | ➖ | N/A | |
-| `input` | [Optional[components.InputsUnion]](../../components/inputsunion.mdx) | ➖ | Input for a response request - can be a string or array of items | [
\{
"content": "What is the weather today?",
"role": "user"
}
] |
-| `instructions` | *OptionalNullable[str]* | ➖ | N/A | |
-| `max_output_tokens` | *OptionalNullable[int]* | ➖ | N/A | |
-| `max_tool_calls` | *OptionalNullable[int]* | ➖ | Maximum number of server-tool (e.g. `openrouter:web_search`) agent steps the model may take during a request. Defaults to 30, which is also the maximum. Ignored when `stop_server_tools_when` is set. | 30 |
-| `metadata` | Dict[str, *str*] | ➖ | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | \{
"session_id": "abc-def-ghi",
"user_id": "123"
} |
-| `modalities` | List[[components.OutputModalityEnum](../../components/outputmodalityenum.mdx)] | ➖ | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] |
-| `model` | *Optional[str]* | ➖ | N/A | |
-| `models` | List[*str*] | ➖ | N/A | |
-| `parallel_tool_calls` | *OptionalNullable[bool]* | ➖ | N/A | |
-| `plugins` | List[[components.ResponsesRequestPlugin](../../components/responsesrequestplugin.mdx)] | ➖ | Plugins you want to enable for this request, including their settings. | |
-| `presence_penalty` | *OptionalNullable[float]* | ➖ | N/A | |
-| `previous_response_id` | *Optional[Any]* | ➖ | Not supported on this proxy. Each response request is independent: no responses are stored, so a previous response cannot be referenced. Requests with a non-null value are rejected with a 400 error. Send the full conversation history in `input` instead. | |
-| `prompt` | [OptionalNullable[components.StoredPromptTemplate]](../../components/storedprompttemplate.mdx) | ➖ | N/A | \{
"id": "prompt-abc123",
"variables": \{
"name": "John"
}
} |
-| `prompt_cache_key` | *OptionalNullable[str]* | ➖ | N/A | |
-| `prompt_cache_options` | [OptionalNullable[components.PromptCacheOptions]](../../components/promptcacheoptions.mdx) | ➖ | Request-level prompt-cache controls. `mode: "explicit"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. `ttl` sets the minimum cache lifetime for every breakpoint the request writes: "30m" (default) or "12h" (billed at the higher 12h cache-write rate). Only supported by OpenAI GPT-5.6 and newer. | \{
"mode": "explicit",
"ttl": "30m"
} |
-| `provider` | [OptionalNullable[components.ProviderPreferences]](../../components/providerpreferences.mdx) | ➖ | When multiple model providers are available, optionally indicate your routing preference. | \{
"allow_fallbacks": true
} |
-| `reasoning` | [OptionalNullable[components.ReasoningConfig]](../../components/reasoningconfig.mdx) | ➖ | Configuration for reasoning mode in the response | \{
"enabled": true,
"summary": "auto"
} |
-| `safety_identifier` | *OptionalNullable[str]* | ➖ | Recommended per-end-user identifier for abuse isolation. Use a stable ID, hash, or pseudonym. When a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards it raw. If omitted, requests use an account-level identity, so provider policy blocks can affect the whole account. | user-123 |
-| `service_tier` | [OptionalNullable[components.ResponsesRequestServiceTier]](../../components/responsesrequestservicetier.mdx) | ➖ | The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints. | |
-| `session_id` | *Optional[str]* | ➖ | A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | |
-| `stop` | [OptionalNullable[components.ResponsesRequestStop]](../../components/responsesrequeststop.mdx) | ➖ | Stop sequences (up to 4) | [
"\n"
] |
-| `stop_server_tools_when` | List[[components.StopServerToolsWhenCondition](../../components/stopservertoolswhencondition.mdx)] | ➖ | Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. When a condition fires while the model is still emitting tool calls, the pending tool calls are executed and one final turn is made with tool calls disabled so the response ends with a natural-language answer instead of an unfinished tool call. | [
\{
"step_count": 5,
"type": "step_count_is"
},
\{
"max_cost_in_dollars": 0.5,
"type": "max_cost"
}
] |
-| `stream` | *Optional[bool]* | ➖ | N/A | |
-| `temperature` | *OptionalNullable[float]* | ➖ | N/A | |
-| `text` | [Optional[components.TextExtendedConfig]](../../components/textextendedconfig.mdx) | ➖ | Text output configuration including format and verbosity | \{
"format": \{
"type": "text"
}
} |
-| `tool_choice` | [Optional[components.OpenAIResponsesToolChoiceUnion]](../../components/openairesponsestoolchoiceunion.mdx) | ➖ | N/A | auto |
-| `tools` | List[[components.ResponsesRequestToolUnion](../../components/responsesrequesttoolunion.mdx)] | ➖ | N/A | |
-| `top_k` | *Optional[int]* | ➖ | N/A | |
-| `top_logprobs` | *OptionalNullable[int]* | ➖ | N/A | |
-| `top_p` | *OptionalNullable[float]* | ➖ | N/A | |
-| `trace` | [Optional[components.TraceConfig]](../../components/traceconfig.mdx) | ➖ | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | \{
"trace_id": "trace-abc123",
"trace_name": "my-app-trace"
} |
-| `truncation` | [OptionalNullable[components.OpenAIResponsesTruncation]](../../components/openairesponsestruncation.mdx) | ➖ | N/A | auto |
-| `user` | *Optional[str]* | ➖ | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. | |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | |
+| Parameter | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
+| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `x_open_router_metadata` | [Optional[components.MetadataLevel]](../../components/metadatalevel.mdx) | ➖ | Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility. | enabled |
+| `access_programs` | [Optional[components.ResponsesRequestAccessPrograms]](../../components/responsesrequestaccessprograms.mdx) | ➖ | OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program. | \{
"cyber": "standard"
} |
+| `background` | *OptionalNullable[bool]* | ➖ | N/A | |
+| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../../components/anthropiccachecontroldirective.mdx) | ➖ | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. | \{
"type": "ephemeral"
} |
+| `debug` | [Optional[components.ChatDebugOptions]](../../components/chatdebugoptions.mdx) | ➖ | Debug options for inspecting request transformations (streaming only) | \{
"echo_upstream_body": true
} |
+| `deferred_tools` | [Optional[components.DeferredToolsControl]](../../components/deferredtoolscontrol.mdx) | ➖ | Opt-in versioned router-level deferred-tool protocol. Replay assistant reasoning unchanged on continuation; keep the catalog unchanged. | \{
"profile": "portable",
"protocol": "v1",
"search": \{
"max_results": 5,
"type": "bm25"
},
"validation": "runtime"
} |
+| `frequency_penalty` | *OptionalNullable[float]* | ➖ | N/A | |
+| `image_config` | Dict[str, [components.ImageConfig](../../components/imageconfig.mdx)] | ➖ | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. | \{
"aspect_ratio": "16:9",
"quality": "high"
} |
+| `include` | List[[components.ResponseIncludesEnum](../../components/responseincludesenum.mdx)] | ➖ | N/A | |
+| `input` | [Optional[components.InputsUnion]](../../components/inputsunion.mdx) | ➖ | Input for a response request - can be a string or array of items | [
\{
"content": "What is the weather today?",
"role": "user"
}
] |
+| `instructions` | *OptionalNullable[str]* | ➖ | N/A | |
+| `max_output_tokens` | *OptionalNullable[int]* | ➖ | N/A | |
+| `max_tool_calls` | *OptionalNullable[int]* | ➖ | Maximum number of server-tool (e.g. `openrouter:web_search`) agent steps the model may take during a request. Defaults to 30, which is also the maximum. Ignored when `stop_server_tools_when` is set. | 30 |
+| `metadata` | Dict[str, *str*] | ➖ | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | \{
"session_id": "abc-def-ghi",
"user_id": "123"
} |
+| `modalities` | List[[components.OutputModalityEnum](../../components/outputmodalityenum.mdx)] | ➖ | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] |
+| `model` | *Optional[str]* | ➖ | N/A | |
+| `models` | List[*str*] | ➖ | N/A | |
+| `parallel_tool_calls` | *OptionalNullable[bool]* | ➖ | N/A | |
+| `plugins` | List[[components.ResponsesRequestPlugin](../../components/responsesrequestplugin.mdx)] | ➖ | Plugins you want to enable for this request, including their settings. | |
+| `presence_penalty` | *OptionalNullable[float]* | ➖ | N/A | |
+| `previous_response_id` | *Optional[Any]* | ➖ | Not supported on this proxy. Each response request is independent: no responses are stored, so a previous response cannot be referenced. Requests with a non-null value are rejected with a 400 error. Send the full conversation history in `input` instead. | |
+| `prompt` | [OptionalNullable[components.StoredPromptTemplate]](../../components/storedprompttemplate.mdx) | ➖ | N/A | \{
"id": "prompt-abc123",
"variables": \{
"name": "John"
}
} |
+| `prompt_cache_key` | *OptionalNullable[str]* | ➖ | N/A | |
+| `prompt_cache_options` | [OptionalNullable[components.PromptCacheOptions]](../../components/promptcacheoptions.mdx) | ➖ | Request-level prompt-cache controls. `mode: "explicit"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. `ttl` sets the minimum cache lifetime for every breakpoint the request writes: "30m" (default) or "12h" (billed at the higher 12h cache-write rate). Only supported by OpenAI GPT-5.6 and newer. | \{
"mode": "explicit",
"ttl": "30m"
} |
+| `provider` | [OptionalNullable[components.ProviderPreferences]](../../components/providerpreferences.mdx) | ➖ | When multiple model providers are available, optionally indicate your routing preference. | \{
"allow_fallbacks": true
} |
+| `reasoning` | [OptionalNullable[components.ReasoningConfig]](../../components/reasoningconfig.mdx) | ➖ | Configuration for reasoning mode in the response | \{
"enabled": true,
"summary": "auto"
} |
+| `safety_identifier` | *OptionalNullable[str]* | ➖ | Recommended per-end-user identifier for abuse isolation. Use a stable ID, hash, or pseudonym. When a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards it raw. If omitted, requests use an account-level identity, so provider policy blocks can affect the whole account. | user-123 |
+| `service_tier` | [OptionalNullable[components.ResponsesRequestServiceTier]](../../components/responsesrequestservicetier.mdx) | ➖ | The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints. | |
+| `session_id` | *Optional[str]* | ➖ | A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | |
+| `stop` | [OptionalNullable[components.ResponsesRequestStop]](../../components/responsesrequeststop.mdx) | ➖ | Stop sequences (up to 4) | [
"\n"
] |
+| `stop_server_tools_when` | List[[components.StopServerToolsWhenCondition](../../components/stopservertoolswhencondition.mdx)] | ➖ | Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. When a condition fires while the model is still emitting tool calls, the pending tool calls are executed and one final turn is made with tool calls disabled so the response ends with a natural-language answer instead of an unfinished tool call. | [
\{
"step_count": 5,
"type": "step_count_is"
},
\{
"max_cost_in_dollars": 0.5,
"type": "max_cost"
}
] |
+| `stream` | *Optional[bool]* | ➖ | N/A | |
+| `temperature` | *OptionalNullable[float]* | ➖ | N/A | |
+| `text` | [Optional[components.TextExtendedConfig]](../../components/textextendedconfig.mdx) | ➖ | Text output configuration including format and verbosity | \{
"format": \{
"type": "text"
}
} |
+| `tool_choice` | [Optional[components.OpenAIResponsesToolChoiceUnion]](../../components/openairesponsestoolchoiceunion.mdx) | ➖ | N/A | auto |
+| `tools` | List[[components.ResponsesRequestToolUnion](../../components/responsesrequesttoolunion.mdx)] | ➖ | N/A | |
+| `top_k` | *Optional[int]* | ➖ | N/A | |
+| `top_logprobs` | *OptionalNullable[int]* | ➖ | N/A | |
+| `top_p` | *OptionalNullable[float]* | ➖ | N/A | |
+| `trace` | [Optional[components.TraceConfig]](../../components/traceconfig.mdx) | ➖ | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | \{
"trace_id": "trace-abc123",
"trace_name": "my-app-trace"
} |
+| `truncation` | [OptionalNullable[components.OpenAIResponsesTruncation]](../../components/openairesponsestruncation.mdx) | ➖ | N/A | auto |
+| `user` | *Optional[str]* | ➖ | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. | |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | |
### Response
diff --git a/docs/sdks/presets/README.mdx b/docs/sdks/presets/README.mdx
index e442eccc..10dbc7da 100644
--- a/docs/sdks/presets/README.mdx
+++ b/docs/sdks/presets/README.mdx
@@ -334,53 +334,54 @@ with OpenRouter(
### Parameters
-| Parameter | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `slug` | *str* | ✔️ | URL-safe slug identifying the preset. Created if it does not exist. | my-preset |
-| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
-| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `background` | *OptionalNullable[bool]* | ➖ | N/A | |
-| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../../components/anthropiccachecontroldirective.mdx) | ➖ | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. | \{
"type": "ephemeral"
} |
-| `debug` | [Optional[components.ChatDebugOptions]](../../components/chatdebugoptions.mdx) | ➖ | Debug options for inspecting request transformations (streaming only) | \{
"echo_upstream_body": true
} |
-| `deferred_tools` | [Optional[components.DeferredToolsControl]](../../components/deferredtoolscontrol.mdx) | ➖ | Opt-in versioned router-level deferred-tool protocol. Replay assistant reasoning unchanged on continuation; keep the catalog unchanged. | \{
"profile": "portable",
"protocol": "v1",
"search": \{
"max_results": 5,
"type": "bm25"
},
"validation": "runtime"
} |
-| `frequency_penalty` | *OptionalNullable[float]* | ➖ | N/A | |
-| `image_config` | Dict[str, [components.ImageConfig](../../components/imageconfig.mdx)] | ➖ | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. | \{
"aspect_ratio": "16:9",
"quality": "high"
} |
-| `include` | List[[components.ResponseIncludesEnum](../../components/responseincludesenum.mdx)] | ➖ | N/A | |
-| `input` | [Optional[components.InputsUnion]](../../components/inputsunion.mdx) | ➖ | Input for a response request - can be a string or array of items | [
\{
"content": "What is the weather today?",
"role": "user"
}
] |
-| `instructions` | *OptionalNullable[str]* | ➖ | N/A | |
-| `max_output_tokens` | *OptionalNullable[int]* | ➖ | N/A | |
-| `max_tool_calls` | *OptionalNullable[int]* | ➖ | Maximum number of server-tool (e.g. `openrouter:web_search`) agent steps the model may take during a request. Defaults to 30, which is also the maximum. Ignored when `stop_server_tools_when` is set. | 30 |
-| `metadata` | Dict[str, *str*] | ➖ | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | \{
"session_id": "abc-def-ghi",
"user_id": "123"
} |
-| `modalities` | List[[components.OutputModalityEnum](../../components/outputmodalityenum.mdx)] | ➖ | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] |
-| `model` | *Optional[str]* | ➖ | N/A | |
-| `models` | List[*str*] | ➖ | N/A | |
-| `parallel_tool_calls` | *OptionalNullable[bool]* | ➖ | N/A | |
-| `plugins` | List[[components.ResponsesRequestPlugin](../../components/responsesrequestplugin.mdx)] | ➖ | Plugins you want to enable for this request, including their settings. | |
-| `presence_penalty` | *OptionalNullable[float]* | ➖ | N/A | |
-| `previous_response_id` | *Optional[Any]* | ➖ | Not supported on this proxy. Each response request is independent: no responses are stored, so a previous response cannot be referenced. Requests with a non-null value are rejected with a 400 error. Send the full conversation history in `input` instead. | |
-| `prompt` | [OptionalNullable[components.StoredPromptTemplate]](../../components/storedprompttemplate.mdx) | ➖ | N/A | \{
"id": "prompt-abc123",
"variables": \{
"name": "John"
}
} |
-| `prompt_cache_key` | *OptionalNullable[str]* | ➖ | N/A | |
-| `prompt_cache_options` | [OptionalNullable[components.PromptCacheOptions]](../../components/promptcacheoptions.mdx) | ➖ | Request-level prompt-cache controls. `mode: "explicit"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. `ttl` sets the minimum cache lifetime for every breakpoint the request writes: "30m" (default) or "12h" (billed at the higher 12h cache-write rate). Only supported by OpenAI GPT-5.6 and newer. | \{
"mode": "explicit",
"ttl": "30m"
} |
-| `provider` | [OptionalNullable[components.ProviderPreferences]](../../components/providerpreferences.mdx) | ➖ | When multiple model providers are available, optionally indicate your routing preference. | \{
"allow_fallbacks": true
} |
-| `reasoning` | [OptionalNullable[components.ReasoningConfig]](../../components/reasoningconfig.mdx) | ➖ | Configuration for reasoning mode in the response | \{
"enabled": true,
"summary": "auto"
} |
-| `safety_identifier` | *OptionalNullable[str]* | ➖ | Recommended per-end-user identifier for abuse isolation. Use a stable ID, hash, or pseudonym. When a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards it raw. If omitted, requests use an account-level identity, so provider policy blocks can affect the whole account. | user-123 |
-| `service_tier` | [OptionalNullable[components.ResponsesRequestServiceTier]](../../components/responsesrequestservicetier.mdx) | ➖ | The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints. | |
-| `session_id` | *Optional[str]* | ➖ | A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | |
-| `stop` | [OptionalNullable[components.ResponsesRequestStop]](../../components/responsesrequeststop.mdx) | ➖ | Stop sequences (up to 4) | [
"\n"
] |
-| `stop_server_tools_when` | List[[components.StopServerToolsWhenCondition](../../components/stopservertoolswhencondition.mdx)] | ➖ | Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. When a condition fires while the model is still emitting tool calls, the pending tool calls are executed and one final turn is made with tool calls disabled so the response ends with a natural-language answer instead of an unfinished tool call. | [
\{
"step_count": 5,
"type": "step_count_is"
},
\{
"max_cost_in_dollars": 0.5,
"type": "max_cost"
}
] |
-| `stream` | *Optional[bool]* | ➖ | N/A | |
-| `temperature` | *OptionalNullable[float]* | ➖ | N/A | |
-| `text` | [Optional[components.TextExtendedConfig]](../../components/textextendedconfig.mdx) | ➖ | Text output configuration including format and verbosity | \{
"format": \{
"type": "text"
}
} |
-| `tool_choice` | [Optional[components.OpenAIResponsesToolChoiceUnion]](../../components/openairesponsestoolchoiceunion.mdx) | ➖ | N/A | auto |
-| `tools` | List[[components.ResponsesRequestToolUnion](../../components/responsesrequesttoolunion.mdx)] | ➖ | N/A | |
-| `top_k` | *Optional[int]* | ➖ | N/A | |
-| `top_logprobs` | *OptionalNullable[int]* | ➖ | N/A | |
-| `top_p` | *OptionalNullable[float]* | ➖ | N/A | |
-| `trace` | [Optional[components.TraceConfig]](../../components/traceconfig.mdx) | ➖ | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | \{
"trace_id": "trace-abc123",
"trace_name": "my-app-trace"
} |
-| `truncation` | [OptionalNullable[components.OpenAIResponsesTruncation]](../../components/openairesponsestruncation.mdx) | ➖ | N/A | auto |
-| `user` | *Optional[str]* | ➖ | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. | |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | |
+| Parameter | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `slug` | *str* | ✔️ | URL-safe slug identifying the preset. Created if it does not exist. | my-preset |
+| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
+| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `access_programs` | [Optional[components.ResponsesRequestAccessPrograms]](../../components/responsesrequestaccessprograms.mdx) | ➖ | OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program. | \{
"cyber": "standard"
} |
+| `background` | *OptionalNullable[bool]* | ➖ | N/A | |
+| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../../components/anthropiccachecontroldirective.mdx) | ➖ | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. | \{
"type": "ephemeral"
} |
+| `debug` | [Optional[components.ChatDebugOptions]](../../components/chatdebugoptions.mdx) | ➖ | Debug options for inspecting request transformations (streaming only) | \{
"echo_upstream_body": true
} |
+| `deferred_tools` | [Optional[components.DeferredToolsControl]](../../components/deferredtoolscontrol.mdx) | ➖ | Opt-in versioned router-level deferred-tool protocol. Replay assistant reasoning unchanged on continuation; keep the catalog unchanged. | \{
"profile": "portable",
"protocol": "v1",
"search": \{
"max_results": 5,
"type": "bm25"
},
"validation": "runtime"
} |
+| `frequency_penalty` | *OptionalNullable[float]* | ➖ | N/A | |
+| `image_config` | Dict[str, [components.ImageConfig](../../components/imageconfig.mdx)] | ➖ | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. | \{
"aspect_ratio": "16:9",
"quality": "high"
} |
+| `include` | List[[components.ResponseIncludesEnum](../../components/responseincludesenum.mdx)] | ➖ | N/A | |
+| `input` | [Optional[components.InputsUnion]](../../components/inputsunion.mdx) | ➖ | Input for a response request - can be a string or array of items | [
\{
"content": "What is the weather today?",
"role": "user"
}
] |
+| `instructions` | *OptionalNullable[str]* | ➖ | N/A | |
+| `max_output_tokens` | *OptionalNullable[int]* | ➖ | N/A | |
+| `max_tool_calls` | *OptionalNullable[int]* | ➖ | Maximum number of server-tool (e.g. `openrouter:web_search`) agent steps the model may take during a request. Defaults to 30, which is also the maximum. Ignored when `stop_server_tools_when` is set. | 30 |
+| `metadata` | Dict[str, *str*] | ➖ | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | \{
"session_id": "abc-def-ghi",
"user_id": "123"
} |
+| `modalities` | List[[components.OutputModalityEnum](../../components/outputmodalityenum.mdx)] | ➖ | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] |
+| `model` | *Optional[str]* | ➖ | N/A | |
+| `models` | List[*str*] | ➖ | N/A | |
+| `parallel_tool_calls` | *OptionalNullable[bool]* | ➖ | N/A | |
+| `plugins` | List[[components.ResponsesRequestPlugin](../../components/responsesrequestplugin.mdx)] | ➖ | Plugins you want to enable for this request, including their settings. | |
+| `presence_penalty` | *OptionalNullable[float]* | ➖ | N/A | |
+| `previous_response_id` | *Optional[Any]* | ➖ | Not supported on this proxy. Each response request is independent: no responses are stored, so a previous response cannot be referenced. Requests with a non-null value are rejected with a 400 error. Send the full conversation history in `input` instead. | |
+| `prompt` | [OptionalNullable[components.StoredPromptTemplate]](../../components/storedprompttemplate.mdx) | ➖ | N/A | \{
"id": "prompt-abc123",
"variables": \{
"name": "John"
}
} |
+| `prompt_cache_key` | *OptionalNullable[str]* | ➖ | N/A | |
+| `prompt_cache_options` | [OptionalNullable[components.PromptCacheOptions]](../../components/promptcacheoptions.mdx) | ➖ | Request-level prompt-cache controls. `mode: "explicit"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. `ttl` sets the minimum cache lifetime for every breakpoint the request writes: "30m" (default) or "12h" (billed at the higher 12h cache-write rate). Only supported by OpenAI GPT-5.6 and newer. | \{
"mode": "explicit",
"ttl": "30m"
} |
+| `provider` | [OptionalNullable[components.ProviderPreferences]](../../components/providerpreferences.mdx) | ➖ | When multiple model providers are available, optionally indicate your routing preference. | \{
"allow_fallbacks": true
} |
+| `reasoning` | [OptionalNullable[components.ReasoningConfig]](../../components/reasoningconfig.mdx) | ➖ | Configuration for reasoning mode in the response | \{
"enabled": true,
"summary": "auto"
} |
+| `safety_identifier` | *OptionalNullable[str]* | ➖ | Recommended per-end-user identifier for abuse isolation. Use a stable ID, hash, or pseudonym. When a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards it raw. If omitted, requests use an account-level identity, so provider policy blocks can affect the whole account. | user-123 |
+| `service_tier` | [OptionalNullable[components.ResponsesRequestServiceTier]](../../components/responsesrequestservicetier.mdx) | ➖ | The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints. | |
+| `session_id` | *Optional[str]* | ➖ | A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | |
+| `stop` | [OptionalNullable[components.ResponsesRequestStop]](../../components/responsesrequeststop.mdx) | ➖ | Stop sequences (up to 4) | [
"\n"
] |
+| `stop_server_tools_when` | List[[components.StopServerToolsWhenCondition](../../components/stopservertoolswhencondition.mdx)] | ➖ | Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. When a condition fires while the model is still emitting tool calls, the pending tool calls are executed and one final turn is made with tool calls disabled so the response ends with a natural-language answer instead of an unfinished tool call. | [
\{
"step_count": 5,
"type": "step_count_is"
},
\{
"max_cost_in_dollars": 0.5,
"type": "max_cost"
}
] |
+| `stream` | *Optional[bool]* | ➖ | N/A | |
+| `temperature` | *OptionalNullable[float]* | ➖ | N/A | |
+| `text` | [Optional[components.TextExtendedConfig]](../../components/textextendedconfig.mdx) | ➖ | Text output configuration including format and verbosity | \{
"format": \{
"type": "text"
}
} |
+| `tool_choice` | [Optional[components.OpenAIResponsesToolChoiceUnion]](../../components/openairesponsestoolchoiceunion.mdx) | ➖ | N/A | auto |
+| `tools` | List[[components.ResponsesRequestToolUnion](../../components/responsesrequesttoolunion.mdx)] | ➖ | N/A | |
+| `top_k` | *Optional[int]* | ➖ | N/A | |
+| `top_logprobs` | *OptionalNullable[int]* | ➖ | N/A | |
+| `top_p` | *OptionalNullable[float]* | ➖ | N/A | |
+| `trace` | [Optional[components.TraceConfig]](../../components/traceconfig.mdx) | ➖ | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | \{
"trace_id": "trace-abc123",
"trace_name": "my-app-trace"
} |
+| `truncation` | [OptionalNullable[components.OpenAIResponsesTruncation]](../../components/openairesponsestruncation.mdx) | ➖ | N/A | auto |
+| `user` | *Optional[str]* | ➖ | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. | |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | |
### Response
diff --git a/docs/sdks/responses/README.mdx b/docs/sdks/responses/README.mdx
index edd7ea52..4d2e846c 100644
--- a/docs/sdks/responses/README.mdx
+++ b/docs/sdks/responses/README.mdx
@@ -62,53 +62,54 @@ with OpenRouter(
### Parameters
-| Parameter | Type | Required | Description | Example |
-| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
-| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
-| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
-| `x_open_router_metadata` | [Optional[components.MetadataLevel]](../../components/metadatalevel.mdx) | ➖ | Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility. | enabled |
-| `background` | *OptionalNullable[bool]* | ➖ | N/A | |
-| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../../components/anthropiccachecontroldirective.mdx) | ➖ | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. | \{
"type": "ephemeral"
} |
-| `debug` | [Optional[components.ChatDebugOptions]](../../components/chatdebugoptions.mdx) | ➖ | Debug options for inspecting request transformations (streaming only) | \{
"echo_upstream_body": true
} |
-| `deferred_tools` | [Optional[components.DeferredToolsControl]](../../components/deferredtoolscontrol.mdx) | ➖ | Opt-in versioned router-level deferred-tool protocol. Replay assistant reasoning unchanged on continuation; keep the catalog unchanged. | \{
"profile": "portable",
"protocol": "v1",
"search": \{
"max_results": 5,
"type": "bm25"
},
"validation": "runtime"
} |
-| `frequency_penalty` | *OptionalNullable[float]* | ➖ | N/A | |
-| `image_config` | Dict[str, [components.ImageConfig](../../components/imageconfig.mdx)] | ➖ | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. | \{
"aspect_ratio": "16:9",
"quality": "high"
} |
-| `include` | List[[components.ResponseIncludesEnum](../../components/responseincludesenum.mdx)] | ➖ | N/A | |
-| `input` | [Optional[components.InputsUnion]](../../components/inputsunion.mdx) | ➖ | Input for a response request - can be a string or array of items | [
\{
"content": "What is the weather today?",
"role": "user"
}
] |
-| `instructions` | *OptionalNullable[str]* | ➖ | N/A | |
-| `max_output_tokens` | *OptionalNullable[int]* | ➖ | N/A | |
-| `max_tool_calls` | *OptionalNullable[int]* | ➖ | Maximum number of server-tool (e.g. `openrouter:web_search`) agent steps the model may take during a request. Defaults to 30, which is also the maximum. Ignored when `stop_server_tools_when` is set. | 30 |
-| `metadata` | Dict[str, *str*] | ➖ | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | \{
"session_id": "abc-def-ghi",
"user_id": "123"
} |
-| `modalities` | List[[components.OutputModalityEnum](../../components/outputmodalityenum.mdx)] | ➖ | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] |
-| `model` | *Optional[str]* | ➖ | N/A | |
-| `models` | List[*str*] | ➖ | N/A | |
-| `parallel_tool_calls` | *OptionalNullable[bool]* | ➖ | N/A | |
-| `plugins` | List[[components.ResponsesRequestPlugin](../../components/responsesrequestplugin.mdx)] | ➖ | Plugins you want to enable for this request, including their settings. | |
-| `presence_penalty` | *OptionalNullable[float]* | ➖ | N/A | |
-| `previous_response_id` | *Optional[Any]* | ➖ | Not supported on this proxy. Each response request is independent: no responses are stored, so a previous response cannot be referenced. Requests with a non-null value are rejected with a 400 error. Send the full conversation history in `input` instead. | |
-| `prompt` | [OptionalNullable[components.StoredPromptTemplate]](../../components/storedprompttemplate.mdx) | ➖ | N/A | \{
"id": "prompt-abc123",
"variables": \{
"name": "John"
}
} |
-| `prompt_cache_key` | *OptionalNullable[str]* | ➖ | N/A | |
-| `prompt_cache_options` | [OptionalNullable[components.PromptCacheOptions]](../../components/promptcacheoptions.mdx) | ➖ | Request-level prompt-cache controls. `mode: "explicit"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. `ttl` sets the minimum cache lifetime for every breakpoint the request writes: "30m" (default) or "12h" (billed at the higher 12h cache-write rate). Only supported by OpenAI GPT-5.6 and newer. | \{
"mode": "explicit",
"ttl": "30m"
} |
-| `provider` | [OptionalNullable[components.ProviderPreferences]](../../components/providerpreferences.mdx) | ➖ | When multiple model providers are available, optionally indicate your routing preference. | \{
"allow_fallbacks": true
} |
-| `reasoning` | [OptionalNullable[components.ReasoningConfig]](../../components/reasoningconfig.mdx) | ➖ | Configuration for reasoning mode in the response | \{
"enabled": true,
"summary": "auto"
} |
-| `safety_identifier` | *OptionalNullable[str]* | ➖ | Recommended per-end-user identifier for abuse isolation. Use a stable ID, hash, or pseudonym. When a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards it raw. If omitted, requests use an account-level identity, so provider policy blocks can affect the whole account. | user-123 |
-| `service_tier` | [OptionalNullable[components.ResponsesRequestServiceTier]](../../components/responsesrequestservicetier.mdx) | ➖ | The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints. | |
-| `session_id` | *Optional[str]* | ➖ | A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | |
-| `stop` | [OptionalNullable[components.ResponsesRequestStop]](../../components/responsesrequeststop.mdx) | ➖ | Stop sequences (up to 4) | [
"\n"
] |
-| `stop_server_tools_when` | List[[components.StopServerToolsWhenCondition](../../components/stopservertoolswhencondition.mdx)] | ➖ | Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. When a condition fires while the model is still emitting tool calls, the pending tool calls are executed and one final turn is made with tool calls disabled so the response ends with a natural-language answer instead of an unfinished tool call. | [
\{
"step_count": 5,
"type": "step_count_is"
},
\{
"max_cost_in_dollars": 0.5,
"type": "max_cost"
}
] |
-| `stream` | *Optional[bool]* | ➖ | N/A | |
-| `temperature` | *OptionalNullable[float]* | ➖ | N/A | |
-| `text` | [Optional[components.TextExtendedConfig]](../../components/textextendedconfig.mdx) | ➖ | Text output configuration including format and verbosity | \{
"format": \{
"type": "text"
}
} |
-| `tool_choice` | [Optional[components.OpenAIResponsesToolChoiceUnion]](../../components/openairesponsestoolchoiceunion.mdx) | ➖ | N/A | auto |
-| `tools` | List[[components.ResponsesRequestToolUnion](../../components/responsesrequesttoolunion.mdx)] | ➖ | N/A | |
-| `top_k` | *Optional[int]* | ➖ | N/A | |
-| `top_logprobs` | *OptionalNullable[int]* | ➖ | N/A | |
-| `top_p` | *OptionalNullable[float]* | ➖ | N/A | |
-| `trace` | [Optional[components.TraceConfig]](../../components/traceconfig.mdx) | ➖ | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | \{
"trace_id": "trace-abc123",
"trace_name": "my-app-trace"
} |
-| `truncation` | [OptionalNullable[components.OpenAIResponsesTruncation]](../../components/openairesponsestruncation.mdx) | ➖ | N/A | auto |
-| `user` | *Optional[str]* | ➖ | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. | |
-| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | |
+| Parameter | Type | Required | Description | Example |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `http_referer` | *Optional[str]* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| |
+| `x_open_router_title` | *Optional[str]* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `x_open_router_categories` | *Optional[str]* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `x_open_router_metadata` | [Optional[components.MetadataLevel]](../../components/metadatalevel.mdx) | ➖ | Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility. | enabled |
+| `access_programs` | [Optional[components.ResponsesRequestAccessPrograms]](../../components/responsesrequestaccessprograms.mdx) | ➖ | OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program. | \{
"cyber": "standard"
} |
+| `background` | *OptionalNullable[bool]* | ➖ | N/A | |
+| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../../components/anthropiccachecontroldirective.mdx) | ➖ | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. | \{
"type": "ephemeral"
} |
+| `debug` | [Optional[components.ChatDebugOptions]](../../components/chatdebugoptions.mdx) | ➖ | Debug options for inspecting request transformations (streaming only) | \{
"echo_upstream_body": true
} |
+| `deferred_tools` | [Optional[components.DeferredToolsControl]](../../components/deferredtoolscontrol.mdx) | ➖ | Opt-in versioned router-level deferred-tool protocol. Replay assistant reasoning unchanged on continuation; keep the catalog unchanged. | \{
"profile": "portable",
"protocol": "v1",
"search": \{
"max_results": 5,
"type": "bm25"
},
"validation": "runtime"
} |
+| `frequency_penalty` | *OptionalNullable[float]* | ➖ | N/A | |
+| `image_config` | Dict[str, [components.ImageConfig](../../components/imageconfig.mdx)] | ➖ | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. | \{
"aspect_ratio": "16:9",
"quality": "high"
} |
+| `include` | List[[components.ResponseIncludesEnum](../../components/responseincludesenum.mdx)] | ➖ | N/A | |
+| `input` | [Optional[components.InputsUnion]](../../components/inputsunion.mdx) | ➖ | Input for a response request - can be a string or array of items | [
\{
"content": "What is the weather today?",
"role": "user"
}
] |
+| `instructions` | *OptionalNullable[str]* | ➖ | N/A | |
+| `max_output_tokens` | *OptionalNullable[int]* | ➖ | N/A | |
+| `max_tool_calls` | *OptionalNullable[int]* | ➖ | Maximum number of server-tool (e.g. `openrouter:web_search`) agent steps the model may take during a request. Defaults to 30, which is also the maximum. Ignored when `stop_server_tools_when` is set. | 30 |
+| `metadata` | Dict[str, *str*] | ➖ | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | \{
"session_id": "abc-def-ghi",
"user_id": "123"
} |
+| `modalities` | List[[components.OutputModalityEnum](../../components/outputmodalityenum.mdx)] | ➖ | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] |
+| `model` | *Optional[str]* | ➖ | N/A | |
+| `models` | List[*str*] | ➖ | N/A | |
+| `parallel_tool_calls` | *OptionalNullable[bool]* | ➖ | N/A | |
+| `plugins` | List[[components.ResponsesRequestPlugin](../../components/responsesrequestplugin.mdx)] | ➖ | Plugins you want to enable for this request, including their settings. | |
+| `presence_penalty` | *OptionalNullable[float]* | ➖ | N/A | |
+| `previous_response_id` | *Optional[Any]* | ➖ | Not supported on this proxy. Each response request is independent: no responses are stored, so a previous response cannot be referenced. Requests with a non-null value are rejected with a 400 error. Send the full conversation history in `input` instead. | |
+| `prompt` | [OptionalNullable[components.StoredPromptTemplate]](../../components/storedprompttemplate.mdx) | ➖ | N/A | \{
"id": "prompt-abc123",
"variables": \{
"name": "John"
}
} |
+| `prompt_cache_key` | *OptionalNullable[str]* | ➖ | N/A | |
+| `prompt_cache_options` | [OptionalNullable[components.PromptCacheOptions]](../../components/promptcacheoptions.mdx) | ➖ | Request-level prompt-cache controls. `mode: "explicit"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. `ttl` sets the minimum cache lifetime for every breakpoint the request writes: "30m" (default) or "12h" (billed at the higher 12h cache-write rate). Only supported by OpenAI GPT-5.6 and newer. | \{
"mode": "explicit",
"ttl": "30m"
} |
+| `provider` | [OptionalNullable[components.ProviderPreferences]](../../components/providerpreferences.mdx) | ➖ | When multiple model providers are available, optionally indicate your routing preference. | \{
"allow_fallbacks": true
} |
+| `reasoning` | [OptionalNullable[components.ReasoningConfig]](../../components/reasoningconfig.mdx) | ➖ | Configuration for reasoning mode in the response | \{
"enabled": true,
"summary": "auto"
} |
+| `safety_identifier` | *OptionalNullable[str]* | ➖ | Recommended per-end-user identifier for abuse isolation. Use a stable ID, hash, or pseudonym. When a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards it raw. If omitted, requests use an account-level identity, so provider policy blocks can affect the whole account. | user-123 |
+| `service_tier` | [OptionalNullable[components.ResponsesRequestServiceTier]](../../components/responsesrequestservicetier.mdx) | ➖ | The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints. | |
+| `session_id` | *Optional[str]* | ➖ | A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | |
+| `stop` | [OptionalNullable[components.ResponsesRequestStop]](../../components/responsesrequeststop.mdx) | ➖ | Stop sequences (up to 4) | [
"\n"
] |
+| `stop_server_tools_when` | List[[components.StopServerToolsWhenCondition](../../components/stopservertoolswhencondition.mdx)] | ➖ | Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. When a condition fires while the model is still emitting tool calls, the pending tool calls are executed and one final turn is made with tool calls disabled so the response ends with a natural-language answer instead of an unfinished tool call. | [
\{
"step_count": 5,
"type": "step_count_is"
},
\{
"max_cost_in_dollars": 0.5,
"type": "max_cost"
}
] |
+| `stream` | *Optional[bool]* | ➖ | N/A | |
+| `temperature` | *OptionalNullable[float]* | ➖ | N/A | |
+| `text` | [Optional[components.TextExtendedConfig]](../../components/textextendedconfig.mdx) | ➖ | Text output configuration including format and verbosity | \{
"format": \{
"type": "text"
}
} |
+| `tool_choice` | [Optional[components.OpenAIResponsesToolChoiceUnion]](../../components/openairesponsestoolchoiceunion.mdx) | ➖ | N/A | auto |
+| `tools` | List[[components.ResponsesRequestToolUnion](../../components/responsesrequesttoolunion.mdx)] | ➖ | N/A | |
+| `top_k` | *Optional[int]* | ➖ | N/A | |
+| `top_logprobs` | *OptionalNullable[int]* | ➖ | N/A | |
+| `top_p` | *OptionalNullable[float]* | ➖ | N/A | |
+| `trace` | [Optional[components.TraceConfig]](../../components/traceconfig.mdx) | ➖ | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | \{
"trace_id": "trace-abc123",
"trace_name": "my-app-trace"
} |
+| `truncation` | [OptionalNullable[components.OpenAIResponsesTruncation]](../../components/openairesponsestruncation.mdx) | ➖ | N/A | auto |
+| `user` | *Optional[str]* | ➖ | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. | |
+| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | ➖ | Configuration to override the default retry behavior of the client. | |
### Response
diff --git a/pyproject.toml b/pyproject.toml
index 47295f17..b4b9c123 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
-version = "1.3.100"
+version = "1.3.101"
description = "Official Python Client SDK for OpenRouter."
authors = [{ name = "OpenRouter" },]
readme = "README-PYPI.md"
diff --git a/src/openrouter/_version.py b/src/openrouter/_version.py
index 7b6327c6..f21312c2 100644
--- a/src/openrouter/_version.py
+++ b/src/openrouter/_version.py
@@ -3,10 +3,10 @@
import importlib.metadata
__title__: str = "openrouter"
-__version__: str = "1.3.100"
+__version__: str = "1.3.101"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.950.13"
-__user_agent__: str = "speakeasy-sdk/python 1.3.100 2.950.13 1.0.0 openrouter"
+__user_agent__: str = "speakeasy-sdk/python 1.3.101 2.950.13 1.0.0 openrouter"
try:
if __package__ is not None:
diff --git a/src/openrouter/beta_responses.py b/src/openrouter/beta_responses.py
index e9bae7b6..c3407b83 100644
--- a/src/openrouter/beta_responses.py
+++ b/src/openrouter/beta_responses.py
@@ -30,6 +30,12 @@ def send(
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
x_open_router_metadata: Optional[components.MetadataLevel] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -148,6 +154,7 @@ def send(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -202,6 +209,12 @@ def send(
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
x_open_router_metadata: Optional[components.MetadataLevel] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -320,6 +333,7 @@ def send(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -374,6 +388,12 @@ def send(
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
x_open_router_metadata: Optional[components.MetadataLevel] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -495,6 +515,7 @@ def send(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -548,6 +569,12 @@ def send(
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
x_open_router_metadata: Optional[components.MetadataLevel] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -669,6 +696,7 @@ def send(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -730,6 +758,9 @@ def send(
x_open_router_categories=x_open_router_categories,
x_open_router_metadata=x_open_router_metadata,
responses_request=components.ResponsesRequest(
+ access_programs=utils.get_pydantic_model(
+ access_programs, Optional[components.ResponsesRequestAccessPrograms]
+ ),
background=background,
cache_control=utils.get_pydantic_model(
cache_control, Optional[components.AnthropicCacheControlDirective]
@@ -1011,6 +1042,12 @@ async def send_async(
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
x_open_router_metadata: Optional[components.MetadataLevel] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -1129,6 +1166,7 @@ async def send_async(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -1183,6 +1221,12 @@ async def send_async(
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
x_open_router_metadata: Optional[components.MetadataLevel] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -1301,6 +1345,7 @@ async def send_async(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -1355,6 +1400,12 @@ async def send_async(
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
x_open_router_metadata: Optional[components.MetadataLevel] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -1476,6 +1527,7 @@ async def send_async(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -1529,6 +1581,12 @@ async def send_async(
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
x_open_router_metadata: Optional[components.MetadataLevel] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -1650,6 +1708,7 @@ async def send_async(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -1711,6 +1770,9 @@ async def send_async(
x_open_router_categories=x_open_router_categories,
x_open_router_metadata=x_open_router_metadata,
responses_request=components.ResponsesRequest(
+ access_programs=utils.get_pydantic_model(
+ access_programs, Optional[components.ResponsesRequestAccessPrograms]
+ ),
background=background,
cache_control=utils.get_pydantic_model(
cache_control, Optional[components.AnthropicCacheControlDirective]
diff --git a/src/openrouter/components/__init__.py b/src/openrouter/components/__init__.py
index 9d5f5695..79cf89c0 100644
--- a/src/openrouter/components/__init__.py
+++ b/src/openrouter/components/__init__.py
@@ -3187,7 +3187,10 @@
InputTokensDetails,
InputTokensDetailsTypedDict,
OpenResponsesResult,
+ OpenResponsesResultAccessPrograms,
+ OpenResponsesResultAccessProgramsTypedDict,
OpenResponsesResultAllowedCaller,
+ OpenResponsesResultCyber,
OpenResponsesResultObject,
OpenResponsesResultToolFunction,
OpenResponsesResultToolFunctionTypedDict,
@@ -3953,7 +3956,10 @@
ReasoningConfig,
ReasoningConfigTypedDict,
ResponsesRequest,
+ ResponsesRequestAccessPrograms,
+ ResponsesRequestAccessProgramsTypedDict,
ResponsesRequestAllowedCaller,
+ ResponsesRequestCyber,
ResponsesRequestPlugin,
ResponsesRequestPluginTypedDict,
ResponsesRequestServiceTier,
@@ -6949,7 +6955,10 @@
"OpenResponsesInProgressEventType",
"OpenResponsesInProgressEventTypedDict",
"OpenResponsesResult",
+ "OpenResponsesResultAccessPrograms",
+ "OpenResponsesResultAccessProgramsTypedDict",
"OpenResponsesResultAllowedCaller",
+ "OpenResponsesResultCyber",
"OpenResponsesResultObject",
"OpenResponsesResultToolFunction",
"OpenResponsesResultToolFunctionTypedDict",
@@ -7484,7 +7493,10 @@
"ResponseOutputTextType",
"ResponseOutputTextTypedDict",
"ResponsesRequest",
+ "ResponsesRequestAccessPrograms",
+ "ResponsesRequestAccessProgramsTypedDict",
"ResponsesRequestAllowedCaller",
+ "ResponsesRequestCyber",
"ResponsesRequestPlugin",
"ResponsesRequestPluginTypedDict",
"ResponsesRequestServiceTier",
@@ -10520,7 +10532,10 @@
"InputTokensDetails": ".openresponsesresult",
"InputTokensDetailsTypedDict": ".openresponsesresult",
"OpenResponsesResult": ".openresponsesresult",
+ "OpenResponsesResultAccessPrograms": ".openresponsesresult",
+ "OpenResponsesResultAccessProgramsTypedDict": ".openresponsesresult",
"OpenResponsesResultAllowedCaller": ".openresponsesresult",
+ "OpenResponsesResultCyber": ".openresponsesresult",
"OpenResponsesResultObject": ".openresponsesresult",
"OpenResponsesResultToolFunction": ".openresponsesresult",
"OpenResponsesResultToolFunctionTypedDict": ".openresponsesresult",
@@ -11082,7 +11097,10 @@
"ReasoningConfig": ".responsesrequest",
"ReasoningConfigTypedDict": ".responsesrequest",
"ResponsesRequest": ".responsesrequest",
+ "ResponsesRequestAccessPrograms": ".responsesrequest",
+ "ResponsesRequestAccessProgramsTypedDict": ".responsesrequest",
"ResponsesRequestAllowedCaller": ".responsesrequest",
+ "ResponsesRequestCyber": ".responsesrequest",
"ResponsesRequestPlugin": ".responsesrequest",
"ResponsesRequestPluginTypedDict": ".responsesrequest",
"ResponsesRequestServiceTier": ".responsesrequest",
diff --git a/src/openrouter/components/openresponsesresult.py b/src/openrouter/components/openresponsesresult.py
index 0e1f8daf..703b7254 100644
--- a/src/openrouter/components/openresponsesresult.py
+++ b/src/openrouter/components/openresponsesresult.py
@@ -395,6 +395,28 @@ def serialize_model(self, handler):
return m
+OpenResponsesResultCyber = Union[
+ Literal[
+ "standard",
+ "daybreak_blue",
+ "daybreak_red",
+ ],
+ UnrecognizedStr,
+]
+
+
+class OpenResponsesResultAccessProgramsTypedDict(TypedDict):
+ r"""Access program the upstream provider reported for this response (OpenAI `access_programs`). `null` when the provider reported none, including OpenAI's implicit Standard program."""
+
+ cyber: OpenResponsesResultCyber
+
+
+class OpenResponsesResultAccessPrograms(BaseModel):
+ r"""Access program the upstream provider reported for this response (OpenAI `access_programs`). `null` when the provider reported none, including OpenAI's implicit Standard program."""
+
+ cyber: OpenResponsesResultCyber
+
+
class OpenResponsesResultTypedDict(TypedDict):
r"""Complete non-streaming response from the Responses API"""
@@ -438,6 +460,8 @@ class OpenResponsesResultTypedDict(TypedDict):
usage: NotRequired[Nullable[UsageTypedDict]]
r"""Token usage information for the response"""
user: NotRequired[Nullable[str]]
+ access_programs: NotRequired[Nullable[OpenResponsesResultAccessProgramsTypedDict]]
+ r"""Access program the upstream provider reported for this response (OpenAI `access_programs`). `null` when the provider reported none, including OpenAI's implicit Standard program."""
alignment: NotRequired[AlignmentTypedDict]
r"""Beta. The result of the alignment plugin for this request; the shape may change."""
error_type: NotRequired[APIErrorType]
@@ -525,6 +549,9 @@ class OpenResponsesResult(BaseModel):
user: OptionalNullable[str] = UNSET
+ access_programs: OptionalNullable[OpenResponsesResultAccessPrograms] = UNSET
+ r"""Access program the upstream provider reported for this response (OpenAI `access_programs`). `null` when the provider reported none, including OpenAI's implicit Standard program."""
+
alignment: Optional[Alignment] = None
r"""Beta. The result of the alignment plugin for this request; the shape may change."""
@@ -557,6 +584,7 @@ def serialize_model(self, handler):
"truncation",
"usage",
"user",
+ "access_programs",
"alignment",
"error_type",
"openrouter_metadata",
@@ -587,6 +615,7 @@ def serialize_model(self, handler):
"truncation",
"usage",
"user",
+ "access_programs",
]
)
serialized = handler(self)
diff --git a/src/openrouter/components/responsesrequest.py b/src/openrouter/components/responsesrequest.py
index 366b5e9e..b49331a9 100644
--- a/src/openrouter/components/responsesrequest.py
+++ b/src/openrouter/components/responsesrequest.py
@@ -131,6 +131,44 @@
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
+ResponsesRequestCyber = Union[
+ Literal[
+ "standard",
+ "daybreak_blue",
+ "daybreak_red",
+ ],
+ UnrecognizedStr,
+]
+
+
+class ResponsesRequestAccessProgramsTypedDict(TypedDict):
+ r"""OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program."""
+
+ cyber: NotRequired[ResponsesRequestCyber]
+
+
+class ResponsesRequestAccessPrograms(BaseModel):
+ r"""OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program."""
+
+ cyber: Optional[ResponsesRequestCyber] = None
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = set(["cyber"])
+ serialized = handler(self)
+ m = {}
+
+ for n, f in type(self).model_fields.items():
+ k = f.alias or n
+ val = serialized.get(k, serialized.get(n))
+
+ if val != UNSET_SENTINEL:
+ if val is not None or k not in optional_fields:
+ m[k] = val
+
+ return m
+
+
ResponsesRequestPluginTypedDict = TypeAliasType(
"ResponsesRequestPluginTypedDict",
Union[
@@ -422,6 +460,8 @@ def serialize_model(self, handler):
class ResponsesRequestTypedDict(TypedDict):
r"""Request schema for Responses endpoint"""
+ access_programs: NotRequired[ResponsesRequestAccessProgramsTypedDict]
+ r"""OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program."""
background: NotRequired[Nullable[bool]]
cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict]
r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format."""
@@ -489,6 +529,9 @@ class ResponsesRequestTypedDict(TypedDict):
class ResponsesRequest(BaseModel):
r"""Request schema for Responses endpoint"""
+ access_programs: Optional[ResponsesRequestAccessPrograms] = None
+ r"""OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program."""
+
background: OptionalNullable[bool] = UNSET
cache_control: Optional[AnthropicCacheControlDirective] = None
@@ -599,6 +642,7 @@ class ResponsesRequest(BaseModel):
def serialize_model(self, handler):
optional_fields = set(
[
+ "access_programs",
"background",
"cache_control",
"debug",
diff --git a/src/openrouter/presets.py b/src/openrouter/presets.py
index 26ecf767..4edc4e88 100644
--- a/src/openrouter/presets.py
+++ b/src/openrouter/presets.py
@@ -2085,6 +2085,12 @@ def create_presets_responses(
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -2205,6 +2211,7 @@ def create_presets_responses(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -2266,6 +2273,9 @@ def create_presets_responses(
x_open_router_categories=x_open_router_categories,
slug=slug,
responses_request=components.ResponsesRequest(
+ access_programs=utils.get_pydantic_model(
+ access_programs, Optional[components.ResponsesRequestAccessPrograms]
+ ),
background=background,
cache_control=utils.get_pydantic_model(
cache_control, Optional[components.AnthropicCacheControlDirective]
@@ -2457,6 +2467,12 @@ async def create_presets_responses_async(
http_referer: Optional[str] = None,
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -2577,6 +2593,7 @@ async def create_presets_responses_async(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -2638,6 +2655,9 @@ async def create_presets_responses_async(
x_open_router_categories=x_open_router_categories,
slug=slug,
responses_request=components.ResponsesRequest(
+ access_programs=utils.get_pydantic_model(
+ access_programs, Optional[components.ResponsesRequestAccessPrograms]
+ ),
background=background,
cache_control=utils.get_pydantic_model(
cache_control, Optional[components.AnthropicCacheControlDirective]
diff --git a/src/openrouter/responses.py b/src/openrouter/responses.py
index 1aa587d5..ebebd8b6 100644
--- a/src/openrouter/responses.py
+++ b/src/openrouter/responses.py
@@ -30,6 +30,12 @@ def send(
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
x_open_router_metadata: Optional[components.MetadataLevel] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -148,6 +154,7 @@ def send(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -202,6 +209,12 @@ def send(
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
x_open_router_metadata: Optional[components.MetadataLevel] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -320,6 +333,7 @@ def send(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -374,6 +388,12 @@ def send(
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
x_open_router_metadata: Optional[components.MetadataLevel] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -495,6 +515,7 @@ def send(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -548,6 +569,12 @@ def send(
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
x_open_router_metadata: Optional[components.MetadataLevel] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -669,6 +696,7 @@ def send(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -730,6 +758,9 @@ def send(
x_open_router_categories=x_open_router_categories,
x_open_router_metadata=x_open_router_metadata,
responses_request=components.ResponsesRequest(
+ access_programs=utils.get_pydantic_model(
+ access_programs, Optional[components.ResponsesRequestAccessPrograms]
+ ),
background=background,
cache_control=utils.get_pydantic_model(
cache_control, Optional[components.AnthropicCacheControlDirective]
@@ -1011,6 +1042,12 @@ async def send_async(
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
x_open_router_metadata: Optional[components.MetadataLevel] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -1129,6 +1166,7 @@ async def send_async(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -1183,6 +1221,12 @@ async def send_async(
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
x_open_router_metadata: Optional[components.MetadataLevel] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -1301,6 +1345,7 @@ async def send_async(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -1355,6 +1400,12 @@ async def send_async(
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
x_open_router_metadata: Optional[components.MetadataLevel] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -1476,6 +1527,7 @@ async def send_async(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -1529,6 +1581,12 @@ async def send_async(
x_open_router_title: Optional[str] = None,
x_open_router_categories: Optional[str] = None,
x_open_router_metadata: Optional[components.MetadataLevel] = None,
+ access_programs: Optional[
+ Union[
+ components.ResponsesRequestAccessPrograms,
+ components.ResponsesRequestAccessProgramsTypedDict,
+ ]
+ ] = None,
background: OptionalNullable[bool] = UNSET,
cache_control: Optional[
Union[
@@ -1650,6 +1708,7 @@ async def send_async(
:param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
:param x_open_router_metadata: Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.
+ :param access_programs: OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program.
:param background:
:param cache_control: Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
:param debug: Debug options for inspecting request transformations (streaming only)
@@ -1711,6 +1770,9 @@ async def send_async(
x_open_router_categories=x_open_router_categories,
x_open_router_metadata=x_open_router_metadata,
responses_request=components.ResponsesRequest(
+ access_programs=utils.get_pydantic_model(
+ access_programs, Optional[components.ResponsesRequestAccessPrograms]
+ ),
background=background,
cache_control=utils.get_pydantic_model(
cache_control, Optional[components.AnthropicCacheControlDirective]
diff --git a/uv.lock b/uv.lock
index 1cf4b6b8..1f562f78 100644
--- a/uv.lock
+++ b/uv.lock
@@ -231,7 +231,7 @@ wheels = [
[[package]]
name = "openrouter"
-version = "1.3.100"
+version = "1.3.101"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },