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

# Quickstart

> Get your API key and make your first request to NagaAI using official SDKs.

This guide gets you from an empty project to your first successful API call in a couple of minutes.

You will create an API key, install the official OpenAI SDK, and send one request to NagaAI using the `Responses API`.

<Steps>
  <Step title="Create an API key">
    1. Open the [NagaAI Dashboard](https://naga.ac/dashboard).
    2. Go to **API Keys**.
    3. Create a new key.
    4. Copy it and store it securely.

    <Tip>
      Standard inference endpoints use a normal API key. Administrative
      `/v1/account/*` endpoints use a provisioning key instead.
    </Tip>
  </Step>

  <Step title="Install the SDK">
    NagaAI acts as a drop-in replacement for OpenAI. You can use their official libraries.

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

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

  <Step title="Send your first request">
    Initialize the client with the NagaAI `base_url` and your new API key.

    For new LLM apps, start with `Responses API`. It works well for simple text generation now and gives you a clean path to streaming, tools, structured outputs, and multimodal input later.

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

      client = OpenAI(
          base_url="https://api.naga.ac/v1",
          api_key="YOUR_API_KEY",
      )

      response = client.responses.create(
          model="gpt-4.1-mini",
          input="What is the capital of France? Respond in one sentence.",
      )

      print(response.output_text)
      ```

      ```javascript Node.js theme={null}
      import OpenAI from 'openai';

      const client = new OpenAI({
        baseURL: 'https://api.naga.ac/v1',
        apiKey: 'YOUR_API_KEY',
      });

      async function main() {
        const response = await client.responses.create({
          model: 'gpt-4.1-mini',
          input: 'What is the capital of France? Respond in one sentence.',
        });

        console.log(response.output_text);
      }

      main();
      ```

      ```bash cURL theme={null}
      curl https://api.naga.ac/v1/responses \
        -H "Authorization: Bearer YOUR_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "model": "gpt-4.1-mini",
          "input": "What is the capital of France? Respond in one sentence."
        }'
      ```
    </CodeGroup>
  </Step>

  <Step title="Confirm the output">
    If the request succeeds, the response object will contain a text output item. You should see:

    `The capital of France is Paris.`

    If you get `401 Unauthorized`, make sure you used a standard API key and set the base URL to `https://api.naga.ac/v1`.
  </Step>
</Steps>

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/get-started/authentication">
    Learn which key to use for inference requests and account endpoints.
  </Card>

  <Card title="Choose an API" icon="shuffle" href="/get-started/choose-an-api">
    Decide when to use Responses, Images, Audio, Embeddings, Moderations, or a compatibility API.
  </Card>

  <Card title="Responses API" icon="bolt" href="/api/responses">
    Keep building on the same API with streaming, tools, structured outputs, and multimodal input.
  </Card>

  <Card title="Models" icon="cubes" href="/get-started/models">
    Choose a model based on what you are building and what access your account has.
  </Card>
</CardGroup>
