API Documentation

Everything you need to integrate with our API.

Getting Started
Follow these steps to make your first API call
1

Get your API Key

Sign up and create an API key from your dashboard.

2

Make your first request

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!"}
    ]
  }'
3

Handle the response

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
  }
}
Authentication
How to authenticate your API requests

API Key Authentication

For model endpoints, include your API key in the X-API-Key header:

X-API-Key: sk-your-api-key-here

JWT Bearer Token

For account management endpoints, use the JWT token from login:

Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

Ready to start building?

Create your account and get your API key in minutes.