Developer docs

The OpenAI-compatible /v1 API: auth, endpoints, webhooks and machine-readable files

01/ 07

Overview

parrot.amorist.cn is account, billing and relay in one service

AI WORKSHOP runs the OpenAI-compatible relay API behind the Parrot AI desktop app and third-party clients: chat, image generation, asynchronous video and 3D, embeddings and a model catalogue, all billed in credits. The base URL ishttps://parrot.amorist.cn/v1.

Every /v1 request must be authenticated: send theAuthorization: Bearer <token> request header, with a token minted byPOST /api/auth/login(phone number + password). In the browser, a web session or thedsh_tokencookie works too. Unauthenticated requests get 401.

Billing runs on credits: each call deducts from your balance by model and usage, itemised in the account centre. A short balance returns 402; a rate-limited call returns 429.

02/ 07

Endpoints

The /v1 surface at a glance

  • GET/v1/models

    Model catalogue (with credit price previews and provenance)

  • POST/v1/chat/completions

    Chat completion, OpenAI compatible, supports stream

  • POST/v1/images/generations

    Image generation

  • POST/v1/videos/generations

    Create a video job (asynchronous)

  • GET/v1/videos/generations/{taskId}

    Query a video job's status

  • POST/v1/videos/generations/{taskId}/cancel

    Cancel a video job

  • POST/v1/embeddings

    Embeddings

  • POST/v1/3d/generations

    Create a 3D generation job (asynchronous)

  • GET/v1/3d/generations/{taskId}

    Query a 3D job's status

  • POST/v1/3d/generations/{taskId}/cancel

    Cancel a 3D job

  • POST/v1/audio/tts

    Speech synthesis (Fish Audio / Doubao Voice)

  • POST/v1/audio/generations

    Audio generation: sound effects / music / multi-speaker voice direction

  • POST/v1/audio/transcriptions

    Subtitles: submit a transcription job (asynchronous)

  • GET/v1/audio/transcriptions/{taskId}

    Query a subtitle job's status and segments

  • GET/v1/audio/voices

    Voice catalogue: presets plus your own cloned voices

  • POST/v1/audio/clones

    Voice cloning: upload reference audio to train a voice

  • GET/v1/audio/clones/{voiceId}

    Query a cloned voice's status

  • DELETE/v1/audio/clones/{voiceId}

    Delete a cloned voice

Video and 3D generation are asynchronous jobs: after creating one, pollGET .../{taskId} until it finishes, and cancel it if you need to.

03/ 07

Auth and accounts

Register with a phone number, sign in, refresh

  • POST /api/auth/registerPhone number + password

    Sign up and you can sign in right away. An invite code is optional.

  • POST /api/auth/loginReturns a Bearer JWT

    Desktop apps and third-party clients use it to obtain a /v1 access token.

  • POST /api/auth/refreshRenewal

    Refresh once a token expires, without signing in again.

04/ 07

Webhook

Alipay asynchronous notification

Payment results arrive as a server-to-server notification:POST https://parrot.amorist.cn/api/payment/alipay/notify. The notification carries an Alipay signature, and orders and credited balances only move once the server has verified it. Never trust a payment callback whose signature was not checked.

05/ 07

Rate limits and versioning

RateLimit headers and the deprecation policy

Every /v1 response carries RFC 9218 rate-limit headers:RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset(600 requests/minute per user and 240 per IP by default, both adjustable through deployment environment variables). A limited request returns 429 with aRetry-Aftervalue in seconds.

The major version lives in the URL path (currently /v1). When a new major version ships, the old one stays in service for at least 12 months. A deprecated endpoint carries aDeprecationresponse header and is announced here, through theSunsetheader, at least 30 days before it is switched off. Integrate against those two headers rather than discovering the migration at 404/410.

06/ 07

Machine-readable files

Entry points for programs and AI agents

OpenAPI 3.1 specification
Machine-readable definition of the /v1 surface — import it straight into a client generator
Data service OpenAPI 3.1
Machine-readable definition of /api/data/* (request shapes are generated from the code's source of truth, so they cannot drift from the routes)
llms.txt
The site's AI-readable index and its “when to use it” guide
sitemap.xml
Every indexable URL, including each weekly issue
robots.txt
Crawler policy — mainstream AI crawlers are explicitly allowed

Rate limits: the relay defaults to 600 requests/minute per user and 240 per IP, adjustable through deployment environment variables. For anything else, seecontact.

07/ 07

Data services

Credentials, REST and MCP

Data capabilities (social content, reviews and reputation, e-commerce products, web search, captcha solving, email, SMS receiving, IP proxies, AI interfaces) are a separate line from the /v1 relay: over there models, over here data. Each line carries its own quota, but the data serviceneeds only one credential, shared by REST and MCP.

Credentials are issued in the console under “Integrations & credentials → API Keys” (they look likeparrot_…). You can scope one to a few families of capability, you cangive that key its own quota(daily / monthly / lifetime caps on credits and calls — once it is spent, that key is refused and every other key keeps working), and you can rotate or revoke it at any time. Every request carries the same header:Authorization: Bearer parrot_…

  • GET/api/data/capabilities

    Catalogue of available data capabilities (parameter tables, pricing and availability)

  • POST/api/data/call

    Call one data capability and get a normalised result envelope

  • GET/api/data/jobs/{jobId}

    Query an async job's progress and result

  • POST/api/data/jobs/{jobId}/cancel

    Cancel an async job

  • GET/api/data/calls/{requestId}

    Look up one call's audit trail and settlement by requestId

  • GET/api/data/usage

    This account's data usage (today / last 30 days / by capability)

  • GET/api/data/scenes

    Scene packs — one call that runs an orchestration of several capabilities

MCP follows the standard protocol(Streamable HTTP): the endpoint isPOST https://parrot.amorist.cn/mcp. Handshake, tool list and calls are all standard MCP, andthat page in the consolegives a config you can paste straight in, per client (Claude Code / Cursor / ChatGPT / generic). Six tools are exposed today: list capabilities, read a capability's parameter table, call a capability, query an async job,wait for an async job to finish, and read usage.

Responses arrive over anSSE stream(text/event-stream), so the server canpush progress on its own: pass_meta.progressTokenin the request and you will receivenotifications/progress. For an asynchronous capability,data_wait_joblets the server wait for the job inside this same call (progress pushed by the server, the result row arriving with the final response), so the client never has to poll round after round. Polling and waiting are not billed. A client that only accepts a single JSON response should setAccepttoapplication/json, text/event-stream.

CallGET /api/data/usageor MCP'sdata_get_usagewith a key and the response also carries that key's quota reading (the cap and what this window has used), so a program can work out how many calls it has left.

{
  "mcpServers": {
    "parrot-data": {
      "type": "http",
      "url": "https://parrot.amorist.cn/mcp",
      "headers": {
        "Authorization": "Bearer parrot_…"
      }
    }
  }
}
Developer docs · AI WORKSHOP