---
title: "Mint a browser interpretation token"
method: POST
path: "/v1/audio/interpretations/sessions"
tags: ["Interpretation"]
---

# Mint a browser interpretation token

`POST /v1/audio/interpretations/sessions`

## Request

- Base URL: `https://api.pyai.com`
- URL: `https://api.pyai.com/v1/audio/interpretations/sessions`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Call from your server with a live secret key holding interpret:session. The token carries only that scope, one concurrent session and the exact allowed origins, with a default lifetime of 60 seconds (maximum 600). Credit and concurrency checks still apply at connect. A browser token cannot mint another token. A parent key with a monthly spending limit cannot delegate browser sessions; its limit continues to apply to direct server connections.

## Request body

- object
  - `allowed_origins` string[], required
  - `ttl_seconds` integer

## Response `201`

Origin-locked browser capability

- object
  - `object` 'interpretation.session', required
  - `token` string, required
  - `url` 'wss://api.pyai.com/v1/audio/interpretations/stream', required
  - `expires_at` integer, required: Unix milliseconds.
  - `project_id` string, required
  - `billing` 'credits', required

## Other responses

- `400`: Invalid request (bad field, unsupported value)
- `401`: Missing or invalid API key (`code: unauthorized`)
- `403`: Key lacks the required scope or the origin is not allow-listed (`code: forbidden | origin_not_allowed`)

---

[API](https://skmtc.dev/pyai/apis/pyai-api.md) · [All operations](https://skmtc.dev/pyai/apis/pyai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pyai/apis/pyai-api/revisions/819d8e7c4d09?raw)
