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

# API overview

> The R3AL platform HTTP API: uploads, quantization jobs, artifacts, keys, and usage.

<Note>
  Most users never call this API directly: the [Python SDK](/sdk/quantizer) wraps it. This tab documents the HTTP surface for anyone integrating without the SDK.
</Note>

The R3AL platform API is hosted at `https://platform.r3al.ai`. Every route lives under `/v1`. Requests authenticate with a Bearer API key (`r3l_live_...`) minted on the platform's **SDK / API keys** page (see [Authentication](/api/authentication)).

The core job flow is: upload your model, submit a quantize or QAT job (which returns immediately with a job id), poll the job, then download its artifacts.

```text theme={null}
POST /v1/uploads      →  presigned R2 PUT, returns an r2://<key> ref
POST /v1/quantize     →  202 { "job_id": "..." }
GET  /v1/jobs/{id}     →  status + progress + result
GET  /v1/jobs/{id}/artifacts  →  presigned download URLs
```

## What's in this API

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/api/authentication">
    API keys, session tokens, and account roles.
  </Card>

  <Card title="Jobs" icon="gears" href="/api/jobs">
    Upload, quantize, qat, poll, download artifacts, and check usage.
  </Card>

  <Card title="API keys" icon="lock" href="/api/keys">
    Mint, list, and revoke keys for programmatic access.
  </Card>

  <Card title="Team & roles" icon="users" href="/api/team">
    Register, verify email, log in, invites, and role management.
  </Card>

  <Card title="Rate limiting" icon="gauge-high" href="/api/rate-limiting">
    Per-caller sliding-window limits and the 429 response shape.
  </Card>

  <Card title="Errors" icon="triangle-exclamation" href="/api/errors">
    One consistent error envelope across every endpoint.
  </Card>
</CardGroup>

## Quantize a model over HTTP

```bash theme={null}
# 1. Get a presigned upload grant, then PUT the file to the returned URL
curl -X POST https://platform.r3al.ai/v1/uploads \
  -H "Authorization: Bearer r3l_live_..." \
  -H "Content-Type: application/json" \
  -d '{"filename": "model.onnx", "content_type": "application/octet-stream", "size_bytes": 10485760}'
# { "upload_url": "https://...", "object_key": "uploads/..." }

# 2. Submit the job with the r2:// reference.
#    ptq_static is the default; upload calibration images the same way as the model.
curl -X POST https://platform.r3al.ai/v1/quantize \
  -H "Authorization: Bearer r3l_live_..." \
  -H "Content-Type: application/json" \
  -d '{"model": "r2://uploads/...", "method": "ptq_static", "calibration_data": ["r2://uploads/img1.jpg"]}'
# 202 { "job_id": "job_...", "status": "pending" }
```

See [Jobs](/api/jobs) for polling and downloading the result.
