API Reference
Chat Completions (LLM)
OpenAI-compatible chat completions API — call qyma-chat or qyma-logic with your External API key.
Overview
SkyLight Chat exposes an OpenAI-compatible chat completions endpoint so you can point the OpenAI SDK (or any compatible client) at SkyLight and use the branded models qyma-chat and qyma-logic.
- Same authentication as the rest of External API v1 (
X-Api-KeyorAuthorization: Bearer) - Responses follow the OpenAI
chat.completionshape - Usage is metered to your account (same AI usage pipeline as the dashboard)
- Streaming is not supported in v1 (
stream: truereturns400) - Available models:
qyma-chat(default),qyma-logic
Base URL
https://dashboard.skylightchat.com/api/v1
OpenAI SDK example:
from openai import OpenAI
client = OpenAI(
api_key="YOUR_EXTERNAL_API_KEY",
base_url="https://dashboard.skylightchat.com/api/v1",
)
resp = client.chat.completions.create(
model="qyma-chat",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)
List models
GET /api/v1/models
{
"object": "list",
"data": [
{
"id": "qyma-chat",
"object": "model",
"created": 1754006400,
"owned_by": "qyma"
},
{
"id": "qyma-logic",
"object": "model",
"created": 1754265600,
"owned_by": "qyma"
}
]
}
Get a model
GET /api/v1/models/qyma-chat
GET /api/v1/models/qyma-logic
Unknown models return 404 with an OpenAI-style error object.
Create a chat completion
POST /api/v1/chat/completions
Content-Type: application/json
| Field | Type | Required | Notes |
|---|---|---|---|
model | string | No | qyma-chat (default) or qyma-logic |
messages | array | Yes | OpenAI chat messages (role + content) |
temperature | number | No | Sampling temperature |
max_tokens / max_completion_tokens | integer | No | Max output tokens |
response_format | object | No | e.g. { "type": "json_object" } (supported on qyma-logic) |
tools | array | No | Tool definitions (OpenAI format) |
tool_choice | string|object | No | Tool choice |
stream | boolean | No | Must be false or omitted — streaming not supported |
curl https://dashboard.skylightchat.com/api/v1/chat/completions \
-H "X-Api-Key: ••••••••••••" \
-H "Content-Type: application/json" \
-d '{
"model": "qyma-logic",
"messages": [
{"role": "user", "content": "Summarize our return policy in one sentence."}
]
}'
Response (200)
{
"id": "chatcmpl-…",
"object": "chat.completion",
"model": "qyma-logic",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "…"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 28,
"total_tokens": 40
}
}
Errors
Errors use the OpenAI error envelope (not the usual { success, message } wrapper):
{
"error": {
"message": "Invalid model. Use qyma-chat or qyma-logic.",
"type": "invalid_request_error",
"code": "model_not_found"
}
}
| Code | HTTP | When |
|---|---|---|
model_not_found | 400 / 404 | Unknown model id |
stream_not_supported | 400 | stream: true |
invalid_messages | 400 | Missing / empty messages |
| (server) | 502 | Generation failed — retry later |
Authentication & rate limits
Identical to the rest of External API v1:
Authorization: Bearer <api_key>orX-Api-Key: <api_key>- Plan must have API access enabled
- 120 requests / minute per API key
Generate a key in the dashboard under Settings → API.
