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

# Quickstart

> Get started with Routeway. Learn how to make your first API call in a few minutes.

<Steps>
  <Step title="1. Get Your API Key">
    Go to the [Routeway Dashboard](https://routeway.ai/dashboard) and log in.

    1. Open the **API Keys** section.
    2. Click **Create API Key**.
    3. Copy your key and keep it secure.

    <Tip>
      New to APIs? You don't need any code to get started — just grab a key and paste it into your chat app's settings. See our [Integrations Guide](/integrations/overview#chat-uis) or [Roleplay Platforms Guide](/integrations/overview#roleplay-platforms) for setup steps.
    </Tip>

    <Warning>
      Never share your API key or commit it to version control. Anyone with your key can access your billing and use your quota.
    </Warning>
  </Step>

  <Step title="2. Configure Your Environment Variable">
    Store your API key as an environment variable to authenticate SDKs and client libraries automatically.

    <Tabs>
      <Tab title="Linux/macOS">
        ```bash theme={null}
        export ROUTEWAY_API_KEY="your_key_here"
        ```
      </Tab>

      <Tab title="Windows (CMD)">
        ```cmd theme={null}
        set ROUTEWAY_API_KEY="your_key_here"
        ```
      </Tab>

      <Tab title="Windows (PowerShell)">
        ```powershell theme={null}
        $env:ROUTEWAY_API_KEY="your_key_here"
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="3. Make Your First Request">
    Since Routeway is fully compatible with the OpenAI API, you can use the official OpenAI SDKs or raw HTTP requests.

    <Tabs>
      <Tab title="Python">
        Install the official OpenAI Python library:

        ```bash theme={null}
        pip install openai
        ```

        Create a new file and run the following script:

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

        client = OpenAI(
            base_url="https://api.routeway.ai/v1",
            api_key=os.getenv("ROUTEWAY_API_KEY")
        )

        response = client.chat.completions.create(
            model="gpt-4o-mini",
            messages=[
                {"role": "user", "content": "Write a short story about a robot and a cat."}
            ]
        )

        print(response.choices[0].message.content)
        ```
      </Tab>

      <Tab title="Node.js">
        Install the official OpenAI Node.js library:

        ```bash theme={null}
        npm install openai
        ```

        Create a new file and run the following script:

        ```javascript theme={null}
        const { OpenAI } = require("openai");

        const client = new OpenAI({
          base_url: "https://api.routeway.ai/v1",
          api_key: process.env.ROUTEWAY_API_KEY,
        });

        async function main() {
          const response = await client.chat.completions.create({
            model: "gpt-4o-mini",
            messages: [
              { role: "user", content: "Write a short story about a robot and a cat." }
            ]
          });

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

        main().catch(console.error);
        ```
      </Tab>

      <Tab title="cURL">
        Send a raw HTTP request directly using cURL:

        ```bash theme={null}
        curl https://api.routeway.ai/v1/chat/completions \
          -H "Authorization: Bearer $ROUTEWAY_API_KEY" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "gpt-4o-mini",
            "messages": [
              {"role": "user", "content": "Write a short story about a robot and a cat."}
            ]
          }'
        ```
      </Tab>
    </Tabs>
  </Step>
</Steps>
