Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.runflow.io/llms.txt

Use this file to discover all available pages before exploring further.

Start an AI model run with one HTTP call, then receive the result by callback or polling. This quickstart uses Background Removal ($0.045/request).

1. Get a key

Sign in at app.runflow.io/settings/api-keys, create a key, and export it:
export RUNFLOW_API_KEY="your_api_key_here"

2. Run the model

curl -X POST https://api.runflow.io/v1/models/runflow/background-removal/runs \
  -H "Authorization: Bearer $RUNFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "image_url": "https://public.runflow.io/images/models/runflow/background-removal/examples/1/before.webp"
    },
    "callback_url": "https://your-server.com/webhook"
  }'

3. Read the response

The API returns the run record immediately:
{
  "id": "01J0...",
  "status_code": "queued",
  "model": "runflow/background-removal"
}
Use the id to either poll GET /v1/runs/{id} or wait for the callback at callback_url. See Callbacks for the async pattern.
Got an id? You’re done.

What’s next

Browse models

Browse the full catalog.

Authentication

Bearer tokens, key rotation.

Callbacks

Handle the async result.

Errors

Status codes and the error envelope.