DocumentationInstallation

Installation

Get your API key and make your first Tasks API request.

Create an API Key

Recommended: Create keys in Settings > API Keys in the app. This is the simplest way to generate and manage keys.

Alternative: Use the API directly via POST /api/v1/api-keys (requires session auth; you must be logged in):

bash
curl -X POST https://<your-domain>/api/v1/api-keys \
  -H "Content-Type: application/json" \
  -b "COOKIE_FROM_BROWSER" \
  -d '{"name": "my-key"}'

The response includes the full key in the key field. Save it immediately. It is hashed before storage and cannot be retrieved again.

First Request

Create a task run:

bash
curl -X POST https://<your-domain>/api/v1/tasks/runs \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk-flow-YOUR_KEY" \
  -H "Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000" \
  -d '{
    "input": {
      "prompt": "What is 2+2?",
      "model": "gpt-5.6-luna"
    }
  }'

Response (202):

json
{
  "run_id": "run_abc123...",
  "session_id": "uuid",
  "status": "running",
  "created_at": "2026-02-27T00:00:00.000Z"
}

Use the run_id to poll status or stream events. See Usage Guide for the full flow.