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

# Quickstart

> Create a key, then make your first run.

## Create an API key

Sign in to the console, open **API keys** and create a key. Keys are shown once: store it as `SPIRAL_API_KEY`.

## Make your first run

```bash theme={null}
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "fal",
    "model": "fal-ai/flux-2-max",
    "input": { "prompt": "a lighthouse at dawn" }
  }'
```

The response holds the run's id. Poll the run, or add `webhook.url` to get the result by webhook.

## Connect an agent

Point any MCP client at the hosted MCP server with your key as a bearer token. In Claude Code:

```bash theme={null}
claude mcp add spiral --transport http https://mcp.spiral.ai \
  --header "Authorization: Bearer $SPIRAL_API_KEY"
```

The console's **Agents & MCP** page has the setup for each agent.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.