Skip to main content
POST
/
v1
/
sandbox
/
keys
Mint a sandbox key (no auth)
curl --request POST \
  --url https://api.pyai.com/v1/sandbox/keys \
  --header 'Content-Type: application/json' \
  --data '
{
  "label": "<string>"
}
'
{
  "object": "sandbox.key",
  "api_key": "<string>",
  "environment": "test",
  "expires_at": 123,
  "base_url": "<string>",
  "key_id": "<string>",
  "org_id": "<string>",
  "project_id": "<string>",
  "scopes": [
    "hear:transcribe",
    "hear:stream",
    "voice:synthesize",
    "omni:session"
  ],
  "docs": "<string>",
  "note": "<string>"
}

Body

application/json
label
string

Optional human label for the throwaway org/key, shown in your console (e.g. your app name). Sanitized; never used as an identifier.

Maximum string length: 64

Response

A freshly minted sandbox key.

object
enum<string>
required
Available options:
sandbox.key
api_key
string
required

The plaintext pyai_test_... secret. Shown once — store it in an env var.

environment
enum<string>
required
Available options:
test
expires_at
integer
required

Key expiry, Unix epoch milliseconds.

base_url
string
required

REST base URL to use with this key.

key_id
string
org_id
string
project_id
string
scopes
string[]

Narrow starter scopes: Hear transcription/streaming, Speak synthesis, and Omni realtime.

Example:
[
"hear:transcribe",
"hear:stream",
"voice:synthesize",
"omni:session"
]
docs
string
note
string