OpenAI-compatible API

Syncli Models API

Use https://openai.syncli.cloud/v1 as a drop-in OpenAI API base URL. Access local Ollama models, vision models, and cloud models (Step, MiniMax, Kimi, etc.) with standard /v1/chat/completions and /v1/models endpoints.

Quick start

Set your client base URL to:

https://openai.syncli.cloud/v1

Test with curl (replace YOUR_KEY with your API key):

# List models
curl https://openai.syncli.cloud/v1/models \
  -H "Authorization: Bearer YOUR_KEY"

# Chat completion
curl https://openai.syncli.cloud/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen2.5:7b",
    "messages": [{"role": "user", "content": "Hello!"}],
    "stream": false
  }'

Authentication

Every request must include an Authorization header:

Authorization: Bearer <your-key>

Supported key types

TypeFormatWhere to get it
Dashboard API key sk-... Syncli dashboard → API Keys → Generate New Key. Full key shown once; UI shows preview only after.
Developer API key syncli_... Voice app → Developer drawer → Generate API Key. Scopes: chat, voice, mcp.
Session JWT eyJhbG... Browser session token after login (same as Open WebUI).
Admin keys (sk-...) on an admin account can access all models and bypass balance checks. Regular user keys only see models permitted for that account.

List models

GET /v1/models

Returns an OpenAI-compatible model list. Models include local Ollama, vision, and cloud-hosted models you have access to.

curl https://openai.syncli.cloud/v1/models \
  -H "Authorization: Bearer YOUR_KEY"

Example response:

{
  "object": "list",
  "data": [
    { "id": "qwen2.5:14b-instruct-q4_K_M", "object": "model", "owned_by": "syncli" },
    { "id": "gpt-4o-mini-clean:latest", "object": "model", "owned_by": "syncli" },
    { "id": "step-1:cloud", "object": "model", "owned_by": "syncli" },
    { "id": "llama3.2-vision:11b", "object": "model", "owned_by": "syncli" }
  ]
}

Common model categories:

CategoryExample model IDsNotes
Local chatqwen2.5:7b, qwen2.5:14b-instruct-q4_K_M, llama3.1:8b-instruct-q4_K_MRuns on local Ollama
Visiongpt-4o-mini-clean:latest, llama3.2-vision:11b, moondream:latestImage + text input
Cloudstep-1:cloud, minimax-m2.7:cloud, kimi-k2.5:cloud, qwen3-coder:480b-cloudMay consume credits

Chat completions

POST /v1/chat/completions

Standard OpenAI chat completion. Pass any model ID from /v1/models.

{
  "model": "qwen2.5:14b-instruct-q4_K_M",
  "messages": [
    { "role": "system", "content": "You are a helpful assistant." },
    { "role": "user", "content": "Summarize quantum computing in two sentences." }
  ],
  "stream": false,
  "temperature": 0.7,
  "max_tokens": 512
}
curl https://openai.syncli.cloud/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d @request.json

Response:

{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "created": 1778869002,
  "model": "qwen2.5:14b-instruct-q4_K_M",
  "choices": [{
    "index": 0,
    "message": { "role": "assistant", "content": "..." },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 24,
    "completion_tokens": 48,
    "total_tokens": 72
  }
}

Streaming

Set "stream": true to receive Server-Sent Events (SSE):

{
  "model": "qwen2.5:7b",
  "messages": [{ "role": "user", "content": "Write a haiku about code." }],
  "stream": true
}
curl -N https://openai.syncli.cloud/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"qwen2.5:7b","messages":[{"role":"user","content":"Hi"}],"stream":true}'

Response format (OpenAI-compatible chunks):

data: {"choices":[{"delta":{"content":"Hello"}}]}
data: {"choices":[{"delta":{"content":" world"}}]}
data: [DONE]

Vision models

Send images using OpenAI's image_url content parts. Recommended vision models:

Base64 image (recommended)

Inline base64 is the most reliable method through the API gateway:

IMG_B64=$(base64 -w0 photo.jpg)

curl https://openai.syncli.cloud/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"model\": \"gpt-4o-mini-clean:latest\",
    \"messages\": [{
      \"role\": \"user\",
      \"content\": [
        {\"type\": \"text\", \"text\": \"Describe this image briefly.\"},
        {\"type\": \"image_url\", \"image_url\": {\"url\": \"data:image/jpeg;base64,${IMG_B64}\"}}
      ]
    }],
    \"stream\": false,
    \"max_tokens\": 300
  }"

Public URL (optional)

{
  "model": "gpt-4o-mini-clean:latest",
  "messages": [{
    "role": "user",
    "content": [
      { "type": "text", "text": "What logo is this?" },
      { "type": "image_url", "image_url": { "url": "https://example.com/image.png" } }
    ]
  }],
  "stream": false
}
External image URLs may fail if the upstream cannot fetch them. Prefer base64 data:image/... URLs for production use.

Cloud models

Cloud models use the same API — only change the model field:

curl https://openai.syncli.cloud/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "step-1:cloud",
    "messages": [{"role": "user", "content": "Explain transformers in simple terms."}],
    "stream": false
  }'

Other cloud models: minimax-m2.7:cloud, kimi-k2.5:cloud, gemma4:31b-cloud, qwen3-coder:480b-cloud.

Some cloud models are restricted and require account credits. Admins are exempt from balance checks but usage is still logged.

SDK examples

Python (OpenAI SDK)

from openai import OpenAI

client = OpenAI(
    base_url="https://openai.syncli.cloud/v1",
    api_key="YOUR_KEY",  # sk-... or syncli_...
)

# List models
models = client.models.list()
for m in models.data:
    print(m.id)

# Chat
response = client.chat.completions.create(
    model="qwen2.5:7b",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

# Streaming
stream = client.chat.completions.create(
    model="qwen2.5:7b",
    messages=[{"role": "user", "content": "Count to 5."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Node.js (OpenAI SDK)

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://openai.syncli.cloud/v1",
  apiKey: process.env.SYNCLI_API_KEY,
});

const completion = await client.chat.completions.create({
  model: "qwen2.5:7b",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(completion.choices[0].message.content);

LangChain

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    base_url="https://openai.syncli.cloud/v1",
    api_key="YOUR_KEY",
    model="qwen2.5:14b-instruct-q4_K_M",
)
print(llm.invoke("Hello!").content)

Errors & rate limits

HTTPMeaning
401Missing or invalid Authorization header / expired key
403Key lacks required scope (e.g. chat on syncli_ keys) or model access denied
429Rate limit exceeded (default 60 req/min per user for developer keys)
502Upstream model service unavailable — retry or check model name

Example error body:

{ "detail": "Invalid session" }

Usage & billing

vs. Syncli Agent API

This endpoint (openai.syncli.cloud) exposes raw model access — direct passthrough to your models without Syncli agent tooling.

openai.syncli.cloudapivoice.syncli.cloud
PurposeOpenAI-compatible model APISyncli voice agent + tools
ModelsAll models (local, vision, cloud)Agent wrapper (syncli-voice alias)
ToolsNone (raw LLM)Calendar, Gmail, MCP, etc.
Voice WebRTCNoYes (/start, WebRTC)
Docs/docs (this page)/docs/api

Security


Syncli OpenAI API · Base URL: https://openai.syncli.cloud/v1 · Health: /health · Agent API docs: apivoice.syncli.cloud/docs/api