Skip to main content
All requests to /v1/ endpoints require a valid Bearer token in the Authorization header.

Supported Bearer Tokens

The ChatATP Studio API supports two types of Bearer tokens:

Header Format

Regardless of whether you use an API Key or an OAuth Access Token, use the standard Bearer authentication scheme:

Direct Developer API Key Example

OAuth 2.1 Access Token Example

What do I put in the Bearer token for the OAuth part?When an OAuth authorization code is exchanged via POST /oauth/token/, the response body contains:
Pass the value of access_token (cat_access_...) directly in your request’s Authorization: Bearer cat_access_... header.
Never log, commit, or expose API keys or client secrets in client-side code. Public OAuth clients must authenticate with PKCE instead of client secrets.

Code Examples

cURL

JavaScript / TypeScript (fetch)

Python (httpx)

Errors

Error bodies include a human-readable message. Successful responses may include x-request-id, which the SDKs expose as requestId / request_id.