Authentication and Base URL
All CAI API requests require a bearer token and your environment base URL.
Base URL
The OpenAPI spec does not hardcode a server. Use the base URL provided for your environment.
export CAI_BASE_URL="https://your-api-host"
Authentication
Use the token in the Authorization header.
To request an API token, email [email protected].
export CAI_TOKEN="your-token"
Example request:
curl -H "Authorization: Bearer $CAI_TOKEN" \
"$CAI_BASE_URL/api/v1/user/profile"
Project ID
Most endpoints require project_id as a query parameter.
export CAI_PROJECT_ID="your-project-uuid"
curl -H "Authorization: Bearer $CAI_TOKEN" \
"$CAI_BASE_URL/api/v1/documents/list?project_id=$CAI_PROJECT_ID"
Content types
- Use
application/jsonfor JSON request bodies. - Use
multipart/form-datafor file uploads.