OpenAI-compatible API. Drop-in replacement — just change the base URL and API key.
https://inference-api.seefeldmaxwell1.workers.devAll API requests require an API key in the Authorization header.
Authorization: Bearer inf-your-api-key-hereGet your API key from the Dashboard.
curl https://inference-api.seefeldmaxwell1.workers.dev/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer inf-your-api-key" \
-d '{
"model": "llama-3.3-70b-versatile",
"messages": [{"role": "user", "content": "Hello!"}]
}'{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1700000000,
"model": "llama-3.3-70b-versatile",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 10,
"completion_tokens": 12,
"total_tokens": 22
}
}Set "stream": true to receive Server-Sent Events.
curl https://inference-api.seefeldmaxwell1.workers.dev/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer inf-your-api-key" \
-d '{
"model": "llama-3.3-70b-versatile",
"messages": [{"role": "user", "content": "Hello!"}],
"stream": true
}'