Anthropic Claude Models API

List and inspect available Claude models.

OpenAPI Specification

anthropic-claude-models-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Anthropic Claude Messages Message Batches Models API
  version: '2023-06-01'
  description: 'REST API for sending messages to Claude models with support for streaming,

    tool use, vision, system prompts, prompt caching, and extended thinking.

    Authentication uses an x-api-key header along with an anthropic-version header.

    '
  contact:
    name: Anthropic Support
    url: https://support.anthropic.com
  license:
    name: Anthropic Commercial Terms of Service
    url: https://www.anthropic.com/legal/commercial-terms
servers:
- url: https://api.anthropic.com
  description: Anthropic API production
security:
- ApiKeyAuth: []
tags:
- name: Models
  description: List and inspect available Claude models.
paths:
  /v1/models:
    get:
      tags:
      - Models
      summary: List available models
      operationId: listModels
      parameters:
      - $ref: '#/components/parameters/AnthropicVersion'
      - name: before_id
        in: query
        schema:
          type: string
      - name: after_id
        in: query
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 1000
          default: 20
      responses:
        '200':
          description: A page of Model objects.
  /v1/models/{model_id}:
    get:
      tags:
      - Models
      summary: Get a model
      operationId: getModel
      parameters:
      - $ref: '#/components/parameters/AnthropicVersion'
      - name: model_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A Model object.
components:
  parameters:
    AnthropicVersion:
      name: anthropic-version
      in: header
      required: true
      description: API version, e.g. `2023-06-01`.
      schema:
        type: string
        default: '2023-06-01'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Anthropic API key. Send as the `x-api-key` header on every request.