OpenAI-compatible
Requests and responses match the OpenAI Chat Completions shape. Reuse your existing OpenAI client — just change the base URL and key.
Send OpenAI-style chat messages and get a completion back from the model you choose —
Learn more about LLM CompletionsAdditional settings
⌘/Ctrl + Enter to run
Your conversation shows up here
You ask on the left — question and answer appear as chat.
Send OpenAI-style chat messages and get a completion back from the model you choose — GPT, Claude, Gemini and others, all behind a single endpoint and a single API key. The request and response follow the OpenAI Chat Completions format, so you can point an existing OpenAI client at this endpoint and change one line. Stream the answer token by token with Server-Sent Events, or get it in one response. Browse the available models (and compare them side by side) before you pick one.
Requests and responses match the OpenAI Chat Completions shape. Reuse your existing OpenAI client — just change the base URL and key.
Choose GPT, Claude, Gemini and more by setting the model field. Switch models without changing your code.
Set stream:true to receive Server-Sent chat.completion.chunk events as the model types, or omit it to get the full answer at once.
List the available models with their capabilities, or get a side-by-side comparison, before you choose.
Chat and assistants
Power chatbots, copilots and assistants with multi-turn conversations.
Content generation
Draft, rewrite, summarize or translate text from a prompt.
Structured extraction
Ask the model to read text and return structured fields (with your own instructions in a system message).
Drop-in OpenAI replacement
Move an existing OpenAI integration over by changing the base URL and key.
input
A model id and a list of chat messages (system / user / assistant), with optional temperature, max_tokens and stream.
output
The standard CN8 response envelope: the assistant's reply in data.message plus data.token_usage. With stream:true you instead receive an SSE stream of OpenAI-style chat.completion.chunk events.
data.message and token counts from data.token_usage. An unmodified OpenAI SDK won't parse it — send the request with your own HTTP client.stream: true) does emit OpenAI-compatible chat.completion.chunk SSE events, so existing OpenAI stream-parsing code works there.model field — no other code changes needed.stream: true to receive Server-Sent Events.chat.completion.chunk; append choices[0].delta.content as chunks arrive.data: [DONE]. The final chunk before it carries the token usage.messagesrequiredarrayWhat you want the model to answer. In the API this is an OpenAI-style array: [{ role: 'system' | 'user' | 'assistant', content: string }].
modelrequiredstring · default: gpt-4.1-miniWhich model answers. Prices differ per model — the live list shows each one's rate.
temperaturenumber · default: 0.7Lower is focused and repeatable, higher is more creative. Reasoning models ignore this.
max_tokensinteger · default: 512Upper bound on the reply. ~1 token is 4 characters; 512 is a few paragraphs.
streamboolean · default: falseWhen true the reply arrives token by token as SSE (chat.completion.chunk events) instead of one JSON body.
json_schemaobjectForce the reply to match a JSON Schema: { name, strict, schema }. With strict=true every object needs additionalProperties=false and all properties listed in required (use anyOf-with-null for optionals). OpenAI models enforce this natively and return guaranteed raw JSON; Claude models follow the schema faithfully but may wrap the JSON in a markdown fence - strip it before parsing.
top_pnumberAlternative to temperature — limits the token pool to the most likely mass. Change one or the other, not both.
Chat completions are billed per token at the selected model's rate (reported by the upstream per call — cheap models bill far below the nominal ceiling). Listing and comparing models is free.
| Service | Unit | Price |
|---|---|---|
| Chat Completion | token | per token, per model — see List Models for live rates |
| List Models | item | Free |
| Compare Models | item | Free |
Completions are billed on total_tokens (prompt + completion).
Streaming and non-streaming are billed the same — by tokens, not by request.