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

# Quickstart: Get started with the TokModel API fast

> Create a TokModel account, generate your API key, and send your first chat completions request to any supported model using curl, Python, or Node.js.

This guide walks you through everything you need to make your first API call with TokModel. You'll create an account, generate an API key, and send a chat completions request — all in a few minutes. No new SDK or client library required.

<Steps>
  <Step title="Create your account">
    Go to [https://tokmodel.com/register](https://tokmodel.com/register) and sign up for a free account. Once you've confirmed your email, you'll have access to the TokModel console.
  </Step>

  <Step title="Get your API key">
    Open the [TokModel console](https://tokmodel.com/console) and navigate to **API Keys**. Click **Create key**, give it a name, and copy the key value. Store it somewhere safe — you won't be able to view the full key again after closing the dialog.

    Your API key is a credential that grants access to your account's credits. Do not share it or commit it to source control.
  </Step>

  <Step title="Make your first API call">
    Send a chat completions request to `https://tokmodel.com/v1/chat/completions`. The request format is identical to the OpenAI chat completions API.

    Replace `YOUR_API_KEY` with the key you copied in the previous step.

    <CodeGroup>
      ```bash curl theme={null}
      curl https://tokmodel.com/v1/chat/completions \
        -H "Authorization: Bearer YOUR_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "model": "gpt-4o-mini",
          "messages": [
            {
              "role": "user",
              "content": "What is a large language model?"
            }
          ]
        }'
      ```

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

      client = OpenAI(
          api_key="YOUR_API_KEY",
          base_url="https://tokmodel.com/v1",
      )

      response = client.chat.completions.create(
          model="gpt-4o-mini",
          messages=[
              {"role": "user", "content": "What is a large language model?"}
          ],
      )

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

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

      const client = new OpenAI({
        apiKey: "YOUR_API_KEY",
        baseURL: "https://tokmodel.com/v1",
      });

      const response = await client.chat.completions.create({
        model: "gpt-4o-mini",
        messages: [
          { role: "user", content: "What is a large language model?" },
        ],
      });

      console.log(response.choices[0].message.content);
      ```
    </CodeGroup>

    A successful response looks like this:

    ```json theme={null}
    {
      "id": "chatcmpl-abc123",
      "object": "chat.completion",
      "created": 1748000000,
      "model": "gpt-4o-mini",
      "choices": [
        {
          "index": 0,
          "message": {
            "role": "assistant",
            "content": "A large language model (LLM) is a type of AI model trained on vast amounts of text data to understand and generate human language..."
          },
          "finish_reason": "stop"
        }
      ],
      "usage": {
        "prompt_tokens": 15,
        "completion_tokens": 64,
        "total_tokens": 79
      }
    }
    ```
  </Step>
</Steps>

<Tip>
  You can use any model available through TokModel by changing the `model` field. See the [API reference](/api-reference/overview) for the full list of supported models and endpoints.
</Tip>
