HTTP requests (curl)
MarkdownUse the API without an SDK: any language or tool that can send an HTTP request.
Full guide
All requests are sent to https://api.ailoot.ai over HTTPS, with a JSON body or multipart for file uploads. Send the key in one of the authentication headers.
export AILOOT_API_KEY="sk-..."OpenAI Chat Completions
curl https://api.ailoot.ai/v1/chat/completions \
-H "Authorization: Bearer $AILOOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5-5",
"messages": [
{"role": "user", "content": "Explain what an API is in two sentences."}
]
}' Streaming responses
The -N flag disables curl buffering so events are printed as soon as they arrive. Each event starts with data:; the stream ends with the line data: [DONE].
curl -N https://api.ailoot.ai/v1/chat/completions \
-H "Authorization: Bearer $AILOOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "deepseek-v4-pro", "stream": true,
"messages": [{"role": "user", "content": "Count to five"}]}' OpenAI Responses
curl https://api.ailoot.ai/v1/responses \
-H "Authorization: Bearer $AILOOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-6.1-sol", "input": "Write a birthday toast for a colleague"}' Anthropic Messages
curl https://api.ailoot.ai/v1/messages \
-H "x-api-key: $AILOOT_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5-5",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello! What can you do?"}]
}' Gemini
curl "https://api.ailoot.ai/v1beta/models/gemini-3.8-flash:generateContent" \
-H "x-goog-api-key: $AILOOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{"role": "user", "parts": [{"text": "Come up with three names for a coffee shop."}]}
]
}' Model list
curl -s https://api.ailoot.ai/v1/models \
-H "Authorization: Bearer $AILOOT_API_KEY" | jq -r '.data[].id'Response headers
Add -i to view the headers. X-Request-ID — the request ID, which also appears in error messages. X-Ailoot-Charged-USD — the amount charged for the billed text response. For all headers, see How it works.
Still have questions? Send your Request ID and a description — we'll help you troubleshoot.Contact support