diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 0044ffe69..fb9e1a346 100644
--- a/.speakeasy/gen.lock
+++ b/.speakeasy/gen.lock
@@ -1,19 +1,19 @@
lockVersion: ""
id: ""
management:
- docChecksum: 67da7fd67895c381ff5bcc5c732f2849
+ docChecksum: ab69946f2aff5ad837eae4a3b5bf4e13
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
- releaseVersion: 1.3.24
- configChecksum: 52a19d00a7745622fb6f9f2c44629e1e
+ releaseVersion: 1.3.25
+ configChecksum: 31844d8f5cc4a3b7a8bc3c88857b475d
repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git
installationURL: https://github.com/OpenRouterTeam/typescript-sdk
published: true
persistentEdits:
- generation_id: b8f5e0f8-5a83-48d1-abf7-fef3f1d201ee
- pristine_commit_hash: 99b22d19edce2b5b5313d3ca58b5d18693998463
- pristine_tree_hash: af1f9a96625e38b8b6ed71cc7bfb4dc730c5595b
+ generation_id: 9f5f3547-3e7c-48d2-a3a9-0c8ba2cf62ee
+ pristine_commit_hash: 05f88e197e5b0faed549946323a3a5dfc9b432fe
+ pristine_tree_hash: 6ae38ae86827df6581f01bde1e5214079758c33b
features:
typescript:
acceptHeaders: 2.81.2
@@ -5584,6 +5584,10 @@ trackedFiles:
id: 3a5d92e71b59
last_write_checksum: sha1:2a8e44e3d6a9ee7485107a7872ff26ff16b00735
pristine_git_object: 2b3c42b383091a4fd9423c0f07b47e9de6168549
+ docs/models/interndaemonaccess.mdx:
+ id: 6ee5b68e2d7d
+ last_write_checksum: sha1:90d1662183bfe4c1d0c6166503ea58022159b112
+ pristine_git_object: 5710ce27b4cb1d6de5b14705b37f857c01182e40
docs/models/interninvokeacceptedresponse.mdx:
id: 10c7b75df88b
last_write_checksum: sha1:4f960296e7e4a87734933b96ee3ff4232949142e
@@ -8375,6 +8379,14 @@ trackedFiles:
id: fafa5172a6b1
last_write_checksum: sha1:ebc4c09b71f71bfd1b35ecd259f3944f0c6db30b
pristine_git_object: 091ad47f169a28990b2d1ca4cd2b6fd9cd92c9f0
+ docs/models/operations/getinterndaemonaccessglobals.mdx:
+ id: dfd45258d17d
+ last_write_checksum: sha1:118e7a1046e47f28865e2b23955522aefa0158f8
+ pristine_git_object: 7db66ea68e787afe31635dd67f24c30bfa0fe410
+ docs/models/operations/getinterndaemonaccessrequest.mdx:
+ id: 7c557e903580
+ last_write_checksum: sha1:72481b521ca186b390c0acd82ffcf06e94d7a8bc
+ pristine_git_object: e1d3429dc01d3939dbae1b3aa0c7bb62e41ecc2e
docs/models/operations/getinternglobals.mdx:
id: 3168d4c01772
last_write_checksum: sha1:b0c4131956e491c0528e50505c180c5134a5485f
@@ -13718,8 +13730,8 @@ trackedFiles:
pristine_git_object: 15b7b4c80d50dd3aa0f7adc3ab4d9fb03a8efaa7
docs/sdks/interns/README.mdx:
id: 2f8a053ffe78
- last_write_checksum: sha1:db186712738ff21bce4636376524f6b80173f474
- pristine_git_object: 90132f7c5f8f9c6e4397b87f789177b658e22abb
+ last_write_checksum: sha1:c1e818b8d48d82e01095701a36b8f1992aa16f66
+ pristine_git_object: 4f026d8da9f57f5edd819600e36a3cada0ecc085
docs/sdks/models/README.mdx:
id: 58f1ca464e0b
last_write_checksum: sha1:dbae6f74244ab3e9fe38e075ab67f926f33ef87d
@@ -13846,12 +13858,12 @@ trackedFiles:
pristine_git_object: 410efafd6a7f50d91ccb87131fedbe0c3d47e15a
jsr.json:
id: 7f6ab7767282
- last_write_checksum: sha1:be3d930c53234272996351afffa2bc4d7f45ef3d
- pristine_git_object: 6ab08e9c0bbdcfc6975eccd077e5a090818176d8
+ last_write_checksum: sha1:2a9e38beaf98a3535f8b2ab40bf076faf3d8f8a5
+ pristine_git_object: ed48b825571e53b13281c87210c0cf53414d95e3
package.json:
id: 7030d0b2f71b
- last_write_checksum: sha1:ceb409a77e57906afa1dce818e167bb77d254f4b
- pristine_git_object: c51e7de8b4bbba2e08c29332a1facdae77c35731
+ last_write_checksum: sha1:656b225299df84319844bcff801d8ad27aec7250
+ pristine_git_object: 77302f8f9e4a17aa570286156b1bffd0eb18479f
src/core.ts:
id: f431fdbcd144
last_write_checksum: sha1:5aa66b0b6a5964f3eea7f3098c2eb3c0ee9c0131
@@ -14088,6 +14100,10 @@ trackedFiles:
id: 484b04c35876
last_write_checksum: sha1:95616ff94e6ef4fe3248885d25aa71a6b01f5186
pristine_git_object: 84985cfee5e79c648083370d42e07563d54f8fd2
+ src/funcs/internsGetInternDaemonAccess.ts:
+ id: 464f7f69e2f0
+ last_write_checksum: sha1:fd0d117dc329ee0d8fd531b9b5638add781b9b53
+ pristine_git_object: 54d97bd84a956c36ea35ebfb7eebcfefcc6a7ef5
src/funcs/internsInvoke.ts:
id: d0be40cd89cf
last_write_checksum: sha1:e7e5db94633812351a50eca92befa7aa032e49a7
@@ -14366,8 +14382,8 @@ trackedFiles:
pristine_git_object: a187e58707bdb726ca2aff74941efe7493422d4e
src/lib/config.ts:
id: 320761608fb3
- last_write_checksum: sha1:2113f7a00ec5722edb127267086ac709f844b63f
- pristine_git_object: 8700876d66d4a60f1c4a708fffe710f459671dd9
+ last_write_checksum: sha1:23132c91ff606183237e30260cfd022991ee98bd
+ pristine_git_object: 8d20c1ccc9e61d6ed8b9dad1e1d184b37bc59084
src/lib/dlv.ts:
id: b1988214835a
last_write_checksum: sha1:eaac763b22717206a6199104e0403ed17a4e2711
@@ -15768,8 +15784,8 @@ trackedFiles:
pristine_git_object: 7abdfe096d3adff317db6837dc689c69db92e127
src/models/index.ts:
id: f93644b0f37e
- last_write_checksum: sha1:52a17b11012c46f7b50c4fb2c8b45367d44cb000
- pristine_git_object: 02e618be29c1573677a5952fe6a802167d3139ef
+ last_write_checksum: sha1:4efd1fde13b102e2ab46712c313193563d9f98cd
+ pristine_git_object: 72d92b2c5f06ed1994345dd09ae56b114d91d293
src/models/inputaudio.ts:
id: 9bdc14c7565f
last_write_checksum: sha1:2f8dc4c1d6a9c2927d9eb186e0ecedf7b81838e6
@@ -15914,6 +15930,10 @@ trackedFiles:
id: 6d3909ea9433
last_write_checksum: sha1:9a8118f0a654181dbd8dd1f1e798a50ace167520
pristine_git_object: ae6f841af0a49f34f93eded5da09e1db819b5d2f
+ src/models/interndaemonaccess.ts:
+ id: 3e1c71908a89
+ last_write_checksum: sha1:6c0b7f58caf45389cfe09adee68cd496fe7b6a47
+ pristine_git_object: 7f67f5db6a53e3151659e2ad5a9f508cb5c28d9b
src/models/interninvokeacceptedresponse.ts:
id: 4684252ebfd9
last_write_checksum: sha1:7a648fb23e8bfb9ffccc70155bae637aa272d695
@@ -16562,6 +16582,10 @@ trackedFiles:
id: f7646f94d5c3
last_write_checksum: sha1:8d293535cb8b5f21012724b6f13f3b0ab1c53561
pristine_git_object: f468ba5502f118abe986888c04270e5e5c8dfae6
+ src/models/operations/getinterndaemonaccess.ts:
+ id: 2320374f9c4b
+ last_write_checksum: sha1:989fdb1240545b0368bba31eb155246a3fc99bbe
+ pristine_git_object: 3a95dde7c1ffcaeaccc3b29401866221ccd48c2d
src/models/operations/getkey.ts:
id: 27d0f86c087f
last_write_checksum: sha1:db178df73e74976b951e5db4ab89aa2693f1c58f
@@ -16624,8 +16648,8 @@ trackedFiles:
pristine_git_object: a052ed42bd123e79be1f05dc823c808f8c32b383
src/models/operations/index.ts:
id: 0d9ffaf774d2
- last_write_checksum: sha1:c91a1975c171f7df63bab96a23125b4b5e8c34ac
- pristine_git_object: 9e8e47be027ac42abeff9ab031ba7112cbee1c58
+ last_write_checksum: sha1:9720e7bba10a523dbafadbe64069e928d66c5c20
+ pristine_git_object: dcf5f911b0fa233c9da73a64984df06704819edc
src/models/operations/invokeintern.ts:
id: f2b19fbd8a96
last_write_checksum: sha1:55f0d7c3a2020919fbf3e92c2c7524a75a412504
@@ -17888,8 +17912,8 @@ trackedFiles:
pristine_git_object: 5c82fe389f888827f98aa52788b850ef43422e07
src/sdk/interns.ts:
id: fc3b4e6c5008
- last_write_checksum: sha1:a15427708866b525621ca8aa78df7f1f99a58206
- pristine_git_object: 305808e5f4c9c0d3fd25c31d70b1ab015641b9ac
+ last_write_checksum: sha1:6a8aa9f7d2c69a56699c16a7b3c22e4dfaf5d3b7
+ pristine_git_object: 9ee4f78cbaf6b1dc7cb2de86bf84081cd0f1c7fa
src/sdk/models.ts:
id: 8c761ab180fd
last_write_checksum: sha1:0c5e5cefb7079fc69eb11ef157af6d2cb5255933
@@ -21261,5 +21285,19 @@ examples:
application/json: {"error": {"code": 409, "message": "That question is no longer waiting for an answer."}}
"500":
application/json: {"error": {"code": 409, "message": "That question is no longer waiting for an answer."}}
+ getInternDaemonAccess:
+ speakeasy-default-get-intern-daemon-access:
+ parameters:
+ path:
+ internId: "7c9e6679-7425-40de-944b-e07fc1f90ae7"
+ responses:
+ "200":
+ application/json: {"origin": "https://research-assistant-7c9e6679.or.bot", "token": "daemon_token"}
+ "401":
+ application/json: {"error": {"code": 404, "message": "Intern not found"}}
+ "500":
+ application/json: {"error": {"code": 404, "message": "Intern not found"}}
examplesVersion: 1.0.2
-releaseNotes: "## Typescript SDK Changes:\n* `openrouter.alpha.decisions.create()`: \n * `request.decisionsRequest.provider.options` **Added**\n* `openrouter.chat.send()`: \n * `request.chatRequest.provider.options` **Added**\n* `openrouter.embeddings.generate()`: \n * `request.requestBody.provider.options` **Added**\n* `openrouter.presets.createPresetsChatCompletions()`: \n * `request.chatRequest.provider.options` **Added**\n* `openrouter.presets.createPresetsMessages()`: \n * `request.messagesRequest.provider.options` **Added**\n* `openrouter.presets.createPresetsResponses()`: \n * `request.responsesRequest.provider.options` **Added**\n* `openrouter.rerank.rerank()`: \n * `request.requestBody.provider.options` **Added**\n* `openrouter.responses.send()`: \n * `request.responsesRequest.provider.options` **Added**\n* `openrouter.beta.responses.send()`: \n * `request.responsesRequest.provider.options` **Added**\n* `openrouter.systemOne.create()`: \n * `request.decisionsRequest.provider.options` **Added**\n"
+releaseNotes: |
+ ## Typescript SDK Changes:
+ * `openrouter.interns.getInternDaemonAccess()`: **Added**
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index aca89a60b..e6d73c91f 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -37,7 +37,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
typescript:
- version: 1.3.24
+ version: 1.3.25
acceptHeaderEnum: false
additionalDependencies:
dependencies:
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index 2d6358a93..83e216643 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -13244,6 +13244,22 @@ components:
- 'content'
- 'role'
type: 'object'
+ InternDaemonAccess:
+ description: 'The intern daemon''s origin and the bearer `ori tui --host` sends to it as `ORI_DAEMON_TOKEN`.'
+ example:
+ origin: 'https://research-assistant-7c9e6679.or.bot'
+ token: 'daemon_token'
+ properties:
+ origin:
+ pattern: '^https?:\/\/([a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*)(?::(\d{1,5}))?$/iu'
+ type: 'string'
+ token:
+ pattern: '^[\w-]+$/u'
+ type: 'string'
+ required:
+ - 'origin'
+ - 'token'
+ type: 'object'
InternInvokeAcceptedResponse:
description: 'The intern admitted the prompt. The run continues on the intern.'
example:
@@ -37794,6 +37810,121 @@ paths:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
+ /interns/{internId}/daemon-access:
+ get:
+ description: 'Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, each reveal is logged by caller and intern, and a caller may make 10 reveals per minute. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.'
+ operationId: 'getInternDaemonAccess'
+ parameters:
+ - description: 'ID of an intern visible to the authenticated API key.'
+ in: 'path'
+ name: 'internId'
+ required: true
+ schema:
+ description: 'ID of an intern visible to the authenticated API key.'
+ example: '7c9e6679-7425-40de-944b-e07fc1f90ae7'
+ minLength: 1
+ type: 'string'
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InternDaemonAccess'
+ description: 'Daemon origin and token.'
+ '401':
+ content:
+ application/json:
+ example:
+ error:
+ code: 401
+ message: 'Invalid or missing API key'
+ schema:
+ $ref: '#/components/schemas/InternLifecycleError'
+ description: 'Missing, unknown or provisioning API key.'
+ '403':
+ content:
+ application/json:
+ example:
+ error:
+ code: 403
+ message: 'Forbidden'
+ schema:
+ $ref: '#/components/schemas/InternLifecycleError'
+ description: 'The key owner no longer has access, or the request used a regional hostname.'
+ '404':
+ content:
+ application/json:
+ example:
+ error:
+ code: 404
+ message: 'Intern not found'
+ metadata:
+ reason: 'not_found'
+ retryable: false
+ schema:
+ $ref: '#/components/schemas/InternLifecycleError'
+ description: 'The caller is outside the Intern API programme, the intern is hidden, or lifecycle writes are disabled.'
+ '408':
+ content:
+ application/json:
+ example:
+ error:
+ code: 408
+ message: 'Operation timed out after 10s. Please try again later.'
+ metadata:
+ reason: 'timeout'
+ retryable: true
+ schema:
+ $ref: '#/components/schemas/InternLifecycleError'
+ description: 'The request exceeded its route deadline. The deadline quoted in the message is the route''s own, so it differs between operations.'
+ '409':
+ content:
+ application/json:
+ example:
+ error:
+ code: 409
+ message: 'This intern is not running.'
+ metadata:
+ reason: 'intern_not_running'
+ retryable: false
+ schema:
+ $ref: '#/components/schemas/InternLifecycleError'
+ description: 'The intern cannot be attached to. `metadata.reason` is `intern_not_running`, `intern_unreachable` when it has no usable address yet, or `intern_needs_restart` when it was provisioned before daemon access was available.'
+ '429':
+ content:
+ application/json:
+ example:
+ error:
+ code: 429
+ message: 'Too many token reveals. Please wait a moment.'
+ metadata:
+ reason: 'rate_limited'
+ retryable: true
+ schema:
+ $ref: '#/components/schemas/InternLifecycleError'
+ description: 'The caller made more than 10 reveals in the last minute. Wait for `Retry-After` seconds.'
+ '500':
+ content:
+ application/json:
+ example:
+ error:
+ code: 500
+ message: 'The request could not be completed'
+ metadata:
+ reason: 'internal_error'
+ retryable: true
+ schema:
+ $ref: '#/components/schemas/InternLifecycleError'
+ description: 'The request could not be completed. `metadata.reason` says whether to try again: `internal_error` is a transient failure and carries `metadata.retryable: true`, so the same request may be sent again, while `configuration_error` carries `retryable: false` because the next attempt reads the same missing binding or unusable stored credential.'
+ security:
+ - apiKey: []
+ summary: 'Get an intern''s daemon access'
+ tags:
+ - 'Interns'
+ parameters:
+ - $ref: "#/components/parameters/AppIdentifier"
+ - $ref: "#/components/parameters/AppDisplayName"
+ - $ref: "#/components/parameters/AppCategories"
/interns/{internId}/invoke:
post:
description: "Starts a run on one of your interns and answers `202` with the `session_id` as soon as the intern accepts it. The run keeps going on the intern after the response. Nothing about its progress comes back on this request; the intern reports through its own tools, such as Slack.\n\nSend the same `session_id` later to continue the conversation, for example to hand the intern a decision on work it started. If that session already has a run going, the prompt is delivered into it and the status is `steered`. A `session_id` is accepted only from the caller it was issued to, on the same intern; any other, including sessions started from Slack or the chat endpoint, is refused with `404`.\n\nRuns started here self-drive: the intern consents to its own tool approvals, and a question it asks is answered by its own fallback. A run ends when the intern finishes it or after its execution deadline (1 hour by default).\n\nAvailable to interns programme members. Callers outside the programme receive `404` for every path under `/api/v1/interns`."
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index f131d70b4..8263c1d45 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -2,8 +2,8 @@ speakeasyVersion: 1.787.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:426b8c712b132624c2f8f9ca5e4400e4805127f2cdff1332cb51760ed5c78235
- sourceBlobDigest: sha256:ca8be6156df91d8fae7e9bb738f971cb1a2272bce01c013f1f072913eec1744b
+ sourceRevisionDigest: sha256:0a9fc7e0025f081567cab00ca767bd21955cb488a3afae687d8abf211dc1b91c
+ sourceBlobDigest: sha256:bb6d90ba4e50928975c056b74513286b06e3ace6fdf7e1084b8cde7b1a215579
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
openrouter:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:426b8c712b132624c2f8f9ca5e4400e4805127f2cdff1332cb51760ed5c78235
- sourceBlobDigest: sha256:ca8be6156df91d8fae7e9bb738f971cb1a2272bce01c013f1f072913eec1744b
+ sourceRevisionDigest: sha256:0a9fc7e0025f081567cab00ca767bd21955cb488a3afae687d8abf211dc1b91c
+ sourceBlobDigest: sha256:bb6d90ba4e50928975c056b74513286b06e3ace6fdf7e1084b8cde7b1a215579
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
- codeSamplesRevisionDigest: sha256:2930669fabec8877653dd3196fda7a519ac94419beba4b079e49484e266f5ccc
+ codeSamplesRevisionDigest: sha256:166c68decd4084a8d63bfa5f1d2c7e7eaee7eeb558b3389faac5bac861fe381c
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
diff --git a/RELEASES.md b/RELEASES.md
index 33e766d80..c3ae43092 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -4026,4 +4026,14 @@ Based on:
### Generated
- [typescript v1.3.24] .
### Releases
-- [NPM v1.3.24] https://www.npmjs.com/package/@openrouter/sdk/v/1.3.24 - .
\ No newline at end of file
+- [NPM v1.3.24] https://www.npmjs.com/package/@openrouter/sdk/v/1.3.24 - .
+
+## 2026-09-24 18:41:22
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [typescript v1.3.25] .
+### Releases
+- [NPM v1.3.25] https://www.npmjs.com/package/@openrouter/sdk/v/1.3.25 - .
\ No newline at end of file
diff --git a/docs/models/interndaemonaccess.mdx b/docs/models/interndaemonaccess.mdx
new file mode 100644
index 000000000..5710ce27b
--- /dev/null
+++ b/docs/models/interndaemonaccess.mdx
@@ -0,0 +1,23 @@
+---
+title: "InternDaemonAccess"
+---
+
+The intern daemon's origin and the bearer `ori tui --host` sends to it as `ORI_DAEMON_TOKEN`.
+
+## Example Usage
+
+```typescript
+import { InternDaemonAccess } from "@openrouter/sdk/models";
+
+let value: InternDaemonAccess = {
+ origin: "https://research-assistant-7c9e6679.or.bot",
+ token: "daemon_token",
+};
+```
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------ | ------------------ | ------------------ | ------------------ |
+| `origin` | *string* | :heavy_check_mark: | N/A |
+| `token` | *string* | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/models/operations/getinterndaemonaccessglobals.mdx b/docs/models/operations/getinterndaemonaccessglobals.mdx
new file mode 100644
index 000000000..7db66ea68
--- /dev/null
+++ b/docs/models/operations/getinterndaemonaccessglobals.mdx
@@ -0,0 +1,19 @@
+---
+title: "GetInternDaemonAccessGlobals"
+---
+
+## Example Usage
+
+```typescript
+import { GetInternDaemonAccessGlobals } from "@openrouter/sdk/models/operations";
+
+let value: GetInternDaemonAccessGlobals = {};
+```
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `httpReferer` | *string* | :heavy_minus_sign: | 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.
|
+| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
+| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
\ No newline at end of file
diff --git a/docs/models/operations/getinterndaemonaccessrequest.mdx b/docs/models/operations/getinterndaemonaccessrequest.mdx
new file mode 100644
index 000000000..e1d3429dc
--- /dev/null
+++ b/docs/models/operations/getinterndaemonaccessrequest.mdx
@@ -0,0 +1,22 @@
+---
+title: "GetInternDaemonAccessRequest"
+---
+
+## Example Usage
+
+```typescript
+import { GetInternDaemonAccessRequest } from "@openrouter/sdk/models/operations";
+
+let value: GetInternDaemonAccessRequest = {
+ internId: "7c9e6679-7425-40de-944b-e07fc1f90ae7",
+};
+```
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `httpReferer` | *string* | :heavy_minus_sign: | 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.
| |
+| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| |
+| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| |
+| `internId` | *string* | :heavy_check_mark: | ID of an intern visible to the authenticated API key. | 7c9e6679-7425-40de-944b-e07fc1f90ae7 |
\ No newline at end of file
diff --git a/docs/sdks/interns/README.mdx b/docs/sdks/interns/README.mdx
index 90132f7c5..4f026d8da 100644
--- a/docs/sdks/interns/README.mdx
+++ b/docs/sdks/interns/README.mdx
@@ -14,6 +14,7 @@ Create, inspect, update, provision, suspend and delete OpenRouter interns throug
* [deleteIntern](#deleteintern) - Delete an intern
* [getIntern](#getintern) - Get an intern
* [updateIntern](#updateintern) - Update an intern
+* [getInternDaemonAccess](#getinterndaemonaccess) - Get an intern's daemon access
* [provisionIntern](#provisionintern) - Provision an intern
* [suspendIntern](#suspendintern) - Suspend an intern
* [chat](#chat) - Stream a chat completion with an intern
@@ -437,6 +438,86 @@ run();
| errors.InternLifecycleError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
+## getInternDaemonAccess
+
+Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, each reveal is logged by caller and intern, and a caller may make 10 reveals per minute. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
+
+### Example Usage
+
+```typescript
+import { OpenRouter } from "@openrouter/sdk";
+
+const openRouter = new OpenRouter({
+ httpReferer: "",
+ appTitle: "",
+ appCategories: "",
+ apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
+});
+
+async function run() {
+ const result = await openRouter.interns.getInternDaemonAccess({
+ internId: "7c9e6679-7425-40de-944b-e07fc1f90ae7",
+ });
+
+ console.log(result);
+}
+
+run();
+```
+
+### Standalone function
+
+The standalone function version of this method:
+
+```typescript
+import { OpenRouterCore } from "@openrouter/sdk/core.js";
+import { internsGetInternDaemonAccess } from "@openrouter/sdk/funcs/internsGetInternDaemonAccess.js";
+
+// Use `OpenRouterCore` for best tree-shaking performance.
+// You can create one instance of it to use across an application.
+const openRouter = new OpenRouterCore({
+ httpReferer: "",
+ appTitle: "",
+ appCategories: "",
+ apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
+});
+
+async function run() {
+ const res = await internsGetInternDaemonAccess(openRouter, {
+ internId: "7c9e6679-7425-40de-944b-e07fc1f90ae7",
+ });
+ if (res.ok) {
+ const { value: result } = res;
+ console.log(result);
+ } else {
+ console.log("internsGetInternDaemonAccess failed:", res.error);
+ }
+}
+
+run();
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `request` | [operations.GetInternDaemonAccessRequest](../../models/operations/getinterndaemonaccessrequest.mdx) | :heavy_check_mark: | The request object to use for the request. |
+| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
+| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
+| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.mdx) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
+
+### Response
+
+**Promise\<[models.InternDaemonAccess](../../models/interndaemonaccess.mdx)\>**
+
+### Errors
+
+| Error Type | Status Code | Content Type |
+| ----------------------------- | ----------------------------- | ----------------------------- |
+| errors.InternLifecycleError | 401, 403, 404, 408, 409, 429 | application/json |
+| errors.InternLifecycleError | 500 | application/json |
+| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
+
## provisionIntern
Starts the first boot, or resumes an intern after suspension. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
diff --git a/jsr.json b/jsr.json
index 6ab08e9c0..ed48b8255 100644
--- a/jsr.json
+++ b/jsr.json
@@ -2,7 +2,7 @@
{
"name": "@openrouter/sdk",
- "version": "1.3.24",
+ "version": "1.3.25",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
diff --git a/package.json b/package.json
index c51e7de8b..77302f8f9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@openrouter/sdk",
- "version": "1.3.24",
+ "version": "1.3.25",
"author": "OpenRouter",
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
"keywords": [
@@ -73,15 +73,15 @@
"lint": "eslint --cache --max-warnings=0 src",
"build": "tsc && node scripts/unbarrel-imports.js",
"prepublishOnly": "npm run build",
- "typecheck": "tsc --noEmit",
- "typecheck:transit": "exit 0",
- "postinstall": "node scripts/check-types.js || true",
- "test": "vitest --run --project unit",
- "test:e2e": "vitest --run --project e2e",
"compile": "tsc && node scripts/unbarrel-imports.js",
"prepare": "npm run build",
"test:transit": "exit 0",
- "test:watch": "vitest --watch --project unit"
+ "test:watch": "vitest --watch --project unit",
+ "postinstall": "node scripts/check-types.js || true",
+ "test": "vitest --run --project unit",
+ "test:e2e": "vitest --run --project e2e",
+ "typecheck": "tsc --noEmit",
+ "typecheck:transit": "exit 0"
},
"peerDependencies": {
diff --git a/src/funcs/internsGetInternDaemonAccess.ts b/src/funcs/internsGetInternDaemonAccess.ts
new file mode 100644
index 000000000..54d97bd84
--- /dev/null
+++ b/src/funcs/internsGetInternDaemonAccess.ts
@@ -0,0 +1,210 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ * @generated-id: 464f7f69e2f0
+ */
+
+import { OpenRouterCore } from "../core.js";
+import { encodeSimple } from "../lib/encodings.js";
+import { matchStatusCode } from "../lib/http.js";
+import * as M from "../lib/matchers.js";
+import { compactMap } from "../lib/primitives.js";
+import { safeParse } from "../lib/schemas.js";
+import { RequestOptions } from "../lib/sdks.js";
+import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
+import { pathToFunc } from "../lib/url.js";
+import {
+ ConnectionError,
+ InvalidRequestError,
+ RequestAbortedError,
+ RequestTimeoutError,
+ UnexpectedClientError,
+} from "../models/errors/httpclienterrors.js";
+import * as errors from "../models/errors/index.js";
+import { OpenRouterError } from "../models/errors/openroutererror.js";
+import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
+import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
+import * as models from "../models/index.js";
+import * as operations from "../models/operations/index.js";
+import { APICall, APIPromise } from "../types/async.js";
+import { Result } from "../types/fp.js";
+
+/**
+ * Get an intern's daemon access
+ *
+ * @remarks
+ * Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, each reveal is logged by caller and intern, and a caller may make 10 reveals per minute. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
+ *
+ * If set, this operation will use {@link Security.apiKey} from the global security.
+ */
+export function internsGetInternDaemonAccess(
+ client: OpenRouterCore,
+ request: operations.GetInternDaemonAccessRequest,
+ options?: RequestOptions,
+): APIPromise<
+ Result<
+ models.InternDaemonAccess,
+ | errors.InternLifecycleError
+ | OpenRouterError
+ | ResponseValidationError
+ | ConnectionError
+ | RequestAbortedError
+ | RequestTimeoutError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
+ >
+> {
+ return new APIPromise($do(
+ client,
+ request,
+ options,
+ ));
+}
+
+async function $do(
+ client: OpenRouterCore,
+ request: operations.GetInternDaemonAccessRequest,
+ options?: RequestOptions,
+): Promise<
+ [
+ Result<
+ models.InternDaemonAccess,
+ | errors.InternLifecycleError
+ | OpenRouterError
+ | ResponseValidationError
+ | ConnectionError
+ | RequestAbortedError
+ | RequestTimeoutError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
+ >,
+ APICall,
+ ]
+> {
+ const parsed = safeParse(
+ request,
+ (value) =>
+ operations.GetInternDaemonAccessRequest$outboundSchema.parse(value),
+ "Input validation failed",
+ );
+ if (!parsed.ok) {
+ return [parsed, { status: "invalid" }];
+ }
+ const payload = parsed.value;
+ const body = null;
+
+ const pathParams = {
+ internId: encodeSimple("internId", payload.internId, {
+ explode: false,
+ charEncoding: "percent",
+ }),
+ };
+ const path = pathToFunc("/interns/{internId}/daemon-access")(pathParams);
+
+ const headers = new Headers(compactMap({
+ Accept: "application/json",
+ "HTTP-Referer": encodeSimple(
+ "HTTP-Referer",
+ payload["HTTP-Referer"] ?? client._options.httpReferer,
+ { explode: false, charEncoding: "none" },
+ ),
+ "X-OpenRouter-Categories": encodeSimple(
+ "X-OpenRouter-Categories",
+ payload.appCategories ?? client._options.appCategories,
+ { explode: false, charEncoding: "none" },
+ ),
+ "X-OpenRouter-Title": encodeSimple(
+ "X-OpenRouter-Title",
+ payload.appTitle ?? client._options.appTitle,
+ { explode: false, charEncoding: "none" },
+ ),
+ }));
+
+ const secConfig = await extractSecurity(client._options.apiKey);
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
+ const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
+
+ const context = {
+ options: client._options,
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
+ operationID: "getInternDaemonAccess",
+ oAuth2Scopes: null,
+
+ resolvedSecurity: requestSecurity,
+
+ securitySource: client._options.apiKey,
+ retryConfig: options?.retries
+ || client._options.retryConfig
+ || {
+ strategy: "backoff",
+ backoff: {
+ initialInterval: 500,
+ maxInterval: 60000,
+ exponent: 1.5,
+ maxElapsedTime: 3600000,
+ },
+ retryConnectionErrors: true,
+ }
+ || { strategy: "none" },
+ retryCodes: options?.retryCodes || ["5XX"],
+ };
+
+ const requestRes = client._createRequest(context, {
+ security: requestSecurity,
+ method: "GET",
+ baseURL: options?.serverURL,
+ path: path,
+ headers: headers,
+ body: body,
+ userAgent: client._options.userAgent,
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
+ }, options);
+ if (!requestRes.ok) {
+ return [requestRes, { status: "invalid" }];
+ }
+ const req = requestRes.value;
+
+ const doResult = await client._do(req, {
+ context,
+ isErrorStatusCode: (statusCode: number) =>
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
+ retryConfig: context.retryConfig,
+ retryCodes: context.retryCodes,
+ });
+ if (!doResult.ok) {
+ return [doResult, { status: "request-error", request: req }];
+ }
+ const response = doResult.value;
+
+ const responseFields = {
+ HttpMeta: { Response: response, Request: req },
+ };
+
+ const [result] = await M.match<
+ models.InternDaemonAccess,
+ | errors.InternLifecycleError
+ | OpenRouterError
+ | ResponseValidationError
+ | ConnectionError
+ | RequestAbortedError
+ | RequestTimeoutError
+ | InvalidRequestError
+ | UnexpectedClientError
+ | SDKValidationError
+ >(
+ M.json(200, models.InternDaemonAccess$inboundSchema),
+ M.jsonErr(
+ [401, 403, 404, 408, 409, 429],
+ errors.InternLifecycleError$inboundSchema,
+ ),
+ M.jsonErr(500, errors.InternLifecycleError$inboundSchema),
+ M.fail("4XX"),
+ M.fail("5XX"),
+ )(response, req, { extraFields: responseFields });
+ if (!result.ok) {
+ return [result, { status: "complete", request: req, response }];
+ }
+
+ return [result, { status: "complete", request: req, response }];
+}
diff --git a/src/lib/config.ts b/src/lib/config.ts
index acd70fed7..74c93f9b7 100644
--- a/src/lib/config.ts
+++ b/src/lib/config.ts
@@ -79,7 +79,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.0",
- sdkVersion: "1.3.24",
+ sdkVersion: "1.3.25",
genVersion: "2.914.0",
- userAgent: "speakeasy-sdk/typescript 1.3.24 2.914.0 1.0.0 @openrouter/sdk",
+ userAgent: "speakeasy-sdk/typescript 1.3.25 2.914.0 1.0.0 @openrouter/sdk",
} as const;
diff --git a/src/models/index.ts b/src/models/index.ts
index 02e618be2..72d92b2c5 100644
--- a/src/models/index.ts
+++ b/src/models/index.ts
@@ -347,6 +347,7 @@ export * from "./internchattoolcallfunction.js";
export * from "./internchattoolmessage.js";
export * from "./internchatusage.js";
export * from "./internchatusermessage.js";
+export * from "./interndaemonaccess.js";
export * from "./interninvokeacceptedresponse.js";
export * from "./interninvokerequest.js";
export * from "./internlifecycleerror.js";
diff --git a/src/models/interndaemonaccess.ts b/src/models/interndaemonaccess.ts
new file mode 100644
index 000000000..7f67f5db6
--- /dev/null
+++ b/src/models/interndaemonaccess.ts
@@ -0,0 +1,36 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ * @generated-id: 3e1c71908a89
+ */
+
+import * as z from "zod/v4";
+import { safeParse } from "../lib/schemas.js";
+import { Result as SafeParseResult } from "../types/fp.js";
+import { SDKValidationError } from "./errors/sdkvalidationerror.js";
+
+/**
+ * The intern daemon's origin and the bearer `ori tui --host` sends to it as `ORI_DAEMON_TOKEN`.
+ */
+export type InternDaemonAccess = {
+ origin: string;
+ token: string;
+};
+
+/** @internal */
+export const InternDaemonAccess$inboundSchema: z.ZodType<
+ InternDaemonAccess,
+ unknown
+> = z.object({
+ origin: z.string(),
+ token: z.string(),
+});
+
+export function internDaemonAccessFromJSON(
+ jsonString: string,
+): SafeParseResult {
+ return safeParse(
+ jsonString,
+ (x) => InternDaemonAccess$inboundSchema.parse(JSON.parse(x)),
+ `Failed to parse 'InternDaemonAccess' from JSON`,
+ );
+}
diff --git a/src/models/operations/getinterndaemonaccess.ts b/src/models/operations/getinterndaemonaccess.ts
new file mode 100644
index 000000000..3a95dde7c
--- /dev/null
+++ b/src/models/operations/getinterndaemonaccess.ts
@@ -0,0 +1,88 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ * @generated-id: 2320374f9c4b
+ */
+
+import * as z from "zod/v4";
+import { remap as remap$ } from "../../lib/primitives.js";
+
+export type GetInternDaemonAccessGlobals = {
+ /**
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ *
+ * @remarks
+ * This is used to track API usage per application.
+ */
+ httpReferer?: string | undefined;
+ /**
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+ *
+ * @remarks
+ */
+ appTitle?: string | undefined;
+ /**
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
+ *
+ * @remarks
+ */
+ appCategories?: string | undefined;
+};
+
+export type GetInternDaemonAccessRequest = {
+ /**
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
+ *
+ * @remarks
+ * This is used to track API usage per application.
+ */
+ httpReferer?: string | undefined;
+ /**
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
+ *
+ * @remarks
+ */
+ appTitle?: string | undefined;
+ /**
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
+ *
+ * @remarks
+ */
+ appCategories?: string | undefined;
+ /**
+ * ID of an intern visible to the authenticated API key.
+ */
+ internId: string;
+};
+
+/** @internal */
+export type GetInternDaemonAccessRequest$Outbound = {
+ "HTTP-Referer"?: string | undefined;
+ appTitle?: string | undefined;
+ appCategories?: string | undefined;
+ internId: string;
+};
+
+/** @internal */
+export const GetInternDaemonAccessRequest$outboundSchema: z.ZodType<
+ GetInternDaemonAccessRequest$Outbound,
+ GetInternDaemonAccessRequest
+> = z.object({
+ httpReferer: z.string().optional(),
+ appTitle: z.string().optional(),
+ appCategories: z.string().optional(),
+ internId: z.string(),
+}).transform((v) => {
+ return remap$(v, {
+ httpReferer: "HTTP-Referer",
+ });
+});
+
+export function getInternDaemonAccessRequestToJSON(
+ getInternDaemonAccessRequest: GetInternDaemonAccessRequest,
+): string {
+ return JSON.stringify(
+ GetInternDaemonAccessRequest$outboundSchema.parse(
+ getInternDaemonAccessRequest,
+ ),
+ );
+}
diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts
index 9e8e47be0..dcf5f911b 100644
--- a/src/models/operations/index.ts
+++ b/src/models/operations/index.ts
@@ -59,6 +59,7 @@ export * from "./getfilemetadata.js";
export * from "./getgeneration.js";
export * from "./getguardrail.js";
export * from "./getintern.js";
+export * from "./getinterndaemonaccess.js";
export * from "./getkey.js";
export * from "./getmodel.js";
export * from "./getmodels.js";
diff --git a/src/sdk/interns.ts b/src/sdk/interns.ts
index 305808e5f..9ee4f78cb 100644
--- a/src/sdk/interns.ts
+++ b/src/sdk/interns.ts
@@ -7,6 +7,7 @@ import { internsChat } from "../funcs/internsChat.js";
import { internsCreateIntern } from "../funcs/internsCreateIntern.js";
import { internsDeleteIntern } from "../funcs/internsDeleteIntern.js";
import { internsGetIntern } from "../funcs/internsGetIntern.js";
+import { internsGetInternDaemonAccess } from "../funcs/internsGetInternDaemonAccess.js";
import { internsInvoke } from "../funcs/internsInvoke.js";
import { internsListInterns } from "../funcs/internsListInterns.js";
import { internsProvisionIntern } from "../funcs/internsProvisionIntern.js";
@@ -103,6 +104,23 @@ export class Interns extends ClientSDK {
));
}
+ /**
+ * Get an intern's daemon access
+ *
+ * @remarks
+ * Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, each reveal is logged by caller and intern, and a caller may make 10 reveals per minute. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
+ */
+ async getInternDaemonAccess(
+ request: operations.GetInternDaemonAccessRequest,
+ options?: RequestOptions,
+ ): Promise {
+ return unwrapAsync(internsGetInternDaemonAccess(
+ this,
+ request,
+ options,
+ ));
+ }
+
/**
* Provision an intern
*