Skip to main content

Text model

Claude Fable 5.2

anthropic/claude-fable-5.2

anthropic/claude-fable-5.2 is a language model from Anthropic you can call on the OceanToken API, with a 1M-token context window and up to 128K output tokens; it supports reasoning, tool calling, image input, file input.

At a glance

Model IDanthropic/claude-fable-5.2
TypeText
PublisherAnthropic
Context window1,000,000 tokens
Max output128,000 tokens
PriceOn oceantoken.ai
Capabilitiesreasoning, tool calling, image input, file input
Endpoint/v1/chat/completions, /v1/responses
API shapeOpenAI-compatible, or Anthropic Messages (/v1/messages)
In the catalog since2026-11-11

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": "anthropic/claude-fable-5.2",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'

Image input

curl https://api.oceantoken.ai/v1/chat/completions \
-H "Authorization: Bearer $OCEANTOKEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-fable-5.2",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What is in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/photo.jpg"
}
}
]
}
]
}'

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 128000
The most tokens to write, reasoning included. max_completion_tokens is accepted as the same thing.
stopstring or arrayUp to 4 strings; the answer ends before any of them.
response_formatobject
json_schema
{"type": "json_schema", "json_schema": {"name": ..., "schema": {...}}} for output that matches your schema. Plain json_object is not supported on this model; give a schema.
toolsarrayFunctions the model may call: {"type": "function", "function": {"name", "description", "parameters"}}.
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:

text

Text.

FieldTypeDescription
text
required
stringThe text.
cache_controlobjectOn a content part, {"type": "ephemeral"} caches the prompt up to and including it, so a repeat of that prefix is billed at the cache price. Prefixes under about 1,024 tokens are not cached.
{
"type": "text",
"text": "Describe this."
}

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"
}
}

file

A document such as a PDF, by URL or as base64.

FieldTypeDescription
file.file_data
required
stringA data URL or an https:// URL.
{
"type": "file",
"file": {
"file_data": "data:application/pdf;base64,...",
"filename": "report.pdf"
}
}

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": "anthropic/claude-fable-5.2",
"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 anthropic/claude-fable-5.2. Compare their prices on oceantoken.ai.

ModelPublisherContext
Claude Fable 5.2
anthropic/claude-fable-5.2
Anthropic1,000,000
GPT-6 Astra
openai/gpt-6-astra
OpenAI922K
GPT-6 Astra Pro
openai/gpt-6-astra-pro
OpenAI922K
GPT Astra Latest
openai/gpt-astra-latest
OpenAI1.05M

More from Anthropic

All Anthropic 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-14 (UTC), when the documentation was built. Prices are published on oceantoken.ai.