The whole hunk
from line 1, old and new numbered
/
lines
from line 1
1---
2title: Create a Text Completion
3url: https://platform.claude.com/docs/en/api/completions/create
4---
5
16# Create a Text Completion
27
38**POST** `/v1/complete`
from line 21
1621
1722 - `string`
1823
19 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
2025
2126 - `"message-batches-2024-09-24"`
2227
from line 69
6469
6570 - `"user-profiles-2026-08-18"`
6671
72 - `"user-profiles-2026-09-04"`
73
6774 - `"advisor-tool-2026-03-01"`
6875
6976 - `"managed-agents-2026-04-01"`
from line 113
106113
107114 - `"mid-conversation-system-clear-at-2026-08-21"`
108115
116- `"anthropic-workspace-id": optional string`
117
109118## Body parameters
110119
111120- `max_tokens_to_sample: number`
from line 295
286295
287296- `Completion object`
288297
298 - `type: "completion"`
299
300 Object type.
301
302 For Text Completions, this is always `"completion"`.
303
304 default: completion
305
289306 - `id: string`
290307
291308 Unique object identifier.
from line 403
386403
387404 * `"stop_sequence"`: we reached a stop sequence — either provided by you via the `stop_sequences` parameter, or a stop sequence built into the model
388405 * `"max_tokens"`: we exceeded `max_tokens_to_sample` or the model's maximum
389
390 - `type: "completion"`
391
392 Object type.
393
394 For Text Completions, this is always `"completion"`.
395
396 default: completion
397406
398407## Example
399408