> ## 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.

# Quickstart

> Run your first Runflow model in under 5 minutes.

Start an AI model run with one HTTP call, then receive the result by callback or polling. This quickstart uses [Background Removal](/models/runflow/background-removal) (`$0.045/request`).

## 1. Get a key

Sign in at [app.runflow.io/settings/api-keys](https://app.runflow.io/settings/api-keys), create a key, and export it:

```bash theme={"dark"}
export RUNFLOW_API_KEY="your_api_key_here"
```

## 2. Run the model

<CodeGroup>
  ```bash cURL theme={"dark"}
  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"
    }'
  ```

  ```python Python theme={"dark"}
  import os, requests

  response = requests.post(
      "https://api.runflow.io/v1/models/runflow/background-removal/runs",
      headers={"Authorization": f"Bearer {os.environ['RUNFLOW_API_KEY']}"},
      json={
          "input": {
              "image_url": "https://public.runflow.io/images/models/runflow/background-removal/examples/1/before.webp",
          },
          "callback_url": "https://your-server.com/webhook",
      },
  )
  print(response.json())
  ```

  ```javascript Node.js theme={"dark"}
  const response = await fetch(
    "https://api.runflow.io/v1/models/runflow/background-removal/runs",
    {
      method: "POST",
      headers: {
        "Authorization": `Bearer ${process.env.RUNFLOW_API_KEY}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        input: {
          image_url: "https://public.runflow.io/images/models/runflow/background-removal/examples/1/before.webp",
        },
        callback_url: "https://your-server.com/webhook",
      }),
    },
  );
  console.log(await response.json());
  ```
</CodeGroup>

## 3. Read the response

The API returns the run record immediately:

```json theme={"dark"}
{
  "id": "01J0...",
  "status_code": "queued",
  "model": "runflow/background-removal"
}
```

Use the `id` to either poll [`GET /v1/runs/{id}`](/api-reference/runs/get-run) or wait for the callback at `callback_url`. See [Callbacks](/concepts/callbacks) for the async pattern.

<Check>Got an `id`? You're done.</Check>

## What's next

<CardGroup cols={2}>
  <Card title="Browse models" icon="grid" href="/models">Browse the full catalog.</Card>
  <Card title="Authentication" icon="key" href="/concepts/authentication">Bearer tokens, key rotation.</Card>
  <Card title="Callbacks" icon="webhook" href="/concepts/callbacks">Handle the async result.</Card>
  <Card title="Errors" icon="triangle-exclamation" href="/concepts/errors">Status codes and the error envelope.</Card>
</CardGroup>
