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

# curl example

> Call Rock API with curl.

# curl example

```bash theme={null}
curl https://rockapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $ROCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'
```

<Card title="Get your API key" icon="key" href="https://rockapi.ai/keys">
  Register and create an [API key](https://rockapi.ai/keys) before running this example.
</Card>
