DeepSeek Chat API

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

Operations 1

POST /chat/completions DeepSeek Create 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/deepseek-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

deepseek-chat-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DeepSeek Completion Chat API
  description: Creates a model response for the given chat conversation.
  version: 1.0.0
servers:
- url: https://api.deepseek.com
tags:
- name: Chat
paths:
  /chat/completions:
    post:
      summary: DeepSeek Create Chat Completion
      description: Creates a model response for the given chat conversation.
      operationId: createChatCompletion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - messages
              - model
              properties:
                messages:
                  type: array
                  items:
                    type: object
                    required:
                    - content
                    - role
                    properties:
                      content:
                        type: string
                        description: The content of the message.
                      role:
                        type: string
                        enum:
                        - system
                        - user
                        - assistant
                        description: The role of the message sender.
                model:
                  type: string
                  enum:
                  - deepseek-chat
                  - deepseek-reasoner
                  description: ID of the model to use.
                frequency_penalty:
                  type: number
                  nullable: true
                  minimum: -2
                  maximum: 2
                  default: 0
                  description: 'Positive values penalize new tokens based on their frequency  in the text, reducing repetition.

                    '
                max_tokens:
                  type: integer
                  nullable: true
                  minimum: 1
                  maximum: 8192
                  default: 4096
                  description: The maximum number of tokens to generate.
                presence_penalty:
                  type: number
                  nullable: true
                  minimum: -2
                  maximum: 2
                  default: 0
                  description: 'Positive values penalize new tokens that appear in the text, encouraging discussion of new topics.

                    '
                response_format:
                  type: object
                  nullable: true
                  description: Format of the response.
                  properties:
                    type:
                      type: string
                      description: The format of the response, e.g., text.
                stop:
                  type: object
                  nullable: true
                  description: Sequence where the model stops generating tokens.
                stream:
                  type: boolean
                  nullable: true
                  description: Whether to stream responses as they are generated.
                stream_options:
                  type: object
                  nullable: true
                  description: Options for streaming responses.
                temperature:
                  type: number
                  nullable: true
                  maximum: 2
                  default: 1
                  description: Controls randomness in generation (higher values = more random).
                top_p:
                  type: number
                  nullable: true
                  maximum: 1
                  default: 1
                  description: 'Nucleus sampling parameter. Tokens are selected from the  top_p probability mass.

                    '
                tools:
                  type: array
                  nullable: true
                  items:
                    type: object
                  description: Tools available for the model to use.
                tool_choice:
                  type: object
                  nullable: true
                  description: Configuration for tool selection.
                logprobs:
                  type: boolean
                  nullable: true
                  description: Whether to return log probabilities of output tokens.
                top_logprobs:
                  type: integer
                  nullable: true
                  maximum: 20
                  description: 'Number of most likely tokens to return with log probabilities. Requires logprobs to be true.

                    '
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - choices
                - created
                - model
                - system_fingerprint
                - object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the chat completion.
                  choices:
                    type: array
                    items:
                      type: object
                      description: Array of generated responses.
                  created:
                    type: integer
                    format: int64
                    description: Unix timestamp when the response was created.
                  model:
                    type: string
                    description: Model used for the response.
                  system_fingerprint:
                    type: string
                    description: Backend configuration fingerprint.
                  object:
                    type: string
                    enum:
                    - chat.completion
                    description: Object type.
                  usage:
                    type: object
                    description: Token usage details.
      tags:
      - Chat