> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelroute.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Run your first AI model execution in 5 minutes.

## Prerequisites

* A ModelRoute account at [app.modelroute.ai](https://app.modelroute.ai)
* A funded balance (executions deduct from your balance)
* An API key

## 1. Create an API key

Go to **Dashboard > API Keys > Create Key**. Copy the full key immediately — it is only shown once.

Your key looks like this:

```
sk_a1b2c3d4e5f6...remaining_hex_chars_crc32hex
```

<Warning>
  Store your API key securely. It cannot be retrieved after creation. If lost, revoke it and create a new one.
</Warning>

## 2. Submit an execution

Every execution is asynchronous. You submit a request and get a tracking ID immediately:

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.modelroute.ai/v1/executions \
    -H "Authorization: Bearer sk_your_api_key_here" \
    -H "Content-Type: application/json" \
    -H "Idempotency-Key: my-first-execution-001" \
    -d '{
      "model": "flux-1.1-pro",
      "input": {
        "prompt": "A mountain landscape at sunset, photorealistic"
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.modelroute.ai/v1/executions",
      headers={
          "Authorization": "Bearer sk_your_api_key_here",
          "Idempotency-Key": "my-first-execution-001"
      },
      json={
          "model": "flux-1.1-pro",
          "input": {
              "prompt": "A mountain landscape at sunset, photorealistic"
          }
      }
  )

  execution = response.json()
  print(f"Execution ID: {execution['id']}, Status: {execution['status']}")
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch("https://api.modelroute.ai/v1/executions", {
    method: "POST",
    headers: {
      "Authorization": "Bearer sk_your_api_key_here",
      "Content-Type": "application/json",
      "Idempotency-Key": "my-first-execution-001"
    },
    body: JSON.stringify({
      model: "flux-1.1-pro",
      input: {
        prompt: "A mountain landscape at sunset, photorealistic"
      }
    })
  });

  const execution = await response.json();
  console.log(`Execution ID: ${execution.id}, Status: ${execution.status}`);
  ```
</CodeGroup>

You'll receive a `202 Accepted`:

```json theme={null}
{
  "id": "exec_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "PENDING",
  "model": "flux-1.1-pro",
  "hold_amount": "0.048",
  "estimated_cost": "0.040",
  "expires_at": "2026-03-20T10:35:00Z"
}
```

## 3. Poll for the result

For this quickstart, we'll poll. (In production, you'd [use webhooks](/executions/webhooks) instead.)

```bash theme={null}
# Poll until complete
curl -s https://api.modelroute.ai/v1/executions/exec_a1b2c3d4.../result \
  -H "Authorization: Bearer sk_your_api_key_here" | jq
```

```json theme={null}
{
  "execution_id": "exec_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "COMPLETED",
  "output": {
    "images": [
      {
        "file_id": "file_f47ac10b-58cc-4372-a567-0e02b2c3d479",
        "format": "png",
        "width": 1024,
        "height": 768
      }
    ]
  },
  "cost": "0.040",
  "latency_ms": 8420
}
```

## 4. Download the result

```bash theme={null}
curl -X GET https://api.modelroute.ai/v1/files/file_f47ac10b.../download \
  -H "Authorization: Bearer sk_your_api_key_here" \
  -o result.png
```

That's it — you've run your first AI model execution through ModelRoute.

## What's next?

<CardGroup cols={3}>
  <Card title="Authentication" icon="key" href="/authentication">
    API key management, rotation, and permissions.
  </Card>

  <Card title="Webhooks" icon="bell" href="/executions/webhooks">
    Receive results instantly at scale.
  </Card>

  <Card title="File Uploads" icon="upload" href="/files/uploading">
    Upload images, audio, and video as execution inputs.
  </Card>
</CardGroup>
