Text Series
DeepSeek
- DeepSeek models, callable through the OpenAI-compatible Chat Completions API.
- Use your existing
OpenAI SDKto callPOST /v1/chat/completions. Setbase_urltohttps://api.apiko.app/v1,api_keyto your APIKO key, andmodeltodeepseek-v4-proordeepseek-v4.1-flash-1017. See DeepSeek V4 Pro API pricing. - Base URL
https://api.apiko.app/v1. The model list below is what the catalog sells today;GET /v1/modelsreturns the models your key can call.
POST
Authorizations
Send
Authorization: Bearer <API_KEY>. Create keys in Console → API Keys.Routes
string
POST /v1/chat/completions— OpenAI-compatible Chat Completions; JSON by default, SSE with"stream": true
Body
application/json
model
enum<string>required
Public model id. Use it exactly as listed.
Available options:
deepseek-v4-pro, deepseek-v4.1-flash-1017Example:
"deepseek-v4-pro"messages
object[]required
Conversation messages in the Chat Completions format.
tools
object[]
List function definitions with their parameter schemas. When the response contains
tool_calls, append the full assistant message, run the function and send its result as a tool message with the corresponding tool_call_id.When thinking mode is active in multi-turn requests with
tools, pass back the reasoning_content field on earlier assistant messages within the same turn sequence; omitting it can trigger an upstream HTTP 400.stream
booleandefault:false
Set to
true for Server-Sent Events. On Chat Completions, add "stream_options": {"include_usage": true} to receive token usage in the final event.other fields
object
Tools, response formats, temperature and reasoning controls follow the upstream API of the route you call.
Reasoning level: Chat Completions accepts
reasoning_effort (for example low); how much it changes thinking depends on the model.Thinking tokens count toward
max_tokens on deepseek-v4-pro. A small limit can be spent entirely on thinking: the response then ends with finish_reason: "length" and no visible text (seen with limits of 64 and 200). Leave room for the answer, and lower reasoning_effort rather than max_tokens to control cost. What was billed is in usage.completion_tokens.Response
200 - application/json
JSON response
object
Chat Completions returns
choices[0].message.content and usage.Thinking, when returned, is in
choices[0].message.reasoning_content.model in the response may be a versioned upstream name rather than the id you sent; log and reconcile by the id you sent.SSE response
text/event-stream
For Chat Completions streams, read events until
data: [DONE] and append choices[0].delta.content from each event whose choices is non-empty. With include_usage, usage arrives in a separate final event after the one with finish_reason, and that event has an empty choices.Thinking streams in
delta.reasoning_content, often before any delta.content arrives.