Sahara AI Inference API

OpenAI-compatible chat completion inference.

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/sahara-ai-inference-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 email required.

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

OpenAPI Specification

sahara-ai-inference-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Sahara AI Compute Discovery Inference API
  description: OpenAI-compatible inference and model-discovery API for the Sahara AI Developer Platform. Exposes a routed compute layer that fans requests out across multiple upstream providers (OpenAI, Lepton, Together, and others), plus discovery endpoints for the models and providers available on the network. Faithful transcription of the published API documentation; not a provider-published OpenAPI.
  version: '1.0'
  contact:
    name: Sahara AI Developer Platform
    url: https://docs.saharaai.com/developer-docs-ai-developer-portal/api-documentation
  x-apisjson-generated: true
  x-source: https://docs.saharaai.com/developer-docs-ai-developer-portal/api-documentation.md
servers:
- url: https://app.saharaai.com/developer/api
  description: AI Developer Platform compute API
- url: https://portal.saharalabs.ai/api
  description: Developer Portal (Sahara Labs) compute API
security:
- ApiKeyAuth: []
- BearerAuth: []
tags:
- name: Inference
  description: OpenAI-compatible chat completion inference.
paths:
  /compute/chat/completions:
    post:
      operationId: createChatCompletion
      summary: Create a chat completion
      description: Send an OpenAI-compatible inference request. Compatible with the OpenAI SDK, LangChain, and the OpenAI Agents SDK. Supports streaming responses. The target provider may be selected via the `OpenAI-Organization` header.
      tags:
      - Inference
      parameters:
      - name: OpenAI-Organization
        in: header
        required: false
        description: Select the upstream compute provider to route the request to.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
      responses:
        '200':
          description: An OpenAI-format chat completion.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    ChatCompletionResponse:
      type: object
      description: OpenAI-format chat completion.
      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:
          type: object
          properties:
            prompt_tokens:
              type: integer
            completion_tokens:
              type: integer
            total_tokens:
              type: integer
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type: string
    ChatCompletionRequest:
      type: object
      required:
      - model
      - messages
      properties:
        model:
          type: string
          description: Model identifier to run inference against.
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ChatMessage'
        stream:
          type: boolean
          description: When true, stream the response as server-sent events.
    ChatMessage:
      type: object
      required:
      - role
      - content
      properties:
        role:
          type: string
          enum:
          - system
          - user
          - assistant
        content:
          type: string
  responses:
    NotFound:
      description: Not found — verify pipeline or model IDs.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Bad request — check request formatting.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Internal server error — retry or contact support.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key issued from the Developer Portal. Passed in the `x-api-key` header. Never expose your API key in public code or repositories.
    BearerAuth:
      type: http
      scheme: bearer
      description: API key passed as a Bearer token in the Authorization header (OpenAI-compatible clients).