Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.308 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

Completions changedapi/completions

Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+30added
Lines−15removed
From line 1 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits24to this page, all time

### Headers ### Body parameters #### Response (200) ## Domain types ### Header Parameters ### Body Parameters #### Response ## Domain Types

The whole hunk

from line 1, old and new numbered
/
lines
from line 1
1---
2title: Completions
3url: https://platform.claude.com/docs/en/api/completions
4---
5 
61# Completions
72 
83## Create a Text Completion
94 
10**post** `/v1/complete`
5**POST** `/v1/complete`
116 
127[Legacy] Create a Text Completion.
138 
from line 10
1510 
1611Future models and features will not be compatible with Text Completions. See our [migration guide](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) for guidance in migrating from Text Completions to Messages.
1712 
18### Header Parameters
13### Headers
1914 
2015- `"anthropic-beta": optional array of AnthropicBeta`
2116 
from line 88
9388 
9489 - `"mid-conversation-tool-changes-2026-07-01"`
9590 
96### Body Parameters
91### Body parameters
9792 
9893- `max_tokens_to_sample: number`
9994 
from line 96
10196 
10297 Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.
10398 
99 minimum: 1
100 
104101- `model: Model`
105102 
106103 The model that will complete your prompt.
from line 192
195192 
196193 See [prompt validation](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) and our guide to [prompt design](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview) for more details.
197194 
195 minLength: 1
196 
198197- `metadata: optional Metadata`
199198 
200199 An object describing metadata about the request.
from line 204
205204 
206205 This should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number.
207206 
207 maxLength: 512
208 
208209- `stop_sequences: optional array of string`
209210 
210211 Sequences that will cause the model to stop generating.
from line 222
221222 
222223- `temperature: optional number`
223224 
225 **Deprecated**: Deprecated. Models released after Claude Opus 4.6 do not support setting temperature. A value of 1.0 of will be accepted for backwards compatibility, all other values will be rejected with a 400 error.
226 
224227 Amount of randomness injected into the response.
225228 
226229 Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` for analytical / multiple choice, and closer to `1.0` for creative and generative tasks.
from line 230
227230 
228231 Note that even with `temperature` of `0.0`, the results will not be fully deterministic.
229232 
233 maximum: 1, minimum: 0
234 
230235- `top_k: optional number`
231236 
237 **Deprecated**: Deprecated. Models released after Claude Opus 4.6 do not accept top_k; any value will be rejected with a 400 error.
238 
232239 Only sample from the top K options for each subsequent token.
233240 
234241 Used to remove "long tail" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
from line 242
235242 
236243 Recommended for advanced use cases only.
237244 
245 minimum: 0
246 
238247- `top_p: optional number`
239248 
249 **Deprecated**: Deprecated. Models released after Claude Opus 4.6 do not support setting top_p. A value >= 0.99 will be accepted for backwards compatibility, all other values will be rejected with a 400 error.
250 
240251 Use nucleus sampling.
241252 
242253 In nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by `top_p`.
from line 254
243254 
244255 Recommended for advanced use cases only.
245256 
257 maximum: 1, minimum: 0
258 
246259### Returns
247260 
248- `Completion object { id, completion, model, 2 more }`
261- `Completion object`
249262 
250263 - `id: string`
251264 
from line 359
346359 
347360 For Text Completions, this is always `"completion"`.
348361 
349 - `"completion"`
362 default: completion
350363 
364- `Completion object`
365 
351366### Example
352367 
353```http
368```bash
354369curl https://api.anthropic.com/v1/complete \
355370 -H 'Content-Type: application/json' \
356371 -H 'anthropic-version: 2023-06-01' \
from line 381
366381 }'
367382```
368383 
369#### Response
384#### Response (200)
370385 
371386```json
372387{
from line 393
378393}
379394```
380395 
381## Domain Types
396## Domain types
382397 
383398### Completion
384399 
385- `Completion object { id, completion, model, 2 more }`
400- `Completion object`
386401 
387402 - `id: string`
388403 
from line 498
483498 
484499 For Text Completions, this is always `"completion"`.
485500 
486 - `"completion"`
501 default: completion
487502 
Feedback