Skip to main content
POST
Create Client Token Endpoint

Response Headers

header
Unique identifier for the request. Include this when contacting support.Example: f47ac10b-58cc-4372-a567-0e02b2c3d479

Headers

X-Client-Request-Id
string

Optional identifier supplied by the client to correlate this request with their own logs. When provided, the value is recorded alongside the server-assigned correlation ID in Interhuman logs to aid lookup and support investigations. This header is not echoed back in the response; the server returns its own correlation ID in the X-Correlation-ID HTTP response header.

X-Interhuman-SDK
string

Optional client SDK identity as <sdk-name>/<semver> (e.g. typescript/0.13.0), sent automatically by the first-party Interhuman SDKs. It is recorded in Interhuman telemetry so SDK adoption and version distribution are visible. The value is self-declared and not authenticated: it never affects authentication, authorization, scopes, quotas, or billing, and a missing, malformed, or unrecognized value is ignored rather than rejected.

Body

application/json

Request schema for minting an ephemeral, capped client token.

api_key
string
required

Your full API key from the Interhuman dashboard.

scopes
enum<string>[]

Scopes to grant the token. Defaults to interhumanai.stream. The key must itself hold every requested scope. A realtime session requires interhumanai.realtime. The per-token caps are enforced on streaming sessions (stream / realtime); the video budget additionally spans upload.

Minimum array length: 1

Scopes define which endpoints, and which models, the API key can call.

A scope names one operation, or one (operation, model) cell of the Inter-2 routes. The bare operation scopes are the Inter-1 cells; a model scope is the operation followed by the exact model value the route accepts.

Options:

  • interhumanai.upload for /v1/upload/analyze (Inter-1)
  • interhumanai.stream for /v1/stream/analyze (Inter-1)
  • interhumanai.realtime for /v0/realtime/analyze
  • interhumanai.upload.inter-2 for /v2/upload/analyze with model=inter-2
  • interhumanai.upload.inter-2-audio for /v2/upload/analyze with model=inter-2-audio
  • interhumanai.upload.inter-2-deep for /v2/upload/analyze with model=inter-2-deep
  • interhumanai.stream.inter-2 for /v2/stream/analyze with model=inter-2
  • interhumanai.stream.inter-2-audio for /v2/stream/analyze with model=inter-2-audio

Any interhumanai.upload.<model> scope also allows reading the account's upload jobs at /v2/upload/jobs/{job_id}. There is no stream scope for inter-2-deep: it is an upload-only model.

Available options:
interhumanai.upload,
interhumanai.stream,
interhumanai.realtime,
interhumanai.upload.inter-2,
interhumanai.upload.inter-2-audio,
interhumanai.upload.inter-2-deep,
interhumanai.stream.inter-2,
interhumanai.stream.inter-2-audio
expires_in
integer | null

Requested time-to-live in seconds. Clamped to the supported range (60–3600s). Omit to use the default. The response expires_in is authoritative.

Required range: x >= 1
max_duration_seconds
integer | null

Maximum wall-clock duration of a streaming session (stream or realtime) opened with this token.

Required range: x >= 1
max_bytes
integer | null

Maximum cumulative video bytes a session opened with this token may send.

Required range: x >= 1
max_concurrent
integer
default:1

Maximum number of concurrent streaming sessions opened with this token. Defaults to 1 (a minted token can drive only one session at a time); raise it only if a single token must power several simultaneous sessions.

Required range: x >= 1
max_video_seconds
integer | null

Maximum total seconds of video the token may process across upload, stream, and realtime combined. Metered server-side; when exhausted, further processing is refused and the client must mint a new token.

Required range: x >= 1
allowed_origins
string[] | null

Allow-list of browser Origin values permitted to use this token. When set, a connection whose Origin is absent or not listed is rejected.

Response

Successful Response

Response schema for a minted ephemeral client token.

access_token
string
required

The generated client token.

expires_in
integer
required

Time in seconds until the token expires.

scope
string
required

Space-separated list of granted scopes.

token_type
string
default:Bearer

Token type. Always Bearer.

max_duration_seconds
integer | null

Per-token max session duration that will be enforced, if any.

max_bytes
integer | null

Per-token max cumulative session bytes that will be enforced, if any.

max_concurrent
integer | null

Per-token max concurrent sessions that will be enforced, if any.

max_video_seconds
integer | null

Per-token total video-seconds budget that will be enforced, if any.

allowed_origins
string[] | null

Per-token allow-list of browser origins that will be enforced, if any.