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

# NexLLM Quickstart: Make Your First API Call in Minutes

> Make your first NexLLM API call using the built-in Playground, a curl command, or the Python OpenAI SDK — all pointing at a single base URL.

NexLLM is fully compatible with the OpenAI API schema. To start using it, replace the OpenAI `base_url` in your existing code or client with `https://www.nexllm.ai/v1` and use your NexLLM API key as the `api_key`. That's the only change required — no new SDKs, no new request formats.

<Tip>
  Not ready to write code yet? The built-in **Playground** lets you chat with any available model directly in your browser. It's a great way to explore model behaviour and verify that your token is working before you integrate the API into your application.
</Tip>

## Option 1: Use the Playground

The Playground is a no-code, in-browser testing tool that lets you interact with models immediately after generating an API key.

<Steps>
  <Step title="Open the Playground">
    Sign in to your dashboard and click **Playground** in the left sidebar.
  </Step>

  <Step title="Select a model">
    Use the model selector in the bottom-right corner to choose the model you want to test.
  </Step>

  <Step title="Select a channel group">
    Choose the channel group you want to use for the request. This determines which upstream configuration and pricing tier your request is routed through.
  </Step>

  <Step title="Send a message">
    Type your message in the input box at the bottom of the page and click **Send**. The model's response appears in the conversation area above.
  </Step>
</Steps>

## Option 2: Use curl

You can make API calls directly from your terminal. Copy the command below, replace `$NEXLLM_TOKEN` with your API key, and run it:

```bash theme={null}
curl https://www.nexllm.ai/v1/chat/completions \
  -H "Authorization: Bearer $NEXLLM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "aws/claude-haiku-4-5",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Write a short welcome message for a new user."}
    ],
    "max_tokens": 100
  }'
```

The response is returned as JSON in the standard OpenAI chat completions format.

## Option 3: Use an SDK or native client

For application code, use the OpenAI Python SDK or send requests in each provider's native format. Both approaches are shown below.

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

  client = OpenAI(
      api_key="sk-xxxxxxxxxxxxxxxx",  # Your NexLLM API key
      base_url="https://www.nexllm.ai/v1"
  )

  response = client.chat.completions.create(
      model="aws/claude-haiku-4-5",
      messages=[
          {"role": "system", "content": "You are a helpful assistant."},
          {"role": "user", "content": "Write a short welcome message for a new user."}
      ],
      max_tokens=100
  )

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

  ```bash Claude Native (curl) theme={null}
  curl https://www.nexllm.ai/v1/messages \
    -H "x-api-key: sk-xxxxxxxxxxxxxxxx" \
    -H "anthropic-version: 2023-06-01" \
    -H "content-type: application/json" \
    -d '{
      "model": "aws/claude-haiku-4-5",
      "system": "You are a helpful assistant.",
      "max_tokens": 100,
      "messages": [{"role": "user", "content": "Write a short welcome message for a new user."}]
    }'
  ```
</CodeGroup>

<Note>
  The examples above cover the most common use case — chat completions. NexLLM also supports embeddings, image generation, audio transcription, text-to-speech, reranking, and more. See the [API Reference](/api-reference) for the full list of supported endpoints and their request schemas.
</Note>
