Quickstart

Create a key and verify your connection.

The quickest safe integration test is the status endpoint. It validates your API key, confirms the account it belongs to, and returns the credits available before you create any generation request.

1. Create a key

Open the console, create a developer key, and store the secret once.

2. Check status

Call `GET /api/v1/status` to confirm authentication and read your current credit balance.

3. Build when ready

Move to async request creation only after your key and balance are wired correctly.

1. Create an API key

Open the developer console and create a key for your environment. The plaintext secret is shown once at creation time.

2. Save the key locally

Keep the key server-side. For a local terminal test, put it in an environment variable so it does not end up in shell history inside a full curl command.

export CANNON_API_KEY="YOUR_API_KEY"

3. Verify the key and credit balance

This request does not create a generation job, does not enqueue work, and does not spend credits. It is safe to use during onboarding, deployment checks, and backend smoke tests.

curl https://www.cannonstudio.app/api/v1/status \
  -H "x-api-key: $CANNON_API_KEY"

4. Confirm the response

A healthy response includes ok: true, the API key name and scopes, and creditsRemaining for the account.

{
  "ok": true,
  "status": "ok",
  "message": "Your API key is properly wired.",
  "creditsRemaining": 1250,
  "credits": {
    "remaining": 1250
  },
  "account": {
    "email": "you@example.com",
    "plan": "trial"
  },
  "apiKey": {
    "name": "Production Key",
    "scopes": [
      "requests:write",
      "requests:read"
    ]
  },
  "serverTime": "2026-05-01T00:00:00.000Z"
}

5. Create work only when you are ready

Once the status check passes, submit async work through POST /api/v1/requests. Request creation returns a pollable request object and stores API-originated input/output logs for 7 days.