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

# Quickstart

> Make your first API call, then confirm it was served from an attested gateway.

Create an API key in the [dashboard](https://www.redpill.ai/dashboard) and set it as the `API_KEY`
environment variable. Then call the API with any OpenAI client library: point it at
`https://api.redpill.ai/v1` and send your key as a bearer token.

## Make a request

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.redpill.ai/v1/chat/completions \
    -H "Authorization: Bearer $API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "qwen/qwen3-30b-a3b-instruct-2507",
      "messages": [{"role": "user", "content": "Explain attestation in one sentence."}]
    }'
  ```

  ```python Python theme={null}
  import os
  from openai import OpenAI

  client = OpenAI(base_url="https://api.redpill.ai/v1", api_key=os.environ["API_KEY"])

  resp = client.chat.completions.create(
      model="qwen/qwen3-30b-a3b-instruct-2507",
      messages=[{"role": "user", "content": "Explain attestation in one sentence."}],
  )
  print(resp.choices[0].message.content)
  ```

  ```javascript JavaScript theme={null}
  import OpenAI from "openai";

  const client = new OpenAI({
    baseURL: "https://api.redpill.ai/v1",
    apiKey: process.env.API_KEY,
  });

  const resp = await client.chat.completions.create({
    model: "qwen/qwen3-30b-a3b-instruct-2507",
    messages: [{ role: "user", content: "Explain attestation in one sentence." }],
  });
  console.log(resp.choices[0].message.content);
  ```
</CodeGroup>

The response is a standard OpenAI chat completion, plus verification headers:

| Header                | Meaning                                                 |
| --------------------- | ------------------------------------------------------- |
| `x-receipt-id`        | Id of the signed receipt for this response.             |
| `x-aci-identity`      | The attested workload identity that served the request. |
| `x-aci-keyset-digest` | Digest of the workload's published keyset.              |

## Confirm it was attested

Read the `x-receipt-id` header, then fetch the receipt and check how the response was served:

```bash theme={null}
curl -s "https://api.redpill.ai/v1/aci/receipts/$RECEIPT_ID" \
  -H "Authorization: Bearer $API_KEY" \
  | jq '.event_log[] | select(.type=="upstream.verified") | {provider, result, required}'
```

A confidential response shows `result: verified` and `required: true`. To verify the gateway identity
and the receipt signature end to end, see [Verify a response](/guides/verify-a-response).

## Next steps

<CardGroup cols={2}>
  <Card title="Models" icon="layer-group" href="/get-started/models">
    Browse the catalog and tell confidential models from standard ones.
  </Card>

  <Card title="Authentication" icon="key" href="/get-started/authentication">
    Manage API keys and keep them out of source.
  </Card>

  <Card title="API Reference" icon="book" href="/api-reference/overview">
    Every endpoint and parameter.
  </Card>

  <Card title="Verify a response" icon="circle-check" href="/guides/verify-a-response">
    Check attestation and receipts yourself.
  </Card>
</CardGroup>
