# Using the OpenAI-Compatible API

Sumopod AI can be used with any SDK that supports the OpenAI format simply change the base URL to https://ai.sumopod.com/v1.

## Steps

1. Prepare an [API Key](../ai/create-api-key) from the AI menu.
2. Change the base URL to https://ai.sumopod.com/v1.
   ![The AI Quick Start page showing the base URL](https://kencana.basic.box.cloudeka.id/bucketku-f4kxct/sumopod-doc/Guides/01-ai/02-openai-compatible-api/01-quick-start-base-url.png)
3. Use the API Key in the Authorization header.
4. Call the chat completions endpoint as usual, setting `model` to one of the available models.
   ![The list of available AI models](https://kencana.basic.box.cloudeka.id/bucketku-f4kxct/sumopod-doc/Guides/01-ai/02-openai-compatible-api/02-daftar-model.png)

Example usage:

```bash
curl https://ai.sumopod.com/v1/chat/completions \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [{ "role": "user", "content": "Hello!" }]
  }'
```

## Notes

- Sumopod models can generate text only.
- For more code examples (Python, Node.js, etc.), check the [AI Quick Start](https://sumopod.com/dashboard/ai/quickstart).
