Gradient Chat API

Chat completion

Operations 1

POST /ai/chat/completions Chat completion #

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/gradient-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

gradient-chat-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Gradient Cloud AI Chat API
  version: v1
  description: OpenAI-compatible inference API for Gradient Cloud — the enterprise inference service of Gradient's Open Intelligence Stack, serving open models across a distributed compute network (Parallax) over Gradient's peer-to-peer data motion engine (Lattica). The API implements OpenAI-compatible interfaces for model listing, chat completion, and text completion (streaming and non-streaming). Generated by the API Evangelist enrichment pipeline from the provider's published API Reference Documentation; not an official provider OpenAPI. Verify against the live docs before production use.
  contact:
    name: Gradient
    url: https://docs.gradient.network/enterprise-solutions/gradient-cloud/api-reference-documentation
  x-apievangelist-generated: true
  x-apievangelist-source: https://docs.gradient.network/enterprise-solutions/gradient-cloud/api-reference-documentation.md
servers:
- url: https://apis.gradient.network/api/v1
  description: Gradient Cloud production
security:
- AccessKey: []
tags:
- name: Chat
  description: Chat completion
paths:
  /ai/chat/completions:
    post:
      tags:
      - Chat
      operationId: createChatCompletion
      summary: Chat completion
      description: Create a chat completion request, supporting both streaming and non-streaming responses.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            example:
              model: qwen/qwen3-coder-480b-instruct-fp8
              messages:
              - role: user
                content: Hello, how are you?
              temperature: 0.7
              max_tokens: 100
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletion'
            text/event-stream:
              schema:
                type: string
                description: 'Server-sent event stream of chat.completion.chunk objects, terminated by `data: [DONE]`.'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Billing Check Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Model Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Usage:
      type: object
      properties:
        prompt_tokens:
          type: integer
        completion_tokens:
          type: integer
        total_tokens:
          type: integer
    ChatCompletionRequest:
      type: object
      required:
      - model
      - messages
      properties:
        model:
          type: string
          description: The ID of the model to use
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ChatMessage'
        stream:
          type: boolean
          default: false
        max_tokens:
          type: integer
        temperature:
          type: number
          default: 1
          minimum: 0
          maximum: 2
        top_p:
          type: number
          default: 1
          minimum: 0
          maximum: 1
        n:
          type: integer
          default: 1
        stop:
          oneOf:
          - type: string
          - type: array
            items:
              type: string
        presence_penalty:
          type: number
          default: 0
          minimum: -2
          maximum: 2
        frequency_penalty:
          type: number
          default: 0
          minimum: -2
          maximum: 2
        logit_bias:
          type: object
        user:
          type: string
    ChatMessage:
      type: object
      required:
      - role
      - content
      properties:
        role:
          type: string
          enum:
          - system
          - user
          - assistant
        content:
          type: string
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type: string
    ChatCompletion:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
        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
        usage:
          $ref: '#/components/schemas/Usage'
  securitySchemes:
    AccessKey:
      type: http
      scheme: bearer
      description: 'Access Key passed as `Authorization: Bearer <access-key>`.'