CentML Chat API

The Chat API from CentML — 1 operation(s) for chat.

Operations 1

POST /chat/completions Creates a model response for the given chat conversation. #

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/centml-chat-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

centml-chat-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CentML Chat API
  description: 'Specification of the CentML API surface. CentML exposes two related but distinct HTTP APIs: (1) an OpenAI-compatible serverless inference API for chat completions, text completions, and model listing served at https://api.centml.com/openai/v1, authenticated with a Bearer serverless token; and (2) a platform (control-plane) API for managing dedicated inference / compute / job deployments and clusters, also Bearer-authenticated. Both are modeled here. Endpoints reflect CentML''s published documentation (docs.centml.ai) and the official platform_api_python_client.'
  termsOfService: https://centml.ai/terms-of-service/
  contact:
    name: CentML Support
    url: https://docs.centml.ai/resources/requesting_support
  version: '1.0'
servers:
- url: https://api.centml.com/openai/v1
  description: OpenAI-compatible serverless inference base URL.
- url: https://api.centml.com
  description: CentML platform (control-plane) base URL for deployments and clusters.
security:
- bearerAuth: []
tags:
- name: Chat
paths:
  /chat/completions:
    post:
      operationId: createChatCompletion
      tags:
      - Chat
      summary: Creates a model response for the given chat conversation.
      description: 'OpenAI-compatible chat completions endpoint. Pass a `model` ID from the serverless catalog and a `messages` array. Set `stream: true` to receive the response as Server-Sent Events. Served at https://api.centml.com/openai/v1/chat/completions.'
      servers:
      - url: https://api.centml.com/openai/v1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateChatCompletionRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateChatCompletionResponse'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/ChatCompletionChunk'
components:
  schemas:
    CreateChatCompletionRequest:
      type: object
      required:
      - model
      - messages
      properties:
        model:
          type: string
          description: ID of a serverless model, e.g. meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8.
        messages:
          type: array
          description: A list of messages comprising the conversation so far.
          items:
            $ref: '#/components/schemas/ChatMessage'
        max_tokens:
          type:
          - integer
          - 'null'
          description: The maximum number of tokens to generate in the completion.
        temperature:
          type:
          - number
          - 'null'
          default: 1
          description: Sampling temperature between 0 and 2.
        top_p:
          type:
          - number
          - 'null'
          default: 1
          description: Nucleus sampling probability mass.
        top_k:
          type:
          - integer
          - 'null'
          description: Limits sampling to the top K tokens.
        n:
          type:
          - integer
          - 'null'
          default: 1
          description: How many chat completion choices to generate.
        stream:
          type:
          - boolean
          - 'null'
          default: false
          description: If true, partial deltas are sent as Server-Sent Events.
        stop:
          type:
          - array
          - 'null'
          items:
            type: string
          description: Up to 4 sequences where the API will stop generating.
        frequency_penalty:
          type:
          - number
          - 'null'
          default: 0
          description: Penalizes new tokens based on existing frequency.
        presence_penalty:
          type:
          - number
          - 'null'
          default: 0
          description: Penalizes new tokens based on whether they appear so far.
        tools:
          type: array
          description: A list of tools (functions) the model may call.
          items:
            type: object
        response_format:
          type: object
          description: An object specifying the format the model must output (e.g. JSON).
    ChatCompletionChunk:
      type: object
      description: A streamed chunk of a chat completion (SSE), object chat.completion.chunk.
      required:
      - id
      - object
      - created
      - model
      - choices
      properties:
        id:
          type: string
        object:
          type: string
          enum:
          - chat.completion.chunk
        created:
          type: integer
        model:
          type: string
        choices:
          type: array
          items:
            type: object
            properties:
              index:
                type: integer
              delta:
                $ref: '#/components/schemas/ChatMessage'
              finish_reason:
                type:
                - string
                - 'null'
    CreateChatCompletionResponse:
      type: object
      required:
      - id
      - object
      - created
      - model
      - choices
      properties:
        id:
          type: string
        object:
          type: string
          enum:
          - chat.completion
        created:
          type: integer
        model:
          type: string
        choices:
          type: array
          items:
            type: object
            properties:
              index:
                type: integer
              message:
                $ref: '#/components/schemas/ChatMessage'
              finish_reason:
                type:
                - string
                - 'null'
                enum:
                - stop
                - length
                - tool_calls
        usage:
          $ref: '#/components/schemas/Usage'
    ChatMessage:
      type: object
      required:
      - role
      - content
      properties:
        role:
          type: string
          enum:
          - system
          - user
          - assistant
          - tool
          description: The role of the message author.
        content:
          type:
          - string
          - 'null'
          description: The contents of the message.
        name:
          type: string
          description: An optional name for the participant.
    Usage:
      type: object
      properties:
        prompt_tokens:
          type: integer
        completion_tokens:
          type: integer
        total_tokens:
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: CentML API key
      description: 'Set the `Authorization: Bearer <CENTML_API_KEY>` header. Serverless inference uses a serverless token; the platform API uses an account access token. Both are issued from the CentML platform.'