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

# Grok

> xAI's Grok: conversational, with a real-time bent.

Grok is xAI's family of models: conversational, quick, and tuned for a more
direct style. A good pick for chat-first products and up-to-the-minute topics.

## Best for

* Conversational assistants with a distinctive voice.
* Current-events and real-time-leaning questions.
* Fast, general-purpose chat.

|                      |                                 |
| -------------------- | ------------------------------- |
| **Modality**         | Chat & code (text in, text out) |
| **Example model id** | `grok-4`                        |
| **Endpoint**         | `POST /chat/completions`        |

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.heyaskr.ai/chat/completions \
    -H "Authorization: Bearer ASKR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "grok-4",
      "messages": [
        {"role": "user", "content": "Give me a punchy tagline for a coffee brand."}
      ]
    }'
  ```

  ```python Python theme={null}
  from openai import OpenAI
  client = OpenAI(base_url="https://api.heyaskr.ai", api_key="ASKR_API_KEY")

  resp = client.chat.completions.create(
      model="grok-4",
      messages=[
          {"role": "user", "content": "Give me a punchy tagline for a coffee brand."},
      ],
  )
  print(resp.choices[0].message.content)
  ```
</CodeGroup>

## Pricing

Priced per token, input and output separately. As a rough guide, expect around
**\$3 per 1M input tokens** and **\$15 per 1M output tokens** for the flagship
model.

<div className="askr-img-placeholder">
  <span><strong>Image</strong><br />Grok on Askr: model card and pricing</span>
</div>

<Note>
  The model id and prices above are examples. Confirm the exact id and current
  price against the live [`/v1/models`](/api-reference/list-models) list before you
  rely on them.
</Note>
