Developers

OpenCharts REST API

Create and manage projects, sheets, boards, personas, and agents — and generate images, video, music, and code with Theo — from your own backend. Available on the Unlimited and Teams plans.

Looking for the full documentation?This article is the overview. The canonical developer documentation (guides, code samples in curl / JavaScript / Python, and the complete endpoint reference) lives in the Developers hub docs.

Authentication

Every request authenticates with an OpenCharts API key passed as a Bearer token. Create and manage keys in the Developers hub. Keys are the same oc_ keys the MCP server accepts, and carry read, write, and ai scopes.

Base URL

https://www.opencharts.com/api/v1
Keys are shown onceThe full key is displayed only at creation and is hashed at rest — OpenCharts never stores the raw key. If you lose it, revoke it and create a new one.

Quick start

# 1. Create a key in the Developers hub, then:
curl https://www.opencharts.com/api/v1/account \
  -H "Authorization: Bearer oc_your_api_key"

# Generate an image (synchronous)
curl -X POST https://www.opencharts.com/api/v1/images \
  -H "Authorization: Bearer oc_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"a neon fox, flat vector","aspectRatio":"1:1"}'

# Start a video job, then poll it
curl -X POST https://www.opencharts.com/api/v1/videos \
  -H "Authorization: Bearer oc_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"slow dolly over a misty forest at dawn"}'
# → { "jobId": "vid_abc123", "status": "queued", "pollUrl": "/api/v1/jobs/vid_abc123" }

curl https://www.opencharts.com/api/v1/jobs/vid_abc123 \
  -H "Authorization: Bearer oc_your_api_key"

Scopes

read

List and fetch resources (GET).

write

Create, update, and delete resources.

ai

Generate media, run agents, and research (consumes AI credits).

Chat & conversations

POST /api/v1/chat runs a Theo turn with tools — it streams the same UI-message SSE the in-app client consumes (point useChat from @ai-sdk/react at it), or returns the assembled message + artifacts with stream: false. Launch modes are fast and think; Theo can create flowcharts, whiteboards, notes, presentations, sheets, boards, documents, images, video, and music from a prompt. Async artifacts carry an apiJobId pollable at the jobs endpoint below. Threads persist as normal conversations (they appear in your in-app sidebar) and are managed via /api/v1/conversations (list / create / get / update / delete + /messages). You can also extract a flowchart from an uploaded PDF, PPTX, or image via POST /api/v1/extract-flowchart.

Async jobs

Long-running operations — video, music, code builds, and deep research — return a job envelope immediately with a type-prefixed jobId (vid_, song_, code_, res_). Poll GET /api/v1/jobs/{jobId} until status is complete or failed — or register a webhook and skip polling entirely.

Neutral statuses: queued processing complete / failed.

Webhooks

Register HTTPS endpoints to be notified when jobs finish instead of polling. Manage them in the Developers hub or via /api/v1/webhooks. Each delivery is signed with your webhook secret (HMAC), retried on failure, and logged. Events include video.completed, song.completed, code_build.completed, research.completed (and their .failed counterparts), plus project and team events.

Verify the signatureAlways verify the HMAC signature header against your stored secret before trusting a delivery. The secret is shown once, at webhook creation.

Rate limits & plans

The API is available on the Unlimited and Teams plans. Requests are rate-limited per key; every response includes X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers.

AI endpoints (images, video, music, code builds, research, agents) consume AI credits from your plan balance. Check it with GET /api/v1/account/credits.

Errors use a consistent envelope: { error: { code, message, requestId } }. Send idempotent job POSTs with an Idempotency-Key header to safely retry.

Reference

Related Articles

Was this article helpful?