Sandbox

Mint a sandbox key (no auth)

Create a free, instant pyai_test_ sandbox key with no human steps, no email, no password, no card. Built for AI coding agents (Cursor, Lovable, Claude Code, Codex) and the PyAI MCP server's create_sandbox_key tool, so agent-generated code runs on its first execution instead of stalling at a credential wall. The key is a normal sandbox key: it skips the credit gate (never returns 402), includes Hear/Speak/Omni/AMD/Recap starter scopes, enables Recap on the new org, expires automatically, and is bounded by a daily usage cap. Public and unauthenticated; rate-limited per source network. Treat the returned key as an opaque secret (read it from an env var). For production, create a live key in the console. May be disabled on some deployments (returns 404).

post/v1/sandbox/keys

Request

  • Base URL: https://api.pyai.com
  • URL: https://api.pyai.com/v1/sandbox/keys
  • Auth: none required

Request body

labelstring

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

referral_tokenstring

Optional signed first-touch attribution token.

Response

A freshly minted sandbox key.

object'sandbox.key' required
api_keystring required

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

key_idstring
org_idstring
project_idstring
environment'test' required
scopesstring[]

Starter scopes: Hear, Speak, Omni, AMD, Recap, and Cast.

expires_atinteger required

Key expiry, Unix epoch milliseconds.

base_urlstring required

REST base URL to use with this key.

docsstring
notestring

Example response

{
  "scopes": [
    "hear:transcribe",
    "hear:stream",
    "hear:configure",
    "transcribe:jobs",
    "speak:synthesize",
    "omni:session",
    "amd:detect",
    "amd:configure",
    "amd:read",
    "cast:render",
    "recap:configure",
    "recap:read"
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.