SPB Git

Repository Public

retrieve.md 7.7 KB 366 lines markdown

1---2title: Get a Model3url: https://platform.claude.com/docs/en/api/beta/models/retrieve4---56# Get a Model78**GET** `/v1/models/{model_id}`910Get a specific model.1112The Models API response can be used to determine information about a specific model or resolve a model alias to a model ID.1314## Path parameters1516- `model_id: string`1718  Model identifier or alias.1920## Headers2122- `"anthropic-beta": optional array of AnthropicBeta`2324  Optional header to specify the beta version(s) you want to use.2526  - `string`2728  - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`2930    - `"message-batches-2024-09-24"`3132    - `"prompt-caching-2024-07-31"`3334    - `"computer-use-2024-10-22"`3536    - `"computer-use-2025-01-24"`3738    - `"pdfs-2024-09-25"`3940    - `"token-counting-2024-11-01"`4142    - `"token-efficient-tools-2025-02-19"`4344    - `"output-128k-2025-02-19"`4546    - `"files-api-2025-04-14"`4748    - `"mcp-client-2025-04-04"`4950    - `"mcp-client-2025-11-20"`5152    - `"dev-full-thinking-2025-05-14"`5354    - `"interleaved-thinking-2025-05-14"`5556    - `"code-execution-2025-05-22"`5758    - `"extended-cache-ttl-2025-04-11"`5960    - `"context-1m-2025-08-07"`6162    - `"context-management-2025-06-27"`6364    - `"model-context-window-exceeded-2025-08-26"`6566    - `"skills-2025-10-02"`6768    - `"fast-mode-2026-02-01"`6970    - `"output-300k-2026-03-24"`7172    - `"user-profiles-2026-03-24"`7374    - `"user-profiles-2026-08-18"`7576    - `"user-profiles-2026-09-04"`7778    - `"advisor-tool-2026-03-01"`7980    - `"managed-agents-2026-04-01"`8182    - `"cache-diagnosis-2026-04-07"`8384    - `"dreaming-2026-04-21"`8586    - `"thinking-token-count-2026-05-13"`8788    - `"server-side-fallback-2026-06-01"`8990    - `"server-side-fallback-2026-07-01"`9192    - `"fallback-credit-2026-06-01"`9394    - `"fallback-credit-2026-07-01"`9596    - `"agent-memory-2026-07-22"`9798    - `"mid-conversation-tool-changes-2026-07-01"`99100    - `"compact-2026-01-12"`101102    - `"computer-use-2025-11-24"`103104    - `"mcp-tunnels-2026-06-22"`105106    - `"structured-outputs-2025-11-13"`107108    - `"task-budgets-2026-03-13"`109110    - `"thinking-display-updates-2026-08-18"`111112    - `"ce-user-management-2026-07-13"`113114    - `"mid-conversation-output-config-2026-07-01"`115116    - `"thinking-binding-controls-2026-08-01"`117118    - `"mid-conversation-system-clear-at-2026-08-21"`119120    - `"compact-2026-09-04"`121122- `"anthropic-workspace-id": optional string`123124## Returns125126- `BetaModelInfo object`127128  - `type: "model"`129130    Object type.131132    For Models, this is always `"model"`.133134    default: model135136  - `id: string`137138    Unique model identifier.139140  - `allowed_fallback_models: array of string or null`141142    Model IDs this model accepts as `fallbacks[i].model` on the Messages API. An empty list means the `fallbacks` parameter is not supported for this model as primary.143144  - `capabilities: BetaModelCapabilities or null`145146    Model capability information.147148    - `batch: BetaCapabilitySupport`149150      Whether the model supports the Batch API.151152      - `supported: boolean`153154        Whether this capability is supported by the model.155156    - `citations: BetaCapabilitySupport`157158      Whether the model supports citation generation.159160    - `code_execution: BetaCapabilitySupport`161162      Whether the model supports code execution tools.163164    - `compaction: BetaCompactionCapability or null`165166      Compaction capability details: whether the model accepts the top-level167      `compaction` request parameter, with one entry per supported168      `compaction.type` value.169170      - `summarize: BetaCapabilitySupport`171172        Whether the summarize compaction type is supported.173174      - `supported: boolean`175176        Whether this capability is supported by the model.177178    - `context_management: BetaContextManagementCapability`179180      Context management support and available strategies.181182      - `clear_thinking_20251015: BetaCapabilitySupport or null`183184        Indicates whether a capability is supported.185186      - `clear_tool_uses_20250919: BetaCapabilitySupport or null`187188        Indicates whether a capability is supported.189190      - `compact_20260112: BetaCapabilitySupport or null`191192        Indicates whether a capability is supported.193194      - `supported: boolean`195196        Whether this capability is supported by the model.197198    - `effort: BetaEffortCapability`199200      Effort (reasoning_effort) support and available levels.201202      - `high: BetaCapabilitySupport`203204        Whether the model supports high effort level.205206      - `low: BetaCapabilitySupport`207208        Whether the model supports low effort level.209210      - `max: BetaCapabilitySupport`211212        Whether the model supports max effort level.213214      - `medium: BetaCapabilitySupport`215216        Whether the model supports medium effort level.217218      - `supported: boolean`219220        Whether this capability is supported by the model.221222      - `xhigh: BetaCapabilitySupport or null`223224        Indicates whether a capability is supported.225226    - `image_input: BetaCapabilitySupport`227228      Whether the model accepts image content blocks.229230    - `pdf_input: BetaCapabilitySupport`231232      Whether the model accepts PDF content blocks.233234    - `structured_outputs: BetaCapabilitySupport`235236      Whether the model supports structured output / JSON mode / strict tool schemas.237238    - `thinking: BetaThinkingCapability`239240      Thinking capability and supported type configurations.241242      - `supported: boolean`243244        Whether this capability is supported by the model.245246      - `types: BetaThinkingTypes`247248        Supported thinking type configurations.249250        - `adaptive: BetaCapabilitySupport`251252          Whether the model supports thinking with type 'adaptive' (auto).253254        - `enabled: BetaCapabilitySupport`255256          Whether the model supports thinking with type 'enabled'.257258  - `created_at: string`259260    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.261262    format: date-time263264  - `display_name: string`265266    A human-readable name for the model.267268  - `max_input_tokens: number or null`269270    Maximum input context window size in tokens for this model.271272  - `max_tokens: number or null`273274    Maximum value for the `max_tokens` parameter when using this model.275276## Example277278```bash279curl https://api.anthropic.com/v1/models/$MODEL_ID \280    -H 'anthropic-version: 2023-06-01' \281    -H "X-Api-Key: $ANTHROPIC_API_KEY"282```283284### Response (200)285286```json287{288  "id": "claude-opus-5",289  "allowed_fallback_models": [290    "string"291  ],292  "capabilities": {293    "batch": {294      "supported": true295    },296    "citations": {297      "supported": true298    },299    "code_execution": {300      "supported": true301    },302    "compaction": {303      "summarize": {304        "supported": true305      },306      "supported": true307    },308    "context_management": {309      "clear_thinking_20251015": {310        "supported": true311      },312      "clear_tool_uses_20250919": {313        "supported": true314      },315      "compact_20260112": {316        "supported": true317      },318      "supported": true319    },320    "effort": {321      "high": {322        "supported": true323      },324      "low": {325        "supported": true326      },327      "max": {328        "supported": true329      },330      "medium": {331        "supported": true332      },333      "supported": true,334      "xhigh": {335        "supported": true336      }337    },338    "image_input": {339      "supported": true340    },341    "pdf_input": {342      "supported": true343    },344    "structured_outputs": {345      "supported": true346    },347    "thinking": {348      "supported": true,349      "types": {350        "adaptive": {351          "supported": true352        },353        "enabled": {354          "supported": true355        }356      }357    }358  },359  "created_at": "2026-07-24T00:00:00Z",360  "display_name": "Claude Opus 5",361  "max_input_tokens": 0,362  "max_tokens": 0,363  "type": "model"364}365```366
Files main
Menu

Theme