openapi: 3.1.0 info: title: SambaCloud Chat API description: 'SambaCloud is SambaNova''s managed inference API for open-source models (DeepSeek, Llama, Gemma, MiniMax, gpt-oss). The HTTP surface is OpenAI-compatible: chat completions, completions, embeddings, and model listing endpoints all match the OpenAI shape so existing OpenAI clients can be pointed at `https://api.sambanova.ai/v1` by changing base URL and API key. ' version: '2026-05-23' contact: name: SambaNova url: https://docs.sambanova.ai servers: - url: https://api.sambanova.ai/v1 description: SambaCloud production security: - bearerAuth: [] tags: - name: Chat paths: /chat/completions: post: summary: Create a chat completion description: 'OpenAI-compatible chat completions endpoint. Accepts a list of messages and returns a model completion. Supports streaming via `stream: true` with `text/event-stream` responses. ' operationId: createChatCompletion requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ChatCompletionRequest' responses: '200': description: Chat completion result (or SSE stream when streaming). content: application/json: schema: $ref: '#/components/schemas/ChatCompletionResponse' text/event-stream: schema: type: string description: Server-Sent Events stream of completion chunks. '400': description: Invalid request '401': description: Missing or invalid API key '429': description: Rate limited tags: - Chat components: schemas: ChatCompletionRequest: type: object required: - model - messages properties: model: type: string description: 'Model identifier such as DeepSeek-V3.1, Llama-3.3-70B-Instruct, Llama-4-Maverick-17B-128E-Instruct, or gpt-oss-120b. ' messages: type: array items: $ref: '#/components/schemas/ChatMessage' temperature: type: number top_p: type: number max_tokens: type: integer stream: type: boolean stop: oneOf: - type: string - type: array items: type: string tools: type: array items: type: object additionalProperties: true tool_choice: oneOf: - type: string - type: object additionalProperties: true response_format: type: object additionalProperties: true ChatCompletionResponse: type: object properties: id: type: string object: type: string example: 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 usage: type: object properties: prompt_tokens: type: integer completion_tokens: type: integer total_tokens: type: integer ChatMessage: type: object required: - role - content properties: role: type: string enum: - system - user - assistant - tool content: oneOf: - type: string - type: array items: type: object additionalProperties: true name: type: string tool_call_id: type: string securitySchemes: bearerAuth: type: http scheme: bearer description: 'SambaCloud API key issued from the /apis dashboard on cloud.sambanova.ai, sent as `Authorization: Bearer `. '