SkyLight Chat
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-Key or Authorization: Bearer)
  • Responses follow the OpenAI chat.completion shape
  • Usage is metered to your account (same AI usage pipeline as the dashboard)
  • Streaming is not supported in v1 (stream: true returns 400)
  • 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
FieldTypeRequiredNotes
modelstringNoqyma-chat (default) or qyma-logic
messagesarrayYesOpenAI chat messages (role + content)
temperaturenumberNoSampling temperature
max_tokens / max_completion_tokensintegerNoMax output tokens
response_formatobjectNoe.g. { "type": "json_object" } (supported on qyma-logic)
toolsarrayNoTool definitions (OpenAI format)
tool_choicestring|objectNoTool choice
streambooleanNoMust 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"
  }
}
CodeHTTPWhen
model_not_found400 / 404Unknown model id
stream_not_supported400stream: true
invalid_messages400Missing / empty messages
(server)502Generation failed — retry later

Authentication & rate limits

Identical to the rest of External API v1:

  • Authorization: Bearer <api_key> or X-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.