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

# Quickstart

> Make your first inference request in minutes

<Note>
  Currently in private preview. [Sign up at console.modular.com/signup](https://console.modular.com/signup) to request access.
</Note>

This guide walks you through signing up, creating an API key, and sending
your first request.

## Sign up

Sign up for private preview access at [console.modular.com/signup](https://console.modular.com/signup).

## Create an API key

Go to the [API Tokens page](https://console.modular.com/api_tokens) in the
console and create a new token. Copy it now. You won't be able to see it again
after closing the dialog.

Export your key as an environment variable:

```bash theme={null}
export MODULAR_API_KEY="your_api_key_here"
```

## Send a request

Use the OpenAI SDK or curl to make your first inference call:

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

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

    Send a chat completion request:

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

    client = OpenAI(
        base_url="https://api.modular.com/v1",
        api_key=os.environ["MODULAR_API_KEY"],
    )

    response = client.chat.completions.create(
        model="google/gemma-4-31B-it",
        messages=[{"role": "user", "content": "Hello, how are you?"}],
    )

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

    ```text theme={null}
    I'm doing well, thank you for asking! How can I assist you today?
    ```
  </Tab>

  <Tab title="curl">
    Send a chat completion request using curl:

    ```bash theme={null}
    curl -X POST https://api.modular.com/v1/chat/completions \
      -H "Authorization: Bearer $MODULAR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "google/gemma-4-31B-it",
        "messages": [{"role": "user", "content": "Hello, how are you?"}]
      }'
    ```

    ```json theme={null}
    {
      "choices": [
        {
          "finish_reason": "stop",
          "index": 0,
          "message": {
            "content": "I'm doing well, thank you for asking! How can I assist you today?",
            "role": "assistant"
          }
        }
      ],
      "model": "google/gemma-4-31B-it",
      "object": "chat.completion"
    }
    ```
  </Tab>
</Tabs>

<Tip>
  Already using the OpenAI SDK? Just change `base_url`
  to `https://api.modular.com/v1` and set `api_key` to your API
  key. No other code changes required.
</Tip>

## Explore the playground

Try models interactively in the [console playground](https://console.modular.com/playground)
without writing any code. The playground lets you compare models, adjust
parameters, and experiment with prompts before integrating into your application.

## Next steps

* [Text inference](inference/text): text-to-text, image-to-text, and video-to-text
* [Image inference](inference/image): generate and transform images with FLUX
* [Video inference](inference/video): generate video from text with Wan
* [Models](models): browse all available models
