Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
lockVersion: 2.0.0
id: c48cf606-fb42-4a45-9c23-8f0555307828
management:
docChecksum: 53c154fcf96c897d30be854d25995554
docChecksum: cd38c6b0d27bcda4e77540ad94350fdb
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
releaseVersion: 1.3.87
configChecksum: af14af1f010431d1a1405f151e00821e
releaseVersion: 1.3.88
configChecksum: d1cff2367bbdfc279716b7345e547534
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
generation_id: 6b413384-157d-4ed9-b8aa-efc726fffbdb
pristine_commit_hash: 3ce2a8227b7e1f828d58ebae0dca1adfdf65a2df
pristine_tree_hash: ef1cba5133df158b3c5ec3dde6091d502fcded6d
generation_id: bb412b4e-2fe5-4d0c-8ebf-6bdde22a0c76
pristine_commit_hash: 1410a7fa153b2a0816765e3ae07af0181bc7ba56
pristine_tree_hash: 5232527313cc402469351b106c223d7c98c296c4
features:
python:
acceptHeaders: 3.0.0
Expand Down Expand Up @@ -10040,8 +10040,8 @@ trackedFiles:
pristine_git_object: 27c97e3ee4761cd46f2d5d96be093e1663c6ed93
docs/sdks/privateendpoints/README.mdx:
id: 54dee70b8cc7
last_write_checksum: sha1:48a23b4ac96cda69a6f76a3725bbb4c4c5f6a73f
pristine_git_object: 0bcec24343c9b8abd80f4633676d73158a04c929
last_write_checksum: sha1:450d0029db686185f379d92964a602b946bbe031
pristine_git_object: ab814831843fab6ff11f16239f3af00b43ea9651
docs/sdks/providers/README.mdx:
id: 5ea9af111324
last_write_checksum: sha1:570b55655ee7602d3807c3218e450741f634eed6
Expand Down Expand Up @@ -10092,8 +10092,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
last_write_checksum: sha1:1c4468c3e86707e0157a2ae1df69e1b05d2ab1c4
pristine_git_object: 36a5174d753278b0eb8899396cb69c48675d240a
last_write_checksum: sha1:2a16a4502bcbee9ef1d45cc1f19175adb18e322f
pristine_git_object: 24ac149e97d2adfcb641dec2efad2c6435bd4564
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
Expand All @@ -10120,8 +10120,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
last_write_checksum: sha1:fafc0abf6c27e3f328263d13d0aa2ae8b0d362d7
pristine_git_object: 04f59b4900eb9cbaa4d08571bb6682e8dfc9aa5a
last_write_checksum: sha1:9e1d8ca2afd40003e6910774558ff0dd37158b53
pristine_git_object: 98e806f8952505654ba3d620943826b6deac374f
src/openrouter/alpha.py:
id: 306c4d93308d
last_write_checksum: sha1:30f55a360f41376ab194b9ea725fe4e001a5ae1a
Expand Down Expand Up @@ -14256,8 +14256,8 @@ trackedFiles:
pristine_git_object: 26ecf767f8e1f98145acfa7d0fa14ffcf13955d6
src/openrouter/private_endpoints.py:
id: fdbce8846ed0
last_write_checksum: sha1:02f930fd4055a5383aa5cd58501d6894ed9597b2
pristine_git_object: 9f233355fdeae279bcbf361ddd08e3eac9903c43
last_write_checksum: sha1:786f808e29866de19964dbffac1e1dcbd7fd30ee
pristine_git_object: 518fc30683bf21b7a038a19948117b601e10cbb3
src/openrouter/providers.py:
id: debc4c48f149
last_write_checksum: sha1:11dbc607825edee8dcc84b39ee8171e097c47acf
Expand Down Expand Up @@ -18781,4 +18781,3 @@ examples:
"502":
application/json: {"error": {"code": 502, "message": "Provider returned error"}}
examplesVersion: 1.0.2
releaseNotes: "## Python SDK Changes:\n* `open_router.alpha.decisions.create()`: `request.provider` **Changed**\n* `open_router.tts.create_speech()`: \n * `request.provider.options.primalabs` **Added**\n* `open_router.stt.create_transcription()`: \n * `request.provider.options.primalabs` **Added**\n* `open_router.batch.create_batches()`: \n * `request.provider.only[].union(ProviderName).enum(prima_labs)` **Added**\n* `open_router.chat.send()`: `request.provider` **Changed**\n* `open_router.embeddings.generate()`: `request.provider` **Changed**\n* `open_router.endpoints.list_zdr_endpoints()`: `response.data[].provider_name.enum(prima_labs)` **Added**\n* `open_router.endpoints.list()`: `response.data.endpoints[].provider_name.enum(prima_labs)` **Added**\n* `open_router.generations.get_generation()`: `response.data.provider_responses[].provider_name.enum(prima_labs)` **Added**\n* `open_router.images.generate()`: `request.provider` **Changed**\n* `open_router.presets.create_presets_chat_completions()`: `request.provider` **Changed**\n* `open_router.presets.create_presets_messages()`: `request.provider` **Changed**\n* `open_router.presets.create_presets_responses()`: `request.provider` **Changed**\n* `open_router.rerank.rerank()`: `request.provider` **Changed**\n* `open_router.responses.send()`: `request.provider` **Changed**\n* `open_router.beta.responses.send()`: `request.provider` **Changed**\n* `open_router.system_one.create()`: `request.provider` **Changed**\n* `open_router.video_generation.generate()`: \n * `request.provider.options.primalabs` **Added**\n"
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
version: 1.3.87
version: 1.3.88
additionalDependencies:
dev:
pytest: '>=8.3'
Expand Down
4 changes: 2 additions & 2 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20968,7 +20968,7 @@ components:
type: 'string'
roleArn:
description: 'The IAM role in your account that OpenRouter assumes. Its trust policy must allow sts:AssumeRole from arn:aws:iam::536697249728:role/openrouter-broadcast-exporter and require the external ID below, and its permissions must allow s3:PutObject on the bucket and prefix (plus kms:GenerateDataKey for SSE-KMS buckets).'
pattern: '^arn:aws(?:-[a-z]+)*:iam::\d{12}:role\/[\w+=,.@/-]{1,512}$'
pattern: '^arn:aws:iam::\d{12}:role\/[\w+=,.@/-]{1,512}$'
type: 'string'
visibleWhen:
- field: 'provider'
Expand Down Expand Up @@ -46812,7 +46812,7 @@ paths:
- 'Private Endpoints'
x-speakeasy-name-override: 'list'
post:
description: 'Create a private endpoint as a draft. Drafts are not routable: validate one with `POST /private-endpoints/{id}/validate`, then activate it with `POST /private-endpoints/{id}/activate`. Pass `activate` to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Send an `Idempotency-Key` header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 `idempotency_key_reused`. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
description: 'Create a private endpoint as a draft. Drafts are not routable: validate one with `POST /private-endpoints/{id}/validate`, then activate it with `POST /private-endpoints/{id}/activate`. Pass `activate` to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Send an `Idempotency-Key` header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 `idempotency_key_reused`. Returns 400 `parameters_invalid` when `tool_choice` is declared without `tools`. The response does not echo `declared_parameters` or `tested_parameters`; read them with `GET /private-endpoints/{id}`. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
operationId: 'createPrivateEndpoint'
parameters:
- description: 'Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, pricing, or declared parameters) is rejected with 422 `idempotency_key_reused`. Declared parameters are compared as a set, so a retry that reorders or repeats a name replays the endpoint. `activate` and `max_completion_tokens` are not compared, and later edits to the endpoint do not affect the comparison.'
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ speakeasyVersion: 1.787.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:1f784abddbbb0341fbbb5b065acd5e035a20f36a82bb920d796b4d2031b55583
sourceBlobDigest: sha256:7031dbb3be869a05e6f0f7d9935da948ec7f4af6937551c401e293862935578e
sourceRevisionDigest: sha256:0615f2da470f27553db60491de37627efa065bfd3bd9c3ef0ebc60850ab989ef
sourceBlobDigest: sha256:11efa435d8bebfa5d9170b01f068da7a7bcab0a7f520d4e3e8e95da3fd083585
tags:
- latest
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:1f784abddbbb0341fbbb5b065acd5e035a20f36a82bb920d796b4d2031b55583
sourceBlobDigest: sha256:7031dbb3be869a05e6f0f7d9935da948ec7f4af6937551c401e293862935578e
sourceRevisionDigest: sha256:0615f2da470f27553db60491de37627efa065bfd3bd9c3ef0ebc60850ab989ef
sourceBlobDigest: sha256:11efa435d8bebfa5d9170b01f068da7a7bcab0a7f520d4e3e8e95da3fd083585
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:2af635ec902cb472d6a2741e5afe2892736a348c0820a6e33c2fd0da5d43cbf4
codeSamplesRevisionDigest: sha256:eae14ce4b3923290ea9c3a995d5ad1eb32d34886478e6f2d3f2a858f5dc885a3
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3639,4 +3639,14 @@ Based on:
### Generated
- [python v1.3.87] .
### Releases
- [PyPI v1.3.87] https://pypi.org/project/openrouter/1.3.87 - .
- [PyPI v1.3.87] https://pypi.org/project/openrouter/1.3.87 - .

## 2026-10-28 00:19:45
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.3.88] .
### Releases
- [PyPI v1.3.88] https://pypi.org/project/openrouter/1.3.88 - .
2 changes: 1 addition & 1 deletion docs/sdks/privateendpoints/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ with OpenRouter(

## create

Create a private endpoint as a draft. Drafts are not routable: validate one with `POST /private-endpoints/{id}/validate`, then activate it with `POST /private-endpoints/{id}/activate`. Pass `activate` to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Send an `Idempotency-Key` header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 `idempotency_key_reused`. [Management key](/docs/guides/overview/auth/management-api-keys) required.
Create a private endpoint as a draft. Drafts are not routable: validate one with `POST /private-endpoints/{id}/validate`, then activate it with `POST /private-endpoints/{id}/activate`. Pass `activate` to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Send an `Idempotency-Key` header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 `idempotency_key_reused`. Returns 400 `parameters_invalid` when `tool_choice` is declared without `tools`. The response does not echo `declared_parameters` or `tested_parameters`; read them with `GET /private-endpoints/{id}`. [Management key](/docs/guides/overview/auth/management-api-keys) required.

### Example Usage

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
version = "1.3.87"
version = "1.3.88"
description = "Official Python Client SDK for OpenRouter."
authors = [{ name = "OpenRouter" },]
readme = "README-PYPI.md"
Expand Down
4 changes: 2 additions & 2 deletions src/openrouter/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import importlib.metadata

__title__: str = "openrouter"
__version__: str = "1.3.87"
__version__: str = "1.3.88"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
__user_agent__: str = "speakeasy-sdk/python 1.3.87 2.914.0 1.0.0 openrouter"
__user_agent__: str = "speakeasy-sdk/python 1.3.88 2.914.0 1.0.0 openrouter"

try:
if __package__ is not None:
Expand Down
4 changes: 2 additions & 2 deletions src/openrouter/private_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def create(
) -> components.ManagedPrivateEndpointResponse:
r"""Create a private endpoint

Create a private endpoint as a draft. Drafts are not routable: validate one with `POST /private-endpoints/{id}/validate`, then activate it with `POST /private-endpoints/{id}/activate`. Pass `activate` to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Send an `Idempotency-Key` header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 `idempotency_key_reused`. [Management key](/docs/guides/overview/auth/management-api-keys) required.
Create a private endpoint as a draft. Drafts are not routable: validate one with `POST /private-endpoints/{id}/validate`, then activate it with `POST /private-endpoints/{id}/activate`. Pass `activate` to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Send an `Idempotency-Key` header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 `idempotency_key_reused`. Returns 400 `parameters_invalid` when `tool_choice` is declared without `tools`. The response does not echo `declared_parameters` or `tested_parameters`; read them with `GET /private-endpoints/{id}`. [Management key](/docs/guides/overview/auth/management-api-keys) required.

:param model_permaslug: Permanent slug of the model this endpoint serves.
:param provider_slug: Slug of the upstream provider.
Expand Down Expand Up @@ -528,7 +528,7 @@ async def create_async(
) -> components.ManagedPrivateEndpointResponse:
r"""Create a private endpoint

Create a private endpoint as a draft. Drafts are not routable: validate one with `POST /private-endpoints/{id}/validate`, then activate it with `POST /private-endpoints/{id}/activate`. Pass `activate` to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Send an `Idempotency-Key` header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 `idempotency_key_reused`. [Management key](/docs/guides/overview/auth/management-api-keys) required.
Create a private endpoint as a draft. Drafts are not routable: validate one with `POST /private-endpoints/{id}/validate`, then activate it with `POST /private-endpoints/{id}/activate`. Pass `activate` to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Send an `Idempotency-Key` header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 `idempotency_key_reused`. Returns 400 `parameters_invalid` when `tool_choice` is declared without `tools`. The response does not echo `declared_parameters` or `tested_parameters`; read them with `GET /private-endpoints/{id}`. [Management key](/docs/guides/overview/auth/management-api-keys) required.

:param model_permaslug: Permanent slug of the model this endpoint serves.
:param provider_slug: Slug of the upstream provider.
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.