Claude Platform Docs

模型

列出模型
client.Beta.Models.List(ctx, params) (*Page[BetaModelInfo], error)
GET/v1/models

列出可用模型。

获取模型
client.Beta.Models.Get(ctx, modelID, query) (*BetaModelInfo, error)
GET/v1/models/{model_id}

获取特定模型。

Models
type BetaCapabilitySupport struct { Supported }

Indicates whether a capability is supported.

Supported bool

Whether this capability is supported by the model.

type BetaCompactionCapability struct { Summarize; Supported }

Compaction capability details: whether the model accepts the top-level compaction request parameter, with one entry per supported compaction.type value.

Whether the summarize compaction type is supported.

Supported bool

Whether this capability is supported by the model.

Supported bool

Whether this capability is supported by the model.

type BetaContextManagementCapability struct { ClearThinking20251015; ClearToolUses20250919; Compact20260112; Supported }

Context management capability details.

ClearThinking20251015 BetaCapabilitySupport

Whether the clear_thinking_20251015 strategy is supported.

Supported bool

Whether this capability is supported by the model.

ClearToolUses20250919 BetaCapabilitySupport

Whether the clear_tool_uses_20250919 strategy is supported.

Supported bool

Whether this capability is supported by the model.

Compact20260112 BetaCapabilitySupport

Whether the compact_20260112 strategy is supported.

Supported bool

Whether this capability is supported by the model.

Supported bool

Whether this capability is supported by the model.

type BetaEffortCapability struct { High; Low; Max; /* 3 more */ }

Effort (reasoning_effort) capability details.

Whether the model supports high effort level.

Supported bool

Whether this capability is supported by the model.

Whether the model supports low effort level.

Supported bool

Whether this capability is supported by the model.

Whether the model supports max effort level.

Supported bool

Whether this capability is supported by the model.

Whether the model supports medium effort level.

Supported bool

Whether this capability is supported by the model.

Supported bool

Whether this capability is supported by the model.

Whether the model supports xhigh effort level.

Supported bool

Whether this capability is supported by the model.

type BetaModelCapabilities struct { Batch; Citations; CodeExecution; /* 8 more */ }

Model capability information.

type BetaModelInfo struct { Type: "model"; ID; AllowedFallbackModels; /* 9 more */ }
type BetaModelLine string

A Claude model line, such as opus or sonnet. More lines may be added as new values.

One of the following:
const BetaModelLineHaiku BetaModelLine = "haiku"
const BetaModelLineSonnet BetaModelLine = "sonnet"
const BetaModelLineOpus BetaModelLine = "opus"
const BetaModelLineFable BetaModelLine = "fable"
const BetaModelLineMythos BetaModelLine = "mythos"
type BetaServerToolsCapability struct { CodeExecution; Supported; WebSearch }

Web search and code execution tool support, with one entry per tool.

CodeExecution BetaCapabilitySupport

Whether the model supports the code execution tool: true when the model supports at least one version of the tool, not necessarily every version.

Supported bool

Whether this capability is supported by the model.

Supported bool

Whether this capability is supported by the model.

type BetaThinkingCapability struct { Supported; Types }

Thinking capability details.

Supported bool

Whether this capability is supported by the model.

Supported thinking type configurations.

Whether the model accepts thinking with type 'adaptive' (the model decides whether and how much to think).

Supported bool

Whether this capability is supported by the model.

Whether the model accepts thinking with type 'disabled' (thinking turned off). False exactly when a request that sends it gets a 400 from this model. True on a model that does not support thinking.

Supported bool

Whether this capability is supported by the model.

Whether the model accepts thinking with type 'enabled' (extended thinking with a caller-set budget_tokens).

Supported bool

Whether this capability is supported by the model.

type BetaThinkingTypes struct { Adaptive; Disabled; Enabled }

Which thinking.type values the model accepts on requests. Read each key on its own: for example, enabled can be false while disabled is true.

Whether the model accepts thinking with type 'adaptive' (the model decides whether and how much to think).

Supported bool

Whether this capability is supported by the model.

Whether the model accepts thinking with type 'disabled' (thinking turned off). False exactly when a request that sends it gets a 400 from this model. True on a model that does not support thinking.

Supported bool

Whether this capability is supported by the model.

Whether the model accepts thinking with type 'enabled' (extended thinking with a caller-set budget_tokens).

Supported bool

Whether this capability is supported by the model.