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

# Quickstart

> Create a key, choose a model, and send text, image, or video requests.

This guide takes you from a new account to a working SnapGen request.

## Step 1: Get an API key

1. [Create a SnapGen account](https://snapgen.org/sign-up).
2. Add prepaid balance under **Console > Billing**.
3. Open **Console > API Keys** and create a key.
4. Store the key in a server-side environment variable.

```bash theme={null}
export SNAPGEN_API_KEY="sk-xxxx"
```

## Step 2: Choose a model

List the models available to your key:

```bash theme={null}
curl https://api.snapgen.org/v1/models \
  -H "Authorization: Bearer $SNAPGEN_API_KEY"
```

Start with one of these routes:

| Modality | Model             | Price                                    |
| -------- | ----------------- | ---------------------------------------- |
| Text     | `gpt-5.4-mini`    | $0.25 input / $1.50 output per 1M tokens |
| Image    | `gpt-image-2`     | \$0.01 per image                         |
| Video    | `gemini-omni-t2v` | \$0.25 per 10-second request             |

## Step 3: Send a request

<CodeGroup>
  ```bash Text theme={null}
  curl https://api.snapgen.org/v1/chat/completions \
    -H "Authorization: Bearer $SNAPGEN_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "gpt-5.4-mini",
      "messages": [{"role": "user", "content": "Write one welcome sentence."}]
    }'
  ```

  ```bash Image theme={null}
  curl https://api.snapgen.org/v1/images/generations \
    -H "Authorization: Bearer $SNAPGEN_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "gpt-image-2",
      "prompt": "A clean indigo paper lantern on a white background",
      "size": "1024x1024"
    }'
  ```

  ```bash Video theme={null}
  curl https://api.snapgen.org/v1/videos \
    -H "Authorization: Bearer $SNAPGEN_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "gemini-omni-t2v",
      "prompt": "A paper airplane glides through a sunlit library",
      "seconds": "10",
      "size": "1280x720"
    }'
  ```
</CodeGroup>

Text and image requests return their content directly. Video requests return a task `id` because generation is asynchronous.

## Step 4: Check a video task

```bash theme={null}
curl "https://api.snapgen.org/v1/videos/$VIDEO_ID?model=gemini-omni-t2v" \
  -H "Authorization: Bearer $SNAPGEN_API_KEY"
```

When the status becomes `completed`, download the file:

```bash theme={null}
curl -L "https://api.snapgen.org/v1/videos/$VIDEO_ID/content?model=gemini-omni-t2v" \
  -H "Authorization: Bearer $SNAPGEN_API_KEY" \
  --output video.mp4
```

## Next steps

<CardGroup cols={2}>
  <Card title="Model pages" icon="sparkles" href="/api-manual/text/gpt-5-4">
    Review exact parameters and prices for every live model.
  </Card>

  <Card title="Development tools" icon="code" href="/integrations">
    Connect Claude Code, Cursor, Cline, Gemini CLI, or Codex CLI.
  </Card>

  <Card title="Video workflow" icon="video" href="/guides/video-workflow">
    Build reliable polling, download, and webhook handling.
  </Card>

  <Card title="Error handling" icon="triangle-exclamation" href="/errors">
    Recover from authentication, quota, rate-limit, and upstream errors.
  </Card>
</CardGroup>
