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

# Use the Aria Compute API from cURL

> Copy-paste cURL recipes for login, API key management, model downloads, wallet top-ups, and invoice downloads on the Aria Compute API.

Every Aria Compute REST endpoint works from `curl`. This page collects the recipes you need most often. Replace `eyJhbGciOi...` with your session JWT and `bfvk-XXXXXXXXXXXXXXXX` with your API key.

## Sign in

```bash theme={null}
curl -X POST https://ariacompute.com/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"identifier": "you@example.com", "password": "..."}'
```

## Fetch the current user

```bash theme={null}
curl -H "Authorization: Bearer eyJhbGciOi..." \
  https://ariacompute.com/api/auth/me
```

## Create an API key

```bash theme={null}
curl -X POST https://ariacompute.com/api/api-keys \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"name": "production"}'
```

## Download a model bundle

```bash theme={null}
curl -L -H "Authorization: Bearer bfvk-XXXXXXXXXXXXXXXX" \
  "https://ariacompute.com/api/models/gemma-4-e2b-it/download?quant=int4&sdk=v1.0" \
  -o gemma-4-e2b-it_q4.zip
```

Get the JSON envelope instead of following the redirect:

```bash theme={null}
curl -H "Authorization: Bearer bfvk-XXXXXXXXXXXXXXXX" \
  -H "Accept: application/json" \
  "https://ariacompute.com/api/models/gemma-4-e2b-it/download?quant=int4&sdk=v1.0"
```

## Top up the wallet (Stripe)

```bash theme={null}
curl -X POST https://ariacompute.com/api/billing/payments \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"provider": "stripe", "amount": 20, "currency": "USD"}'
```

## Poll payment status

```bash theme={null}
curl -H "Authorization: Bearer eyJhbGciOi..." \
  https://ariacompute.com/api/billing/payments/pay_01H...
```

## Download an invoice

```bash theme={null}
curl -L "https://ariacompute.cn/api/billing/invoices/pay_01H.../download?token=eyJhbGciOi..." \
  -o invoice.pdf
```

## Pull the latest engine release

```bash theme={null}
curl -s https://ariacompute.com/api/download/engine-latest | jq .
```

<Tip>
  Pipe every response through `jq` for readable output. On the China site, swap `ariacompute.com` for `ariacompute.cn` in every URL.
</Tip>


## Related topics

- [Authenticate requests to the Aria Compute API](/authentication.md)
- [Python client for the Aria Compute API](/sdks/python.md)
- [Node.js client for the Aria Compute API](/sdks/nodejs.md)
- [Aria Compute REST API reference](/api-reference/introduction.md)
- [Go client for the Aria Compute API](/sdks/go.md)
