APIPASS API Marketplace Claude Code API

The Claude Code API from APIPASS API Marketplace — 10 operation(s) for claude code.

Operations 10

GET /v1/models List Models #
POST /claude/v1/messages Create Message #
POST /api/v1/messages Create Message #
POST /v1/messages Create Message #
POST /claude/v1/messages/count_tokens Count Tokens #
POST /v1/messages/count_tokens Count Tokens #
GET /claude/v1/models List Models #
GET /api/v1/models List Models #
GET /claude/v1/me Get User Info #
GET /v1/me Get User Info #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/apipass:apipass-claude-code-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

apipass-claude-code-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ApiPass Platform Claude Code API
  version: 1.0.0
tags:
- name: Claude Code
paths:
  /v1/models:
    get:
      tags:
      - Claude Code
      summary: List Models
      description: 获取模型列表
      operationId: list_models_v1_models_get
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Bearer YOUR_API_KEY
          title: Authorization
        description: Bearer YOUR_API_KEY
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: anthropic-beta
        in: header
        required: false
        schema:
          type: string
          title: Anthropic-Beta
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /claude/v1/messages:
    post:
      tags:
      - Claude Code
      summary: Create Message
      description: 'Claude Code 主消息端点


        完整流程:

        1. 验证 API Key

        2. 验证 Claude Code 客户端 (可选)

        3. 选择可用的 Claude 账户

        4. 获取并发槽位

        5. 转发请求到 Anthropic API

        6. 处理 SSE 流式响应

        7. 捕获 usage 并计费'
      operationId: create_message_claude_v1_messages_post
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Bearer YOUR_API_KEY
          title: Authorization
        description: Bearer YOUR_API_KEY
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: User-Agent
        in: header
        required: false
        schema:
          type: string
          title: User-Agent
      - name: anthropic-beta
        in: header
        required: false
        schema:
          type: string
          title: Anthropic-Beta
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClaudeMessagesRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/messages:
    post:
      tags:
      - Claude Code
      summary: Create Message
      description: 'Claude Code 主消息端点


        完整流程:

        1. 验证 API Key

        2. 验证 Claude Code 客户端 (可选)

        3. 选择可用的 Claude 账户

        4. 获取并发槽位

        5. 转发请求到 Anthropic API

        6. 处理 SSE 流式响应

        7. 捕获 usage 并计费'
      operationId: create_message_api_v1_messages_post
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Bearer YOUR_API_KEY
          title: Authorization
        description: Bearer YOUR_API_KEY
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: User-Agent
        in: header
        required: false
        schema:
          type: string
          title: User-Agent
      - name: anthropic-beta
        in: header
        required: false
        schema:
          type: string
          title: Anthropic-Beta
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClaudeMessagesRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/messages:
    post:
      tags:
      - Claude Code
      summary: Create Message
      description: 'Claude Code 主消息端点


        完整流程:

        1. 验证 API Key

        2. 验证 Claude Code 客户端 (可选)

        3. 选择可用的 Claude 账户

        4. 获取并发槽位

        5. 转发请求到 Anthropic API

        6. 处理 SSE 流式响应

        7. 捕获 usage 并计费'
      operationId: create_message_v1_messages_post
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Bearer YOUR_API_KEY
          title: Authorization
        description: Bearer YOUR_API_KEY
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: User-Agent
        in: header
        required: false
        schema:
          type: string
          title: User-Agent
      - name: anthropic-beta
        in: header
        required: false
        schema:
          type: string
          title: Anthropic-Beta
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClaudeMessagesRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /claude/v1/messages/count_tokens:
    post:
      tags:
      - Claude Code
      summary: Count Tokens
      description: Token 计数端点
      operationId: count_tokens_claude_v1_messages_count_tokens_post
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Bearer YOUR_API_KEY
          title: Authorization
        description: Bearer YOUR_API_KEY
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: anthropic-beta
        in: header
        required: false
        schema:
          type: string
          title: Anthropic-Beta
      - name: User-Agent
        in: header
        required: false
        schema:
          type: string
          title: User-Agent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CountTokensRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/messages/count_tokens:
    post:
      tags:
      - Claude Code
      summary: Count Tokens
      description: Token 计数端点
      operationId: count_tokens_v1_messages_count_tokens_post
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Bearer YOUR_API_KEY
          title: Authorization
        description: Bearer YOUR_API_KEY
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: anthropic-beta
        in: header
        required: false
        schema:
          type: string
          title: Anthropic-Beta
      - name: User-Agent
        in: header
        required: false
        schema:
          type: string
          title: User-Agent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CountTokensRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /claude/v1/models:
    get:
      tags:
      - Claude Code
      summary: List Models
      description: 获取模型列表
      operationId: list_models_claude_v1_models_get
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Bearer YOUR_API_KEY
          title: Authorization
        description: Bearer YOUR_API_KEY
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: anthropic-beta
        in: header
        required: false
        schema:
          type: string
          title: Anthropic-Beta
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/models:
    get:
      tags:
      - Claude Code
      summary: List Models
      description: 获取模型列表
      operationId: list_models_api_v1_models_get
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Bearer YOUR_API_KEY
          title: Authorization
        description: Bearer YOUR_API_KEY
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      - name: anthropic-beta
        in: header
        required: false
        schema:
          type: string
          title: Anthropic-Beta
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /claude/v1/me:
    get:
      tags:
      - Claude Code
      summary: Get User Info
      description: 获取用户信息 (Claude Code CLI 需要)
      operationId: get_user_info_claude_v1_me_get
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Bearer YOUR_API_KEY
          title: Authorization
        description: Bearer YOUR_API_KEY
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/me:
    get:
      tags:
      - Claude Code
      summary: Get User Info
      description: 获取用户信息 (Claude Code CLI 需要)
      operationId: get_user_info_v1_me_get
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Bearer YOUR_API_KEY
          title: Authorization
        description: Bearer YOUR_API_KEY
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    CountTokensRequest:
      properties:
        model:
          type: string
          title: Model
        messages:
          items:
            $ref: '#/components/schemas/ClaudeMessage'
          type: array
          title: Messages
        system:
          anyOf:
          - items: {}
            type: array
          - type: 'null'
          title: System
        tools:
          anyOf:
          - items: {}
            type: array
          - type: 'null'
          title: Tools
      additionalProperties: true
      type: object
      required:
      - model
      - messages
      title: CountTokensRequest
      description: Token 计数请求
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ClaudeMessagesRequest:
      properties:
        model:
          type: string
          title: Model
          description: 模型名称
        messages:
          items:
            $ref: '#/components/schemas/ClaudeMessage'
          type: array
          title: Messages
          description: 消息列表
        max_tokens:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Tokens
          description: 最大输出 tokens (旧参数名)
        max_output_tokens:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Output Tokens
          description: 最大输出 tokens (新参数名)
        system:
          anyOf:
          - {}
          - type: 'null'
          title: System
          description: 系统提示
        stream:
          type: boolean
          title: Stream
          description: 是否流式返回
          default: true
        metadata:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Metadata
          description: 元数据
        tools:
          anyOf:
          - items: {}
            type: array
          - type: 'null'
          title: Tools
          description: 工具定义
        tool_choice:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Tool Choice
          description: 工具选择
        temperature:
          anyOf:
          - type: number
          - type: 'null'
          title: Temperature
          description: 温度参数
        top_p:
          anyOf:
          - type: number
          - type: 'null'
          title: Top P
          description: 核采样参数
        top_k:
          anyOf:
          - type: integer
          - type: 'null'
          title: Top K
          description: Top-K 采样
        stop_sequences:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Stop Sequences
          description: 停止序列
        thinking:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Thinking
          description: 扩展思考配置
        thinkingFlag:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Thinkingflag
          description: ApiPass 兼容字段:启用扩展思考
      additionalProperties: true
      type: object
      required:
      - model
      - messages
      title: ClaudeMessagesRequest
      description: Claude Messages API 请求
    ClaudeMessage:
      properties:
        role:
          type: string
          title: Role
        content:
          title: Content
      additionalProperties: true
      type: object
      required:
      - role
      - content
      title: ClaudeMessage
      description: Claude 消息格式
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer