topxea-com Anthropic Compatible API

The Messages API for every text model except Jev, with x-api-key or Authorization: Bearer.

Operations 1

POST /v1/messages Messages #

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/topxea-com:topxea-com-anthropic-compatible-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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

topxea-com-anthropic-compatible-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TopxAI Anthropic Compatible API
  version: '2026-10-25'
  summary: One OpenAI- and Anthropic-compatible endpoint for Claude, GPT, Grok, GLM, Kimi, DeepSeek and Jev.
  description: 'TopxAI relays requests to the model providers at fixed USD prices on prepaid credit. The request body is forwarded unchanged and the response is returned unchanged, except where a request in another format has to be converted for the model (for example /v1/messages to a model other than Claude), on /v1/responses, where the echoes of the request and members the upstream adds are rewritten, and on /v1/chat/completions, where provider_specific_fields, a member some upstream capacity adds, is removed; parameters not listed here pass through to the provider. A request without a system prompt that reaches the GPT provider''s Responses API (gpt-6.1-sol on every endpoint, gpt-6-astra on /v1/responses) is sent the instructions "You are a helpful assistant.", so the provider does not add its own longer prompt; a request with its own system prompt or instructions is forwarded as sent. Base URL for OpenAI-style SDKs: https://ai.topxea.com/v1. Base URL for the Anthropic SDK: https://ai.topxea.com. Prompts, completions and files are relayed in memory and never stored. Prices: https://ai.topxea.com/pricing and https://ai.topxea.com/api/pricing.'
  termsOfService: https://ai.topxea.com/user-agreement
  contact:
    name: TopxAI support
    email: support@topxea.com
    url: https://ai.topxea.com/docs
  x-logo:
    url: https://ai.topxea.com/favicon.svg
  license:
    name: Terms of use
    url: https://ai.topxea.com/user-agreement
servers:
- url: https://ai.topxea.com
  description: Production
security:
- bearerAuth: []
tags:
- name: Anthropic-compatible
  description: 'The Messages API for every text model except Jev, with x-api-key or Authorization: Bearer.'
paths:
  /v1/messages:
    post:
      tags:
      - Anthropic-compatible
      operationId: createMessage
      summary: Messages
      description: 'Anthropic Messages API for every text model except Jev. Claude models get the request in Anthropic''s own format, cache_control included, and prompt caching bills at the cache-read and cache-write prices; the relay sets a missing max_tokens to the model''s output limit and drops service_tier, inference_geo and speed. The other models get a conversion and answer in the Messages format: gpt-6.1-sol through the Responses API, the rest through Chat Completions. Send the key as x-api-key (the Anthropic SDK does) or as a Bearer token. Without max_tokens, deepseek-flash-Abliterated gets 262144 (cut to what the context window leaves after the prompt) and the other converted models are sent no cap. The Chat Completions conversion keeps cache_control on text, image and document blocks only, and the Responses conversion drops it. On the Chat Completions models a tool_result keeps its text on the tool message and its images move to the following user message, and a tool_result holding a document is a 400; thinking blocks in the history are dropped on gpt-6.1-sol, and redacted_thinking blocks on every converted model; stop_sequences on grok-4.7 is a 400; GLM-5.3-Abliterated takes text only: each image or document block reaches it as the note "[Attachment omitted: this model accepts text only.]", as on Chat Completions.'
      security:
      - anthropicKey: []
      - bearerAuth: []
      parameters:
      - name: anthropic-version
        in: header
        required: false
        description: Optional. Claude gets this value, or 2023-06-01 when it is absent; the converted requests do not carry it.
        schema:
          type: string
          example: '2023-06-01'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessagesRequest'
            example:
              model: claude-sonnet-5-5
              max_tokens: 256
              messages:
              - role: user
                content: Say hello in one sentence.
      responses:
        '200':
          description: 'The answer as a Messages object: Claude''s unchanged, the other models'' converted from Chat Completions or Responses.'
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
            text/event-stream:
              schema:
                type: string
        '400':
          description: The body failed validation; the message says which field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: The key is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: The balance is empty.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The model is not sold here, is not on this key's route, or is excluded by the key's model limits.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited; Retry-After gives the wait in seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: No line can serve the model right now, or the provider is overloaded; retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    MessagesRequest:
      type: object
      required:
      - model
      - messages
      properties:
        model:
          $ref: '#/components/schemas/TextModel'
        max_tokens:
          type: integer
          description: Without it, Claude and DeepSeek get the model's output limit and the other models are sent no cap.
        messages:
          type: array
          items:
            type: object
            required:
            - role
            - content
            properties:
              role:
                type: string
                enum:
                - user
                - assistant
              content: {}
            additionalProperties: true
        system:
          description: A system prompt as a string or content blocks. TopxAI adds none of its own, except that a gpt-6.1-sol request without one is sent the instructions "You are a helpful assistant." so the provider does not add its own longer prompt.
          oneOf:
          - type: string
          - type: array
            items:
              type: object
              additionalProperties: true
        stream:
          type: boolean
        tools:
          type: array
          items:
            type: object
            additionalProperties: true
        temperature:
          type: number
        thinking:
          type: object
          additionalProperties: true
      additionalProperties: true
    TextModel:
      type: string
      description: A catalogue text model.
      enum:
      - claude-fable-5-1
      - claude-sonnet-5-5
      - claude-opus-5-5
      - gpt-6-astra
      - gpt-6.1-sol
      - grok-4.7
      - GLM-5.3-Abliterated
      - kimi-k3.1-pro
      - deepseek-flash-Abliterated
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Ends with a request id to quote to support@topxea.com.
            type:
              type: string
            code:
              type:
              - string
              - integer
              - 'null'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'A TopxAI API key (sk-...) as Authorization: Bearer <key>. Keys are created at https://ai.topxea.com/keys.'
    anthropicKey:
      type: apiKey
      in: header
      name: x-api-key
      description: The same TopxAI key, the way the Anthropic SDK sends it.
externalDocs:
  description: Documentation
  url: https://ai.topxea.com/docs