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

# Quickstart

> Create, deploy, and invoke your first AXTL backend.

# Quickstart

This guide shows the intended public flow. Replace placeholders before running commands.

## Prerequisites

* An AXTL account.
* A platform bearer token for the AXTL control API. Create or manage API access from the AXTL dashboard.
* Your API base URL. Use `{AXTL_API_BASE_URL}` until your workspace confirms the production base URL.

<Note>
  During the beta, API access, quotas, and advanced workspace settings may vary by workspace.
</Note>

```bash theme={null}
export AXTL_API_BASE_URL="{AXTL_API_BASE_URL}"
export AXTL_TOKEN="{AXTL_TOKEN}"
```

## 1. Create a backend generation

```bash theme={null}
curl -X POST "$AXTL_API_BASE_URL/v1/generate" \
  -H "Authorization: Bearer $AXTL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support Triage API",
    "prompt": "Create a backend API that accepts a support ticket, classifies urgency, suggests a response, and returns JSON.",
    "region": "auto",
    "autoDeploy": false
  }'
```

Save `data.agent.id` as `agentId` and `data.job.id` as `jobId`.

## 2. Check generation status

```bash theme={null}
curl "$AXTL_API_BASE_URL/v1/generate/{jobId}" \
  -H "Authorization: Bearer $AXTL_TOKEN"
```

Wait until the job status is `completed`. Generation jobs can also report `queued` or `failed`; treat other beta statuses as progress details.

## 3. Deploy the backend

```bash theme={null}
curl -X POST "$AXTL_API_BASE_URL/v1/deploy/{agentId}" \
  -H "Authorization: Bearer $AXTL_TOKEN"
```

Then poll deployment status:

```bash theme={null}
curl "$AXTL_API_BASE_URL/v1/deploy/{agentId}/status" \
  -H "Authorization: Bearer $AXTL_TOKEN"
```

## 4. Get the endpoint

```bash theme={null}
curl "$AXTL_API_BASE_URL/v1/deploy/{agentId}/endpoint" \
  -H "Authorization: Bearer $AXTL_TOKEN"
```

## 5. Create an agent API key

```bash theme={null}
curl -X POST "$AXTL_API_BASE_URL/v1/agents/{agentId}/api-keys" \
  -H "Authorization: Bearer $AXTL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Quickstart"}'
```

Copy the returned `data.key` immediately. AXTL returns the raw key only once.

```bash theme={null}
export AXTL_AGENT_KEY="{AXTL_AGENT_KEY}"
```

## 6. Invoke the backend

```bash theme={null}
curl -X POST "$AXTL_API_BASE_URL/v1/invoke/{agentSlug}" \
  -H "Authorization: Bearer $AXTL_AGENT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ticket":"Customer cannot reset password and is blocked from logging in."}'
```

## Next steps

* [Create a backend](/guides/create-a-backend)
* [Deploy a backend](/guides/deploy-a-backend)
* [Invoke a backend](/guides/invoke-a-backend)
* [Manage API keys](/guides/manage-api-keys)
