The whole hunk
from line 11, old and new numbered
/
lines
from line 11
1111## Models
1212
1313```text wrap
14Recommended default for most work, including complex agentic coding: Claude Opus 5: claude-opus-5
15Step up for the hardest long-running agentic and research tasks, at 2x Claude Opus 5 pricing: Claude Fable 5.1: claude-fable-5-1
16Previous Opus model: Claude Opus 4.8: claude-opus-4-8
14Recommended default for most work, including complex agentic coding: Claude Opus 5.5: claude-opus-5-5
15Step up for the hardest long-running agentic and research tasks, at 2.5x Claude Opus 5.5 pricing: Claude Fable 5.1: claude-fable-5-1
16Previous Opus model: Claude Opus 5: claude-opus-5
1717Smart model: Claude Sonnet 5: claude-sonnet-5
1818For fast, cost-effective tasks: Claude Haiku 4.5: claude-haiku-4-5-20251001
1919```
from line 25
2525<CodeGroup exclude="shell:cURL, typescript, csharp, go, java, php, ruby">
2626 ```bash CLI
2727 ant messages create \
28 --model claude-opus-5 \
28 --model claude-opus-5-5 \
2929 --max-tokens 1024 \
3030 --message '{"role": "user", "content": "Hello, Claude"}'
3131 ```
from line 34
3434 import anthropic
3535
3636 message = anthropic.Anthropic().messages.create(
37 model="claude-opus-5",
37 model="claude-opus-5-5",
3838 max_tokens=1024,
3939 messages=[{"role": "user", "content": "Hello, Claude"}],
4040 )
from line 53
5353 "text": "Hello!"
5454 }
5555 ],
56 "model": "claude-opus-5",
56 "model": "claude-opus-5-5",
5757 "stop_reason": "end_turn",
5858 "stop_sequence": null,
5959 "usage": {
from line 70
7070<CodeGroup exclude="shell:cURL, typescript, csharp, go, java, php, ruby">
7171 ```bash CLI
7272 ant messages create <<'YAML'
73 model: claude-opus-5
73 model: claude-opus-5-5
7474 max_tokens: 1024
7575 messages:
7676 - role: user
from line 86
8686 import anthropic
8787
8888 message = anthropic.Anthropic().messages.create(
89 model="claude-opus-5",
89 model="claude-opus-5-5",
9090 max_tokens=1024,
9191 messages=[
9292 {"role": "user", "content": "Hello, Claude"},
from line 149
149149 curl -sSo vision-example.jpg "$IMAGE_URL"
150150
151151 ant messages create <<'YAML'
152 model: claude-opus-5
152 model: claude-opus-5-5
153153 max_tokens: 1024
154154 messages:
155155 - role: user
from line 165
165165
166166 # Option 2: URL-referenced image
167167 ant messages create <<YAML
168 model: claude-opus-5
168 model: claude-opus-5-5
169169 max_tokens: 1024
170170 messages:
171171 - role: user
from line 190
190190 image_data = base64.standard_b64encode(httpx2.get(image_url).content).decode("utf-8")
191191
192192 message = anthropic.Anthropic().messages.create(
193 model="claude-opus-5",
193 model="claude-opus-5-5",
194194 max_tokens=1024,
195195 messages=[
196196 {
from line 213
213213
214214 # Option 2: URL-referenced image
215215 message_from_url = anthropic.Anthropic().messages.create(
216 model="claude-opus-5",
216 model="claude-opus-5-5",
217217 max_tokens=1024,
218218 messages=[
219219 {
from line 264
264264<CodeGroup exclude="shell:cURL, typescript, csharp, go, java, php, ruby">
265265 ```bash CLI
266266 ant messages create --transform content --format yaml <<'YAML'
267 model: claude-opus-5
267 model: claude-opus-5-5
268268 max_tokens: 16000
269269 thinking:
270270 type: adaptive
from line 281
281281 client = anthropic.Anthropic()
282282
283283 response = client.messages.create(
284 model="claude-opus-5",
284 model="claude-opus-5-5",
285285 max_tokens=16000,
286286 thinking={"type": "adaptive", "display": "summarized"},
287287 messages=[
from line 321
321321 # blocks, signatures intact) as compact JSON.
322322 ASSISTANT_CONTENT=$(ant messages create \
323323 --transform content --format jsonl <<'YAML'
324 model: claude-opus-5
324 model: claude-opus-5-5
325325 max_tokens: 16000
326326 thinking:
327327 type: adaptive
from line 348
348348 # Second request: pass the captured blocks back unchanged as the assistant
349349 # message. The thinking block must accompany the tool_use block.
350350 ant messages create <<YAML
351 model: claude-opus-5
351 model: claude-opus-5-5
352352 max_tokens: 16000
353353 thinking:
354354 type: adaptive
from line 395
395395
396396 # First request - Claude responds with thinking and tool request
397397 response = client.messages.create(
398 model="claude-opus-5",
398 model="claude-opus-5-5",
399399 max_tokens=16000,
400400 thinking={"type": "adaptive", "display": "summarized"},
401401 tools=[weather_tool],
from line 412
412412
413413 # Second request - Include thinking block and tool result
414414 continuation = client.messages.create(
415 model="claude-opus-5",
415 model="claude-opus-5-5",
416416 max_tokens=16000,
417417 thinking={"type": "adaptive", "display": "summarized"},
418418 tools=[weather_tool],
from line 624
624624* `tool` forces Claude to always use a particular tool.
625625* `none` prevents Claude from using any tools.
626626
627On Claude Fable 5.1 and Claude Mythos 5.1, `any` and `tool` return a 400 error. Leave `tool_choice` at `auto` and set `"strict": true` on the tool definition to guarantee that any call Claude makes matches the tool's `input_schema`. See [Strict tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use).
627On Claude Opus 5.5, Claude Fable 5.1, and Claude Mythos 5.1, `any` and `tool` return a 400 error. Leave `tool_choice` at `auto` and set `"strict": true` on the tool definition to guarantee that any call Claude makes matches the tool's `input_schema`. See [Strict tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use).
628628
629629### JSON output
630630
from line 726
726726<CodeGroup exclude="shell:cURL, typescript, csharp, go, java, php, ruby">
727727 ```bash CLI
728728 ant messages create --stream --format jsonl \
729 --model claude-opus-5 \
729 --model claude-opus-5-5 \
730730 --max-tokens 1024 \
731731 --message '{role: user, content: "Hello"}' \
732732 | jq -rj 'select(.delta.type? == "text_delta") | .delta.text'
from line 740
740740 with client.messages.stream(
741741 max_tokens=1024,
742742 messages=[{"role": "user", "content": "Hello"}],
743 model="claude-opus-5",
743 model="claude-opus-5-5",
744744 ) as stream:
745745 for text in stream.text_stream:
746746 print(text, end="", flush=True)
from line 797
797797
798798```sse
799799event: message_start
800data: {"type": "message_start", "message": {"id": "msg_1nZdL29xx5MUA1yADyHTEsnR8uuvGzszyY", "type": "message", "role": "assistant", "content": [], "model": "claude-opus-5", "stop_reason": null, "stop_sequence": null, "usage": {"input_tokens": 25, "output_tokens": 1}}}
800data: {"type": "message_start", "message": {"id": "msg_1nZdL29xx5MUA1yADyHTEsnR8uuvGzszyY", "type": "message", "role": "assistant", "content": [], "model": "claude-opus-5-5", "stop_reason": null, "stop_sequence": null, "usage": {"input_tokens": 25, "output_tokens": 1}}}
801801
802802event: content_block_start
803803data: {"type": "content_block_start", "index": 0, "content_block": {"type": "text", "text": ""}}