Skip to main content

Text model

Qwen3.8 Max Prime

qwen/qwen3.8-max-prime

qwen/qwen3.8-max-prime is a language model from Qwen you can call on the OceanToken API, with a 984K-token context window and up to 131K output tokens; it supports reasoning, tool calling, image input, video input.

Price card, similar models and questions answered: Qwen3.8 Max Prime on oceantoken.ai.

At a glance

Model IDqwen/qwen3.8-max-prime
TypeText
PublisherQwen
Context window983,616 tokens
Max output131,072 tokens
PriceOn oceantoken.ai
Capabilitiesreasoning, tool calling, image input, video input
Endpoint/v1/chat/completions, /v1/responses
API shapeOpenAI-compatible
In the catalog since2026-09-23

API

POST /v1/chat/completions (also /v1/responses and /v1/messages). Base URL https://api.oceantoken.ai, your OceanToken key as the bearer token. The OpenAI SDKs work unchanged; see the Quickstart.

Download this spec (JSON) · llms.txt for AI assistants

Basic

curl https://api.oceantoken.ai/v1/chat/completions \
-H "Authorization: Bearer $OCEANTOKEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3.8-max-prime",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'

Video input

curl https://api.oceantoken.ai/v1/chat/completions \
-H "Authorization: Bearer $OCEANTOKEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3.8-max-prime",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What happens in this video?"
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/clip.mp4"
}
}
]
}
]
}'

Request parameters

Only what this model takes. Anything else in the request is left out before it reaches the model.

ParameterTypeDescription
model
required
stringThis model's ID.
messages
required
arrayThe conversation so far: objects with a role (system, user, assistant or tool) and a content, a string or a list of content parts: text, and images, video, audio or files on models that take them.
streamboolean
default false
Send the answer as server-sent events as it is written.
stream_optionsobjectWith stream: {"include_usage": true} adds a last event with the token counts.
max_tokensinteger
1 to 131072
The most tokens to write, reasoning included. max_completion_tokens is accepted as the same thing.
temperaturenumber
0 to 2
Randomness: lower is more focused, higher more varied.
top_pnumber
0 to 1
Nucleus sampling: only the most likely tokens whose probabilities add up to this are considered.
top_kinteger
1 or more
Only the top_k most likely tokens are considered at each step.
frequency_penaltynumber
-2 to 2
Positive values make the model less likely to repeat the same words.
presence_penaltynumber
-2 to 2
Positive values make the model more likely to move to new topics.
stopstring or arrayUp to 4 strings; the answer ends before any of them.
seedintegerAsk for the same answer to the same request (best effort).
response_formatobject
json_object, json_schema
{"type": "json_object"} for JSON output, or {"type": "json_schema", "json_schema": {"name": ..., "schema": {...}}} for output that matches your schema.
toolsarrayFunctions the model may call: {"type": "function", "function": {"name", "description", "parameters"}}.
tool_choicestring or objectauto (default), none, required, or {"type": "function", "function": {"name": ...}}.
parallel_tool_callsbooleanfalse asks for at most one tool call per turn.
reasoning_effortstring
minimal, low, medium, high, xhigh
default "xhigh"
How much the model thinks before answering. This model always reasons; the level sets how much: minimal the least reasoning; low less reasoning, faster; medium balanced; high more reasoning, slower; xhigh more than high.
logprobsbooleanReturn the log probability of each output token.
top_logprobsinteger
0 to 20
With logprobs: how many alternatives to return per token.
userstringYour own ID for the end user, for your records.

Message content

Besides a plain string, a message's content can be a list of parts:

image_url

An image, as a public https:// URL or a data URL.

FieldTypeDescription
image_url.url
required
stringhttps:// URL or data:image/...;base64,....
{
"type": "image_url",
"image_url": {
"url": "https://example.com/photo.jpg"
}
}

video_url

A video, as a public https:// URL (a YouTube link works on models that take one) or a data URL.

FieldTypeDescription
video_url.url
required
stringhttps:// URL or data:video/mp4;base64,....
{
"type": "video_url",
"video_url": {
"url": "https://example.com/clip.mp4"
}
}

Response

FieldTypeDescription
idstringThe request's ID.
choices[].message.contentstringThe answer.
choices[].message.reasoning_contentstringThe model's reasoning, on models that return it.
choices[].message.tool_callsarrayThe tools the model wants called, with JSON arguments.
choices[].finish_reasonstringstop, length (hit max_tokens), tool_calls or content_filter.
usage.prompt_tokensintegerInput tokens, media included.
usage.completion_tokensintegerOutput tokens, reasoning included.
usage.prompt_tokens_details.cached_tokensintegerInput tokens read from the prompt cache.
usage.completion_tokens_details.reasoning_tokensintegerOutput tokens spent reasoning.

With stream: true, chat.completion.chunk events carry choices[].delta; the stream ends with data: [DONE].

Example response
{
"id": "chatcmpl-...",
"object": "chat.completion",
"created": 1792000000,
"model": "qwen/qwen3.8-max-prime",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "...",
"reasoning_content": null,
"tool_calls": null
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 20,
"total_tokens": 32,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0
}
}
}

More examples and how errors and billing work: Text generation.

Compared with similar models

Text models on OceanToken in the same price range as qwen/qwen3.8-max-prime. Compare their prices on oceantoken.ai.

ModelPublisherContext
Qwen3.8 Max Prime
qwen/qwen3.8-max-prime
Qwen983,616
Gemini 3.1 Pro Preview
google/gemini-3.1-pro-preview
Google1.05M
Gemini 3.1 Pro Preview Customtools
google/gemini-3.1-pro-preview-customtools
Google1.05M
GPT-5.6 Terra
openai/gpt-5.6-terra
OpenAI922K

More from Qwen

All Qwen models on OceanToken

Use it

Create an account Price on oceantoken.ai

The facts on this page were read from the live OceanToken catalog on 2026-11-05 (UTC), when the documentation was built. Prices are published on oceantoken.ai.