Anthropic · Schema
CompletionRequest
LLMAnthropicArtificial IntelligenceClaudeFoundation ModelsMachine LearningMCPAgents
Properties
| Name | Type | Description |
|---|---|---|
| model | object | |
| prompt | string | The prompt that you want Claude to complete. For proper response generation you will need to format your prompt using alternating `\n\nHuman:` and `\n\nAssistant:` conversational turns. For example: ` |
| max_tokens_to_sample | integer | The maximum number of tokens to generate before stopping. Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate. |
| stop_sequences | array | Sequences that will cause the model to stop generating. Our models stop on `"\n\nHuman:"`, and may include additional built-in stop sequences in the future. By providing the stop_sequences parameter, |
| temperature | number | Amount of randomness injected into the response. 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 |
| top_p | number | Use nucleus sampling. 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 partic |
| top_k | integer | Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-fro |
| metadata | object | An object describing metadata about the request. |
| stream | boolean | Whether to incrementally stream the response using server-sent events. See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming) for details. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/anthropic/main/json-schema/anthropic-completion-request-schema.json",
"title": "CompletionRequest",
"x-generated": "2026-09-23",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/anthropic-complete-api-openapi.yml#/components/schemas/CompletionRequest",
"additionalProperties": false,
"properties": {
"model": {
"$ref": "#/$defs/Model"
},
"prompt": {
"description": "The prompt that you want Claude to complete.\n\nFor proper response generation you will need to format your prompt using alternating `\\n\\nHuman:` and `\\n\\nAssistant:` conversational turns. For example:\n\n```\n\"\\n\\nHuman: {userQuestion}\\n\\nAssistant:\"\n```\n\nSee [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.",
"minLength": 1,
"title": "Prompt",
"type": "string"
},
"max_tokens_to_sample": {
"description": "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.",
"minimum": 1,
"title": "Max Tokens To Sample",
"type": "integer"
},
"stop_sequences": {
"description": "Sequences that will cause the model to stop generating.\n\nOur models stop on `\"\\n\\nHuman:\"`, and may include additional built-in stop sequences in the future. By providing the stop_sequences parameter, you may include additional strings that will cause the model to stop generating.",
"items": {
"type": "string"
},
"title": "Stop Sequences",
"type": "array"
},
"temperature": {
"deprecated": true,
"description": "Amount of randomness injected into the response.\n\nDefaults 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.\n\nNote that even with `temperature` of `0.0`, the results will not be fully deterministic.",
"maximum": 1,
"minimum": 0,
"title": "Temperature",
"type": "number",
"x-stainless-deprecation-message": "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.",
"x-stainless-skip": [
"python"
]
},
"top_p": {
"deprecated": true,
"description": "Use nucleus sampling.\n\nIn 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`.\n\nRecommended for advanced use cases only.",
"maximum": 1,
"minimum": 0,
"title": "Top P",
"type": "number",
"x-stainless-deprecation-message": "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.",
"x-stainless-skip": [
"python"
]
},
"top_k": {
"deprecated": true,
"description": "Only sample from the top K options for each subsequent token.\n\nUsed to remove \"long tail\" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).\n\nRecommended for advanced use cases only.",
"minimum": 0,
"title": "Top K",
"type": "integer",
"x-stainless-deprecation-message": "Deprecated. Models released after Claude Opus 4.6 do not accept top_k; any value will be rejected with a 400 error.",
"x-stainless-skip": [
"python"
]
},
"metadata": {
"$ref": "#/$defs/Metadata",
"description": "An object describing metadata about the request."
},
"stream": {
"description": "Whether to incrementally stream the response using server-sent events.\n\nSee [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming) for details.",
"title": "Stream",
"type": "boolean"
}
},
"required": [
"max_tokens_to_sample",
"model",
"prompt"
],
"type": "object",
"$defs": {
"Metadata": {
"additionalProperties": false,
"properties": {
"user_id": {
"anyOf": [
{
"maxLength": 512,
"type": "string"
},
{
"type": "null"
}
],
"description": "An external identifier for the user who is associated with the request.\n\nThis 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.",
"title": "User Id"
}
},
"title": "Metadata",
"type": "object"
},
"Model": {
"title": "Model",
"description": "The model that will complete your prompt.\n\nSee [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.",
"anyOf": [
{
"type": "string"
},
{
"const": "claude-sonnet-5",
"description": "High-performance model for coding and agents",
"x-stainless-nominal": false
},
{
"const": "claude-fable-5",
"description": "Next generation of intelligence for the hardest knowledge work and coding problems",
"x-stainless-nominal": false
},
{
"const": "claude-mythos-5",
"description": "Most capable model for cybersecurity and biology research",
"x-stainless-nominal": false
},
{
"const": "claude-opus-5",
"description": "Powerful intelligence for long-running agents and coding",
"x-stainless-nominal": false
},
{
"const": "claude-opus-4-8",
"description": "Powerful intelligence for long-running agents and coding",
"x-stainless-nominal": false
},
{
"const": "claude-opus-4-7",
"description": "Powerful intelligence for long-running agents and coding",
"x-stainless-nominal": false
},
{
"const": "claude-mythos-preview",
"description": "New class of intelligence, strongest in coding and cybersecurity",
"x-stainless-nominal": false,
"deprecated": true,
"x-stainless-deprecation-message": "Will reach end-of-life on June 30, 2026. Please migrate to claude-mythos-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information."
},
{
"const": "claude-opus-4-6",
"description": "Powerful intelligence for long-running agents and coding",
"x-stainless-nominal": false
},
{
"const": "claude-sonnet-4-6",
"description": "Best combination of speed and intelligence",
"x-stainless-nominal": false
},
{
"const": "claude-haiku-4-5",
"description": "Fastest model with near-frontier intelligence",
"x-stainless-nominal": false
},
{
"const": "claude-haiku-4-5-20251001",
"description": "Fastest model with near-frontier intelligence",
"x-stainless-nominal": false
},
{
"const": "claude-opus-4-5",
"description": "Powerful intelligence for long-running agents and coding",
"x-stainless-nominal": false
},
{
"const": "claude-opus-4-5-20251101",
"description": "Powerful intelligence for long-running agents and coding",
"x-stainless-nominal": false
},
{
"const": "claude-sonnet-4-5",
"description": "High-performance model for agents and coding",
"x-stainless-nominal": false
},
{
"const": "claude-sonnet-4-5-20250929",
"description": "High-performance model for agents and coding",
"x-stainless-nominal": false
}
]
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/anthropic-completion-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.