All models

DeepSeek V4 Pro

@cf/deepseek-ai/deepseek-v4-pro-0813
llmchatreasoningopenai-compatible

DeepSeek's high-capability reasoning model (Mixture of Experts, 131k context) — frontier-level reasoning at one of the lowest prices in the catalog. Call it through the OpenAI-compatible POST /v1/chat/completions — swap the base URL on your existing OpenAI SDK and pay per call. Billing is a pre-charged ceiling: (estimated input tokens + your max_tokens) at the per-1M rates ($1.74 in / $3.48 out), so set max_tokens to bound spend; the response returns real usage.

Quick start

# Inspect the price — a plain request returns the 402 challenge:
curl -i https://api.glianalabs.com/v1/chat/completions \
  -H "content-type: application/json" \
  -d '{
    "model": "@cf/deepseek-ai/deepseek-v4-pro-0813",
    "messages": [{"role": "user", "content": "<your message>"}]
  }'

# Pay + run in one step with the mppx CLI (create a wallet: npx mppx account create):
npx mppx https://api.glianalabs.com/v1/chat/completions \
  -J '{"model": "@cf/deepseek-ai/deepseek-v4-pro-0813", "messages": [{"role": "user", "content": "<your message>"}]}'

Parameters

Input
messages array required

OpenAI-style chat messages: [{ role: "user" | "system" | "assistant" | "tool", content }]. Vision: content may be a parts array with { type: "image_url", image_url: { url } } (public URL — upload via POST /v1/media).

audio object optional

Parameters for audio output. Required when modalities includes 'audio'.

chat_template_kwargs object optional
frequency_penalty number optional default: 0

Penalizes new tokens based on their existing frequency in the text so far.

function_call string optional
functions array optional
logit_bias object optional

Modify the likelihood of specified tokens appearing in the completion. Maps token IDs to bias values from -100 to 100.

logprobs boolean optional default: false

Whether to return log probabilities of the output tokens.

max_completion_tokens integer optional

An upper bound for the number of tokens that can be generated for a completion.

max_tokens integer optional

Output cap — bounds the pre-charged ceiling. Default 1024.

metadata object optional

Set of 16 key-value pairs that can be attached to the object.

modalities array optional

Output types requested from the model (e.g. ['text'] or ['text', 'audio']).

model string optional

ID of the model to use (e.g. '@cf/zai-org/glm-4.7-flash, etc').

n integer optional default: 1

How many chat completion choices to generate for each input message.

parallel_tool_calls boolean optional default: true

Whether to enable parallel function calling during tool use.

prediction object optional
presence_penalty number optional default: 0

Penalizes new tokens based on whether they appear in the text so far.

reasoning_effort string optional default: "high"

Reasoning effort. Supported levels: max, high, low, none. Compatibility aliases: minimal maps to low; medium maps to high; xhigh maps to high.

response_format optional

How the result is returned (e.g. a URL or base64 data).

seed integer optional

If specified, the system will make a best effort to sample deterministically.

stop string optional

Up to 4 sequences where the API will stop generating further tokens.

store boolean optional default: false

Whether to store the output for model distillation / evals.

stream boolean optional default: false

true → Server-Sent Events (OpenAI chunk format) on /v1/chat/completions.

stream_options object optional
temperature number optional default: 1

Sampling temperature. Passed through where the provider supports it.

tool_choice string optional

"auto" (default) | "none" | "required" | { type: "function", function: { name } }.

tools array optional

OpenAI function tools: [{ type: "function", function: { name, description, parameters } }]. Response returns tool_calls (finish_reason "tool_calls"); send results back as { role: "tool", tool_call_id, content }.

top_logprobs integer optional

How many top log probabilities to return at each token position (0-20). Requires logprobs=true.

top_p number optional default: 1

Nucleus sampling. Passed through where the provider supports it.

user string optional

A unique identifier representing your end-user, for abuse monitoring.

web_search_options object optional

Options for the web search tool (when using built-in web search).

Output
choices[0].message.content
usage (prompt/completion tokens)
costMicroUsd