Claude Platform Docs

Obtener un modelo

$client->models->retrieve(string modelID, ?string workspaceID): ModelInfo
GET/v1/models/{model_id}

Obtiene un modelo específico.

La respuesta de la API de Models puede usarse para determinar información sobre un modelo específico o resolver un alias de modelo a un ID de modelo.

Parameters
modelID: string⁠Path parameter

Model identifier or alias.

workspaceID?: optional string⁠Header parameter

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

Returns
class ModelInfo { $type = 'model'; $id; $capabilities; /* 8 more */ }
"model" type

Object type.

For Models, this is always "model".

string id

Unique model identifier.

?ModelCapabilities capabilities

Object mapping capability names to their support details. Keys are always present for all known capabilities.

\Datetime createdAt

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.

?\Datetime deprecatedAt

RFC 3339 datetime string representing the time of the model's most recent deprecation. Populated for deprecated and retired models; null while the model is active.

string displayName

A human-readable name for the model.

Lifecycle lifecycle

The model's current lifecycle stage.

  • active: The model is available for use, open to new adopters, and not scheduled for retirement.
  • deprecated: The model remains callable for organizations with existing access, but is headed for retirement and closed to new adopters.
  • retired: The model is no longer available for use; inference requests naming it fail. It remains in the catalogue as the historical record of its retirement.
?ModelLine line

The model line this model belongs to, such as opus for both Claude Opus 4.5 and Claude Opus 4.6. More lines may be added. null when the model belongs to no line; do not infer a line from the id.

?int maxInputTokens

Maximum input context window size in tokens for this model.

?int maxTokens

Maximum value for the max_tokens parameter when using this model.

?\Datetime retiresAt

RFC 3339 datetime string representing the model's currently scheduled retirement date. The schedule can be revised until retirement occurs; null while the model is active or while no retirement is scheduled. A past date on a deprecated model means retirement is overdue, not that it has occurred: lifecycle is the retirement signal.

Obtener un modelo
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Anthropic\Client;

$client = new Client(apiKey: 'my-anthropic-api-key');

$modelInfo = $client->models->retrieve(
  'model_id', workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy'
);

var_dump($modelInfo);
Returns Examples
Response 200
{
  "id": "claude-opus-5-5",
  "capabilities": {
    "batch": {
      "supported": true
    },
    "citations": {
      "supported": true
    },
    "code_execution": {
      "supported": true
    },
    "context_management": {
      "clear_thinking_20251015": {
        "supported": true
      },
      "clear_tool_uses_20250919": {
        "supported": true
      },
      "compact_20260112": {
        "supported": true
      },
      "supported": true
    },
    "effort": {
      "high": {
        "supported": true
      },
      "low": {
        "supported": true
      },
      "max": {
        "supported": true
      },
      "medium": {
        "supported": true
      },
      "supported": true,
      "xhigh": {
        "supported": true
      }
    },
    "image_input": {
      "supported": true
    },
    "pdf_input": {
      "supported": true
    },
    "server_tools": {
      "code_execution": {
        "supported": true
      },
      "supported": true,
      "web_search": {
        "supported": true
      }
    },
    "structured_outputs": {
      "supported": true
    },
    "thinking": {
      "supported": true,
      "types": {
        "adaptive": {
          "supported": true
        },
        "between_tools": {
          "supported": true
        },
        "disabled": {
          "supported": true
        },
        "enabled": {
          "supported": true
        }
      }
    }
  },
  "created_at": "2026-09-21T00:00:00Z",
  "deprecated_at": "2019-12-27T18:11:19.117Z",
  "display_name": "Claude Opus 5.5",
  "lifecycle": "active",
  "line": "opus",
  "max_input_tokens": 0,
  "max_tokens": 0,
  "retires_at": "2019-12-27T18:11:19.117Z",
  "type": "model"
}