SPB Git

Repository Public

models.md 22.4 KB 1,058 lines markdown

1---2title: Models3url: https://platform.claude.com/docs/en/api/models4---56# Models78## List Models910**GET** `/v1/models`1112List available models.1314The Models API response can be used to determine which models are available for use in the API. More recently released models are listed first.1516### Query parameters1718- `after_id: optional string`1920  ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.2122- `before_id: optional string`2324  ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.2526- `limit: optional number`2728  Number of items to return per page.2930  Defaults to `20`. Ranges from `1` to `1000`.3132  default: 20, maximum: 1000, minimum: 13334### Headers3536- `"anthropic-beta": optional array of AnthropicBeta`3738  Optional header to specify the beta version(s) you want to use.3940  - `string`4142  - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`4344    - `"message-batches-2024-09-24"`4546    - `"prompt-caching-2024-07-31"`4748    - `"computer-use-2024-10-22"`4950    - `"computer-use-2025-01-24"`5152    - `"pdfs-2024-09-25"`5354    - `"token-counting-2024-11-01"`5556    - `"token-efficient-tools-2025-02-19"`5758    - `"output-128k-2025-02-19"`5960    - `"files-api-2025-04-14"`6162    - `"mcp-client-2025-04-04"`6364    - `"mcp-client-2025-11-20"`6566    - `"dev-full-thinking-2025-05-14"`6768    - `"interleaved-thinking-2025-05-14"`6970    - `"code-execution-2025-05-22"`7172    - `"extended-cache-ttl-2025-04-11"`7374    - `"context-1m-2025-08-07"`7576    - `"context-management-2025-06-27"`7778    - `"model-context-window-exceeded-2025-08-26"`7980    - `"skills-2025-10-02"`8182    - `"fast-mode-2026-02-01"`8384    - `"output-300k-2026-03-24"`8586    - `"user-profiles-2026-03-24"`8788    - `"user-profiles-2026-08-18"`8990    - `"user-profiles-2026-09-04"`9192    - `"advisor-tool-2026-03-01"`9394    - `"managed-agents-2026-04-01"`9596    - `"cache-diagnosis-2026-04-07"`9798    - `"dreaming-2026-04-21"`99100    - `"thinking-token-count-2026-05-13"`101102    - `"server-side-fallback-2026-06-01"`103104    - `"server-side-fallback-2026-07-01"`105106    - `"fallback-credit-2026-06-01"`107108    - `"fallback-credit-2026-07-01"`109110    - `"agent-memory-2026-07-22"`111112    - `"mid-conversation-tool-changes-2026-07-01"`113114    - `"compact-2026-01-12"`115116    - `"computer-use-2025-11-24"`117118    - `"mcp-tunnels-2026-06-22"`119120    - `"structured-outputs-2025-11-13"`121122    - `"task-budgets-2026-03-13"`123124    - `"thinking-display-updates-2026-08-18"`125126    - `"ce-user-management-2026-07-13"`127128    - `"mid-conversation-output-config-2026-07-01"`129130    - `"thinking-binding-controls-2026-08-01"`131132    - `"mid-conversation-system-clear-at-2026-08-21"`133134    - `"compact-2026-09-04"`135136- `"anthropic-workspace-id": optional string`137138### Returns139140- `data: array of ModelInfo`141142  - `type: "model"`143144    Object type.145146    For Models, this is always `"model"`.147148    default: model149150  - `id: string`151152    Unique model identifier.153154  - `capabilities: ModelCapabilities or null`155156    Model capability information.157158    - `batch: CapabilitySupport`159160      Whether the model supports the Batch API.161162      - `supported: boolean`163164        Whether this capability is supported by the model.165166    - `citations: CapabilitySupport`167168      Whether the model supports citation generation.169170    - `code_execution: CapabilitySupport`171172      Whether the model supports code execution tools.173174    - `context_management: ContextManagementCapability`175176      Context management support and available strategies.177178      - `clear_thinking_20251015: CapabilitySupport or null`179180        Indicates whether a capability is supported.181182      - `clear_tool_uses_20250919: CapabilitySupport or null`183184        Indicates whether a capability is supported.185186      - `compact_20260112: CapabilitySupport or null`187188        Indicates whether a capability is supported.189190      - `supported: boolean`191192        Whether this capability is supported by the model.193194    - `effort: EffortCapability`195196      Effort (reasoning_effort) support and available levels.197198      - `high: CapabilitySupport`199200        Whether the model supports high effort level.201202      - `low: CapabilitySupport`203204        Whether the model supports low effort level.205206      - `max: CapabilitySupport`207208        Whether the model supports max effort level.209210      - `medium: CapabilitySupport`211212        Whether the model supports medium effort level.213214      - `supported: boolean`215216        Whether this capability is supported by the model.217218      - `xhigh: CapabilitySupport or null`219220        Indicates whether a capability is supported.221222    - `image_input: CapabilitySupport`223224      Whether the model accepts image content blocks.225226    - `pdf_input: CapabilitySupport`227228      Whether the model accepts PDF content blocks.229230    - `structured_outputs: CapabilitySupport`231232      Whether the model supports structured output / JSON mode / strict tool schemas.233234    - `thinking: ThinkingCapability`235236      Thinking capability and supported type configurations.237238      - `supported: boolean`239240        Whether this capability is supported by the model.241242      - `types: ThinkingTypes`243244        Supported thinking type configurations.245246        - `adaptive: CapabilitySupport`247248          Whether the model supports thinking with type 'adaptive' (auto).249250        - `enabled: CapabilitySupport`251252          Whether the model supports thinking with type 'enabled'.253254  - `created_at: string`255256    RFC 3339 datetime string representing the time at which the model was released. May be set to an epoch value if the release date is unknown.257258    format: date-time259260  - `display_name: string`261262    A human-readable name for the model.263264  - `max_input_tokens: number or null`265266    Maximum input context window size in tokens for this model.267268  - `max_tokens: number or null`269270    Maximum value for the `max_tokens` parameter when using this model.271272- `first_id: string or null`273274  First ID in the `data` list. Can be used as the `before_id` for the previous page.275276- `has_more: boolean`277278  Indicates if there are more results in the requested page direction.279280- `last_id: string or null`281282  Last ID in the `data` list. Can be used as the `after_id` for the next page.283284### Example285286```bash287curl https://api.anthropic.com/v1/models \288    -H 'anthropic-version: 2023-06-01' \289    -H "X-Api-Key: $ANTHROPIC_API_KEY"290```291292#### Response (200)293294```json295{296  "data": [297    {298      "id": "claude-opus-5",299      "capabilities": {300        "batch": {301          "supported": true302        },303        "citations": {304          "supported": true305        },306        "code_execution": {307          "supported": true308        },309        "context_management": {310          "clear_thinking_20251015": {311            "supported": true312          },313          "clear_tool_uses_20250919": {314            "supported": true315          },316          "compact_20260112": {317            "supported": true318          },319          "supported": true320        },321        "effort": {322          "high": {323            "supported": true324          },325          "low": {326            "supported": true327          },328          "max": {329            "supported": true330          },331          "medium": {332            "supported": true333          },334          "supported": true,335          "xhigh": {336            "supported": true337          }338        },339        "image_input": {340          "supported": true341        },342        "pdf_input": {343          "supported": true344        },345        "structured_outputs": {346          "supported": true347        },348        "thinking": {349          "supported": true,350          "types": {351            "adaptive": {352              "supported": true353            },354            "enabled": {355              "supported": true356            }357          }358        }359      },360      "created_at": "2026-07-24T00:00:00Z",361      "display_name": "Claude Opus 5",362      "max_input_tokens": 0,363      "max_tokens": 0,364      "type": "model"365    }366  ],367  "first_id": "first_id",368  "has_more": true,369  "last_id": "last_id"370}371```372373## Get a Model374375**GET** `/v1/models/{model_id}`376377Get a specific model.378379The Models API response can be used to determine information about a specific model or resolve a model alias to a model ID.380381### Path parameters382383- `model_id: string`384385  Model identifier or alias.386387### Headers388389- `"anthropic-beta": optional array of AnthropicBeta`390391  Optional header to specify the beta version(s) you want to use.392393  - `string`394395  - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`396397    - `"message-batches-2024-09-24"`398399    - `"prompt-caching-2024-07-31"`400401    - `"computer-use-2024-10-22"`402403    - `"computer-use-2025-01-24"`404405    - `"pdfs-2024-09-25"`406407    - `"token-counting-2024-11-01"`408409    - `"token-efficient-tools-2025-02-19"`410411    - `"output-128k-2025-02-19"`412413    - `"files-api-2025-04-14"`414415    - `"mcp-client-2025-04-04"`416417    - `"mcp-client-2025-11-20"`418419    - `"dev-full-thinking-2025-05-14"`420421    - `"interleaved-thinking-2025-05-14"`422423    - `"code-execution-2025-05-22"`424425    - `"extended-cache-ttl-2025-04-11"`426427    - `"context-1m-2025-08-07"`428429    - `"context-management-2025-06-27"`430431    - `"model-context-window-exceeded-2025-08-26"`432433    - `"skills-2025-10-02"`434435    - `"fast-mode-2026-02-01"`436437    - `"output-300k-2026-03-24"`438439    - `"user-profiles-2026-03-24"`440441    - `"user-profiles-2026-08-18"`442443    - `"user-profiles-2026-09-04"`444445    - `"advisor-tool-2026-03-01"`446447    - `"managed-agents-2026-04-01"`448449    - `"cache-diagnosis-2026-04-07"`450451    - `"dreaming-2026-04-21"`452453    - `"thinking-token-count-2026-05-13"`454455    - `"server-side-fallback-2026-06-01"`456457    - `"server-side-fallback-2026-07-01"`458459    - `"fallback-credit-2026-06-01"`460461    - `"fallback-credit-2026-07-01"`462463    - `"agent-memory-2026-07-22"`464465    - `"mid-conversation-tool-changes-2026-07-01"`466467    - `"compact-2026-01-12"`468469    - `"computer-use-2025-11-24"`470471    - `"mcp-tunnels-2026-06-22"`472473    - `"structured-outputs-2025-11-13"`474475    - `"task-budgets-2026-03-13"`476477    - `"thinking-display-updates-2026-08-18"`478479    - `"ce-user-management-2026-07-13"`480481    - `"mid-conversation-output-config-2026-07-01"`482483    - `"thinking-binding-controls-2026-08-01"`484485    - `"mid-conversation-system-clear-at-2026-08-21"`486487    - `"compact-2026-09-04"`488489- `"anthropic-workspace-id": optional string`490491### Returns492493- `ModelInfo object`494495  - `type: "model"`496497    Object type.498499    For Models, this is always `"model"`.500501    default: model502503  - `id: string`504505    Unique model identifier.506507  - `capabilities: ModelCapabilities or null`508509    Model capability information.510511    - `batch: CapabilitySupport`512513      Whether the model supports the Batch API.514515      - `supported: boolean`516517        Whether this capability is supported by the model.518519    - `citations: CapabilitySupport`520521      Whether the model supports citation generation.522523    - `code_execution: CapabilitySupport`524525      Whether the model supports code execution tools.526527    - `context_management: ContextManagementCapability`528529      Context management support and available strategies.530531      - `clear_thinking_20251015: CapabilitySupport or null`532533        Indicates whether a capability is supported.534535      - `clear_tool_uses_20250919: CapabilitySupport or null`536537        Indicates whether a capability is supported.538539      - `compact_20260112: CapabilitySupport or null`540541        Indicates whether a capability is supported.542543      - `supported: boolean`544545        Whether this capability is supported by the model.546547    - `effort: EffortCapability`548549      Effort (reasoning_effort) support and available levels.550551      - `high: CapabilitySupport`552553        Whether the model supports high effort level.554555      - `low: CapabilitySupport`556557        Whether the model supports low effort level.558559      - `max: CapabilitySupport`560561        Whether the model supports max effort level.562563      - `medium: CapabilitySupport`564565        Whether the model supports medium effort level.566567      - `supported: boolean`568569        Whether this capability is supported by the model.570571      - `xhigh: CapabilitySupport or null`572573        Indicates whether a capability is supported.574575    - `image_input: CapabilitySupport`576577      Whether the model accepts image content blocks.578579    - `pdf_input: CapabilitySupport`580581      Whether the model accepts PDF content blocks.582583    - `structured_outputs: CapabilitySupport`584585      Whether the model supports structured output / JSON mode / strict tool schemas.586587    - `thinking: ThinkingCapability`588589      Thinking capability and supported type configurations.590591      - `supported: boolean`592593        Whether this capability is supported by the model.594595      - `types: ThinkingTypes`596597        Supported thinking type configurations.598599        - `adaptive: CapabilitySupport`600601          Whether the model supports thinking with type 'adaptive' (auto).602603        - `enabled: CapabilitySupport`604605          Whether the model supports thinking with type 'enabled'.606607  - `created_at: string`608609    RFC 3339 datetime string representing the time at which the model was released. May be set to an epoch value if the release date is unknown.610611    format: date-time612613  - `display_name: string`614615    A human-readable name for the model.616617  - `max_input_tokens: number or null`618619    Maximum input context window size in tokens for this model.620621  - `max_tokens: number or null`622623    Maximum value for the `max_tokens` parameter when using this model.624625### Example626627```bash628curl https://api.anthropic.com/v1/models/$MODEL_ID \629    -H 'anthropic-version: 2023-06-01' \630    -H "X-Api-Key: $ANTHROPIC_API_KEY"631```632633#### Response (200)634635```json636{637  "id": "claude-opus-5",638  "capabilities": {639    "batch": {640      "supported": true641    },642    "citations": {643      "supported": true644    },645    "code_execution": {646      "supported": true647    },648    "context_management": {649      "clear_thinking_20251015": {650        "supported": true651      },652      "clear_tool_uses_20250919": {653        "supported": true654      },655      "compact_20260112": {656        "supported": true657      },658      "supported": true659    },660    "effort": {661      "high": {662        "supported": true663      },664      "low": {665        "supported": true666      },667      "max": {668        "supported": true669      },670      "medium": {671        "supported": true672      },673      "supported": true,674      "xhigh": {675        "supported": true676      }677    },678    "image_input": {679      "supported": true680    },681    "pdf_input": {682      "supported": true683    },684    "structured_outputs": {685      "supported": true686    },687    "thinking": {688      "supported": true,689      "types": {690        "adaptive": {691          "supported": true692        },693        "enabled": {694          "supported": true695        }696      }697    }698  },699  "created_at": "2026-07-24T00:00:00Z",700  "display_name": "Claude Opus 5",701  "max_input_tokens": 0,702  "max_tokens": 0,703  "type": "model"704}705```706707## Domain types708709### Capability Support710711- `CapabilitySupport object`712713  Indicates whether a capability is supported.714715  - `supported: boolean`716717    Whether this capability is supported by the model.718719### Context Management Capability720721- `ContextManagementCapability object`722723  Context management capability details.724725  - `clear_thinking_20251015: CapabilitySupport or null`726727    Indicates whether a capability is supported.728729    - `supported: boolean`730731      Whether this capability is supported by the model.732733  - `clear_tool_uses_20250919: CapabilitySupport or null`734735    Indicates whether a capability is supported.736737  - `compact_20260112: CapabilitySupport or null`738739    Indicates whether a capability is supported.740741  - `supported: boolean`742743    Whether this capability is supported by the model.744745### Effort Capability746747- `EffortCapability object`748749  Effort (reasoning_effort) capability details.750751  - `high: CapabilitySupport`752753    Whether the model supports high effort level.754755    - `supported: boolean`756757      Whether this capability is supported by the model.758759  - `low: CapabilitySupport`760761    Whether the model supports low effort level.762763  - `max: CapabilitySupport`764765    Whether the model supports max effort level.766767  - `medium: CapabilitySupport`768769    Whether the model supports medium effort level.770771  - `supported: boolean`772773    Whether this capability is supported by the model.774775  - `xhigh: CapabilitySupport or null`776777    Indicates whether a capability is supported.778779### Model Capabilities780781- `ModelCapabilities object`782783  Model capability information.784785  - `batch: CapabilitySupport`786787    Whether the model supports the Batch API.788789    - `supported: boolean`790791      Whether this capability is supported by the model.792793  - `citations: CapabilitySupport`794795    Whether the model supports citation generation.796797  - `code_execution: CapabilitySupport`798799    Whether the model supports code execution tools.800801  - `context_management: ContextManagementCapability`802803    Context management support and available strategies.804805    - `clear_thinking_20251015: CapabilitySupport or null`806807      Indicates whether a capability is supported.808809    - `clear_tool_uses_20250919: CapabilitySupport or null`810811      Indicates whether a capability is supported.812813    - `compact_20260112: CapabilitySupport or null`814815      Indicates whether a capability is supported.816817    - `supported: boolean`818819      Whether this capability is supported by the model.820821  - `effort: EffortCapability`822823    Effort (reasoning_effort) support and available levels.824825    - `high: CapabilitySupport`826827      Whether the model supports high effort level.828829    - `low: CapabilitySupport`830831      Whether the model supports low effort level.832833    - `max: CapabilitySupport`834835      Whether the model supports max effort level.836837    - `medium: CapabilitySupport`838839      Whether the model supports medium effort level.840841    - `supported: boolean`842843      Whether this capability is supported by the model.844845    - `xhigh: CapabilitySupport or null`846847      Indicates whether a capability is supported.848849  - `image_input: CapabilitySupport`850851    Whether the model accepts image content blocks.852853  - `pdf_input: CapabilitySupport`854855    Whether the model accepts PDF content blocks.856857  - `structured_outputs: CapabilitySupport`858859    Whether the model supports structured output / JSON mode / strict tool schemas.860861  - `thinking: ThinkingCapability`862863    Thinking capability and supported type configurations.864865    - `supported: boolean`866867      Whether this capability is supported by the model.868869    - `types: ThinkingTypes`870871      Supported thinking type configurations.872873      - `adaptive: CapabilitySupport`874875        Whether the model supports thinking with type 'adaptive' (auto).876877      - `enabled: CapabilitySupport`878879        Whether the model supports thinking with type 'enabled'.880881### Model Info882883- `ModelInfo object`884885  - `type: "model"`886887    Object type.888889    For Models, this is always `"model"`.890891    default: model892893  - `id: string`894895    Unique model identifier.896897  - `capabilities: ModelCapabilities or null`898899    Model capability information.900901    - `batch: CapabilitySupport`902903      Whether the model supports the Batch API.904905      - `supported: boolean`906907        Whether this capability is supported by the model.908909    - `citations: CapabilitySupport`910911      Whether the model supports citation generation.912913    - `code_execution: CapabilitySupport`914915      Whether the model supports code execution tools.916917    - `context_management: ContextManagementCapability`918919      Context management support and available strategies.920921      - `clear_thinking_20251015: CapabilitySupport or null`922923        Indicates whether a capability is supported.924925      - `clear_tool_uses_20250919: CapabilitySupport or null`926927        Indicates whether a capability is supported.928929      - `compact_20260112: CapabilitySupport or null`930931        Indicates whether a capability is supported.932933      - `supported: boolean`934935        Whether this capability is supported by the model.936937    - `effort: EffortCapability`938939      Effort (reasoning_effort) support and available levels.940941      - `high: CapabilitySupport`942943        Whether the model supports high effort level.944945      - `low: CapabilitySupport`946947        Whether the model supports low effort level.948949      - `max: CapabilitySupport`950951        Whether the model supports max effort level.952953      - `medium: CapabilitySupport`954955        Whether the model supports medium effort level.956957      - `supported: boolean`958959        Whether this capability is supported by the model.960961      - `xhigh: CapabilitySupport or null`962963        Indicates whether a capability is supported.964965    - `image_input: CapabilitySupport`966967      Whether the model accepts image content blocks.968969    - `pdf_input: CapabilitySupport`970971      Whether the model accepts PDF content blocks.972973    - `structured_outputs: CapabilitySupport`974975      Whether the model supports structured output / JSON mode / strict tool schemas.976977    - `thinking: ThinkingCapability`978979      Thinking capability and supported type configurations.980981      - `supported: boolean`982983        Whether this capability is supported by the model.984985      - `types: ThinkingTypes`986987        Supported thinking type configurations.988989        - `adaptive: CapabilitySupport`990991          Whether the model supports thinking with type 'adaptive' (auto).992993        - `enabled: CapabilitySupport`994995          Whether the model supports thinking with type 'enabled'.996997  - `created_at: string`998999    RFC 3339 datetime string representing the time at which the model was released. May be set to an epoch value if the release date is unknown.10001001    format: date-time10021003  - `display_name: string`10041005    A human-readable name for the model.10061007  - `max_input_tokens: number or null`10081009    Maximum input context window size in tokens for this model.10101011  - `max_tokens: number or null`10121013    Maximum value for the `max_tokens` parameter when using this model.10141015### Thinking Capability10161017- `ThinkingCapability object`10181019  Thinking capability details.10201021  - `supported: boolean`10221023    Whether this capability is supported by the model.10241025  - `types: ThinkingTypes`10261027    Supported thinking type configurations.10281029    - `adaptive: CapabilitySupport`10301031      Whether the model supports thinking with type 'adaptive' (auto).10321033      - `supported: boolean`10341035        Whether this capability is supported by the model.10361037    - `enabled: CapabilitySupport`10381039      Whether the model supports thinking with type 'enabled'.10401041### Thinking Types10421043- `ThinkingTypes object`10441045  Supported thinking type configurations.10461047  - `adaptive: CapabilitySupport`10481049    Whether the model supports thinking with type 'adaptive' (auto).10501051    - `supported: boolean`10521053      Whether this capability is supported by the model.10541055  - `enabled: CapabilitySupport`10561057    Whether the model supports thinking with type 'enabled'.1058
Files main
Menu

Theme