Everything you need to integrate with our API.
Sign up and create an API key from your dashboard.
curl -X POST https://endpointai-backend-production.up.railway.app/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"model": "llama-3-8b",
"messages": [
{"role": "user", "content": "Hello!"}
]
}'The API returns a JSON response in OpenAI-compatible format:
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1677652288,
"model": "llama-3-8b",
"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
}
}For model endpoints, include your API key in the X-API-Key header:
X-API-Key: sk-your-api-key-here
For account management endpoints, use the JWT token from login:
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...