Skip to content

Create a scoped expiring personal token; scopes never replace resource authorization.

POST
/api/v1/tokens

Issue a bounded personal token once; store its returned secret privately.

Credential scopes: tokens:manage

Resource authority: Authenticated account manages its own personal credentials; no model-user or connector role is required.

Retry: Repeat inventory GET safely. Token issuance is not an idempotent reservation; after uncertainty inspect inventory before issuing another token.

Guards: Requested scopes cannot exceed parent scopes and expiration cannot exceed parent lifetime.

Retain: Account, token ID/name/scopes and inventory cursor; token secret is returned only at issuance.

Specific failures: 403 insufficient_scope or scope_escalation; 422 invalid_token_request

Next action: Save issued secret privately; inventory never reveals it. Worked workflow

Media typeapplication/json
object
expires_in_seconds
required
integer format: int64
>= 1 <= 31536000
name
required

1–200 UTF-8 bytes without surrounding whitespace or control characters.

string
>= 1 characters <= 200 characters
scopes
required
Array<string>
>= 1 items <= 18 items
Allowed values: me:read models:read models:manage runs:create runs:read runs:cancel uploads:create uploads:read uploads:complete artifacts:read artifacts:download connectors:read connectors:manage access:manage tokens:manage audit:read service:read service:manage

Examples

Exampleissue-token

issue-token

Inventory never returns a secret. Issuance returns the secret only once. Values are inert fixtures.

{
"expires_in_seconds": 86400,
"name": "analysis-script",
"scopes": [
"models:read",
"runs:read"
]
}

Create a scoped expiring personal token; scopes never replace resource authorization.

Media typeapplication/json

Delivered exactly once. Store privately and never print to diagnostic logs.

object
expires_at
required
string format: date-time
id
required
string format: uuid
scopes
required
Array<string>
>= 1 items <= 18 items
Allowed values: me:read models:read models:manage runs:create runs:read runs:cancel uploads:create uploads:read uploads:complete artifacts:read artifacts:download connectors:read connectors:manage access:manage tokens:manage audit:read service:read service:manage
token
required
string
user_id
required
string format: uuid

Examples

Exampleissue-token

issue-token

Inventory never returns a secret. Issuance returns the secret only once. Values are inert fixtures.

{
"expires_at": "2026-11-03T10:00:00Z",
"id": "00000000-0000-4000-8000-000000000010",
"scopes": [
"models:read",
"runs:read"
],
"token": "fixture-only-not-a-credential",
"user_id": "00000000-0000-4000-8000-000000000002"
}
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

Malformed request.

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

Valid active credential required; connector and user credentials are separate.

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

The token does not permit this operation.

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

Resource absent or outside the caller’s authority.

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

Concurrent generation/publication change, conflicting retry, or a publication awaiting connector validation.

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

413: the request body exceeds the configured size limit.

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

Request fields, manifest, installation policy, or limits are invalid.

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

Authentication, identity provider, or management state is temporarily unavailable.

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

An HTTP request failed; inspect the stable error code and request ID.

Media typeapplication/json

The common JSON body for errors returned by the HTTP application.

object
code
required

Stable machine-readable error code.

string
details
One of:
null
message
required

Safe explanation without internal errors or submitted input values.

string
request_id
required

Matches the response’s x-request-id header.

string
Cache-Control
string

No-store

x-request-id
string

Always present. A fresh server-generated UUID for this request; incoming IDs are ignored. On errors, this equals the response body’s request_id.

Documentation 205dcb3116ea · public sources 8c70356d340f · built .Download documentation identity.