Docs/API Reference
REST API

API Reference

Complete reference documentation for the commandAGI REST API.

Base URL

https://api.commandAGI.com

Authentication

All API requests require authentication via Bearer token. Include your API key in the Authorization header.

Authorization: Bearer to_your_api_key_here

See Authentication for details on obtaining and managing API keys.

Response Format

All responses are JSON. Successful requests return a 2xx status code with the requested data. Errors return an appropriate status code with an error object.

Success Response
{
  "id": "prof_abc123",
  "name": "my-profile",
  "createdAt": "2024-01-15T10:30:00Z"
}
Error Response
{
  "error": "Not Found",
  "message": "Profile not found"
}

HTTP Status Codes

CodeDescription
200Request succeeded
201Resource created successfully
400Bad request - invalid parameters
401Unauthorized - invalid or missing API key
403Forbidden - insufficient permissions
404Resource not found
500Internal server error

Endpoints

Profiles

Create, manage, and query taste profiles

GET/v1/profiles
POST/v1/profiles
GET/v1/profiles/:id
PATCH/v1/profiles/:id
DELETE/v1/profiles/:id

Frames

Upload and manage reference images

GET/api/frames
POST/api/frames/upload
PUT/api/frames/upload
DELETE/api/frames

Evaluation

Score content against taste profiles

POST/v1/profiles/:id/eval

Export

Export profiles for offline use

GET/v1/profiles/:id/export

Rate Limits

API requests are rate limited based on your plan. Rate limit headers are included in every response.

Rate Limit Headers
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1705312200
PlanRequests/minRequests/day
Free601,000
Pro30010,000
EnterpriseCustomUnlimited

Official SDKs

We provide official SDKs for popular languages. These handle authentication, retries, and provide typed responses.

JavaScript / TypeScript

npm install commandAGI

Python

pip install commandAGI