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

# Get Started in 3 Steps

> Set up your first API call in minutes

<Steps>
  <Step title="Get Your API Key">
    Visit the [Gateway Console](https://gateway.iotex.ai/console/token) to generate your API key in the format `sk-xxxxxxxxxx`.
  </Step>

  <Step title="Make Your First API Call">
    <CodeGroup>
      ```bash cURL theme={null}
      curl https://gateway.iotex.ai/v1/chat/completions \
        -H "Authorization: Bearer your-api-key" \
        -H "Content-Type: application/json" \
        -d '{
          "model": "gemini-2.5-flash",
          "messages": [{"role": "user", "content": "Hello"}],
          "max_tokens": 100
        }'
      ```

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

      client = OpenAI(
          api_key="your-api-key",
          base_url="https://gateway.iotex.ai/v1"
      )

      response = client.chat.completions.create(
          model="gemini-2.5-flash",
          messages=[{"role": "user", "content": "Hello"}],
          max_tokens=100
      )
      print(response.choices[0].message.content)
      ```

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

      const client = new OpenAI({
          apiKey: "your-api-key",
          baseURL: "https://gateway.iotex.ai/v1"
      });

      const response = await client.chat.completions.create({
          model: "gemini-2.5-flash",
          messages: [{ role: "user", content: "Hello" }],
          max_tokens: 100
      });
      console.log(response.choices[0].message.content);
      ```
    </CodeGroup>
  </Step>

  <Step title="View the Response">
    A successful call returns the AI's response in standard OpenAI format:

    ```json theme={null}
    {
      "choices": [
        {
          "message": {
            "role": "assistant",
            "content": "Hello! I'm an AI assistant, and I'm happy to help you. What can I do for you today?"
          }
        }
      ]
    }
    ```
  </Step>
</Steps>

**Congratulations! You've successfully integrated IoTeX AI Gateway.**
