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

# Get Started with Inferoute

> Learn how to create a Inferoute account, generate an API key, and send your first chat completion request in under five minutes using the OpenAI SDK or curl.

Inferoute is OpenAI-compatible, so you can start routing requests through it using tools you already have. This guide walks you through creating an account, generating an API key, and making your first chat completion request.

<Steps>
  <Step title="Sign up for Inferoute">
    Create a free account at [inferoute.ai](https://inferoute.ai). After signing up, you'll land in the Inferoute dashboard where you can manage API keys, view usage, and configure routing.
  </Step>

  <Step title="Generate an API key">
    In the dashboard, go to **Settings → API Keys** and click **New API key**. Give it a descriptive name (for example, `dev-local`) and optionally set an expiry date. Copy the key immediately — it won't be displayed again.

    <Warning>
      Store your API key securely. Never commit it to version control or share it in public channels. Use an environment variable instead of hardcoding it in your application.
    </Warning>
  </Step>

  <Step title="Install the OpenAI SDK (optional)">
    Inferoute works with the standard OpenAI SDK. If you prefer to use raw HTTP, skip this step.

    <CodeGroup>
      ```bash pip theme={null}
      pip install openai
      ```

      ```bash npm theme={null}
      npm install openai
      ```
    </CodeGroup>
  </Step>

  <Step title="Configure the base URL and API key">
    Point the SDK or your HTTP client at the Inferoute API endpoint. Replace `YOUR_INFEROUTE_API_KEY` with the key you generated.

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

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

      ```javascript node.js theme={null}
      import OpenAI from "openai";

      const client = new OpenAI({
        baseURL: "https://api.inferoute.ai/v1",
        apiKey: process.env.INFEROUTE_API_KEY,
      });
      ```
    </CodeGroup>
  </Step>

  <Step title="Make a chat completion request">
    Send a chat completion request exactly as you would with the OpenAI API.

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

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

      response = client.chat.completions.create(
          model="gpt-4o-mini",
          messages=[
              {"role": "user", "content": "What is AI inference routing?"}
          ],
      )

      print(response.choices[0].message.content)
      ```

      ```javascript node.js theme={null}
      import OpenAI from "openai";

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

      const response = await client.chat.completions.create({
        model: "gpt-4o-mini",
        messages: [
          { role: "user", content: "What is AI inference routing?" }
        ],
      });

      console.log(response.choices[0].message.content);
      ```

      ```bash curl theme={null}
      curl https://api.inferoute.ai/v1/chat/completions \
        -H "Authorization: Bearer $INFEROUTE_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "model": "gpt-4o-mini",
          "messages": [
            { "role": "user", "content": "What is AI inference routing?" }
          ]
        }'
      ```
    </CodeGroup>

    A successful response looks like this:

    ```json theme={null}
    {
      "id": "chatcmpl-abc123",
      "object": "chat.completion",
      "created": 1748131200,
      "model": "gpt-4o-mini",
      "choices": [
        {
          "index": 0,
          "message": {
            "role": "assistant",
            "content": "AI inference routing is the practice of directing model requests to different LLM providers based on criteria like cost, latency, and availability."
          },
          "finish_reason": "stop"
        }
      ],
      "usage": {
        "prompt_tokens": 14,
        "completion_tokens": 32,
        "total_tokens": 46
      }
    }
    ```
  </Step>
</Steps>

<Tip>
  You can use any OpenAI-compatible model name in the `model` field — including Anthropic, Google, and Mistral models. Inferoute maps the model name to the appropriate provider automatically. See the [models reference](/docs/concepts/models) for the full list of supported model identifiers.
</Tip>

<Note>
  Every request you make appears in the Inferoute dashboard under **Usage**. From there you can monitor token consumption, estimated costs, and which providers handled each request.
</Note>
