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

# Quickstart

> Send your first traced LLM request through to11 in a few minutes.

This guide takes you from zero to a traced LLM call on the hosted to11 platform.

## 1. Create your account

Sign up at [app.to11.ai](https://app.to11.ai) and create your first organization, workspace, and project. See [Core Concepts](/docs/get-started/concepts) for how those fit together.

## 2. Connect a provider

In your project, connect the model provider you want to use (OpenAI, Anthropic, xAI, and more) by adding its credential. The gateway uses it to reach the provider on your behalf. See [Providers](/docs/deploy/concepts/providers).

## 3. Create an API key

Open **Settings → API keys** and create a key scoped to what your application needs. Copy the secret — it's shown only once. See [API keys](/docs/platform/api-keys).

## 4. Point your SDK at the gateway

Change your SDK's base URL to the to11 gateway at `https://gw.to11.ai` and authenticate to to11 with the `x-to11-authorization` header. Your provider key stays in the SDK's `api_key` (the standard `Authorization` header), forwarded upstream — or omit it if you configured the provider credential in your project above.

<CodeGroup>
  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      base_url="https://gw.to11.ai/v1",
      api_key="<your OpenAI API key>",  # provider credential, forwarded upstream
      default_headers={"x-to11-authorization": "Bearer <your to11 API key>"},
  )

  response = client.chat.completions.create(
      model="gpt-4o",
      messages=[{"role": "user", "content": "Hello from to11!"}],
  )
  print(response.choices[0].message.content)
  ```

  ```typescript TypeScript theme={null}
  import OpenAI from "openai";

  const client = new OpenAI({
    baseURL: "https://gw.to11.ai/v1",
    apiKey: "<your OpenAI API key>", // provider credential, forwarded upstream
    defaultHeaders: { "x-to11-authorization": "Bearer <your to11 API key>" },
  });

  const response = await client.chat.completions.create({
    model: "gpt-4o",
    messages: [{ role: "user", content: "Hello from to11!" }],
  });
  console.log(response.choices[0].message.content);
  ```

  ```bash curl theme={null}
  curl https://gw.to11.ai/v1/chat/completions \
    -H "x-to11-authorization: Bearer <your to11 API key>" \
    -H "Authorization: Bearer <your OpenAI API key>" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "gpt-4o",
      "messages": [{"role": "user", "content": "Hello from to11!"}]
    }'
  ```
</CodeGroup>

## 5. Read the gateway's response id

Every gateway response carries an `x-to11-request-id` header — a unique id for the call you can log alongside your own records. The parsed SDK response object doesn't expose headers, so read them with the SDK's raw-response API:

<CodeGroup>
  ```python Python theme={null}
  response = client.chat.completions.with_raw_response.create(
      model="gpt-4o",
      messages=[{"role": "user", "content": "Hello from to11!"}],
  )
  print(response.headers.get("x-to11-request-id"))

  completion = response.parse()  # the usual ChatCompletion object
  print(completion.choices[0].message.content)
  ```

  ```typescript TypeScript theme={null}
  const { data: completion, response: raw } = await client.chat.completions
    .create({
      model: "gpt-4o",
      messages: [{ role: "user", content: "Hello from to11!" }],
    })
    .withResponse();

  console.log(raw.headers.get("x-to11-request-id"));
  console.log(completion.choices[0].message.content);
  ```

  ```bash curl theme={null}
  # -i prints response headers; x-to11-request-id is among them
  curl -i https://gw.to11.ai/v1/chat/completions \
    -H "x-to11-authorization: Bearer <your to11 API key>" \
    -H "Authorization: Bearer <your OpenAI API key>" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "gpt-4o",
      "messages": [{"role": "user", "content": "Hello from to11!"}]
    }'
  ```
</CodeGroup>

## 6. See your trace

In the to11 dashboard, open your project and go to [Traces](/docs/observe/traces). Your request shows up as a GenAI span — model, tokens, and latency — with no instrumentation code on your side.

## Next steps

<CardGroup cols={2}>
  <Card title="Connect your SDK" icon="puzzle" href="/docs/integrations/overview">
    OpenAI, Anthropic, or Vercel AI SDK.
  </Card>

  <Card title="Configure routing" icon="route" href="/docs/deploy/routing/overview">
    Route across providers and models.
  </Card>
</CardGroup>
