API Keys

Active Keys (0/0)

API Documentation

GET/api/models

List all available models.

curl -H "x-api-key: YOUR_API_KEY" \
     https://api.sortium.fr/api/models
POST/api/chatRecommended

Send a chat message and get a JSON response.

curl -X POST https://api.sortium.fr/api/chat \
     -H "x-api-key: YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "model": "llama3.2",
       "messages": [
         {"role": "user", "content": "Hello!"}
       ],
       "stream": false
     }'

Response:

{"content": "Hello! How can I help?", "model": "llama3.2", "done": true}
POST/api/chatStreaming

Send a chat message and get a Server-Sent Events stream.

curl -X POST https://api.sortium.fr/api/chat \
     -H "x-api-key: YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "model": "llama3.2",
       "messages": [
         {"role": "user", "content": "Hello!"}
       ]
     }'

Request body:

  • model - Model name (required)
  • messages - Array of messages
  • stream - Set to false for JSON response (default: true)

Authentication

Include your API key in one of these headers:

# Option 1: x-api-key header
-H "x-api-key: YOUR_API_KEY"

# Option 2: Authorization Bearer
-H "Authorization: Bearer YOUR_API_KEY"