DeepSeek Completions API

The Completions API from DeepSeek — 1 operation(s) for completions.

Operations 1

POST /completions DeepSeek Create FIM 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-completions-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-completions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DeepSeek Completion Chat Completions API
  description: Creates a model response for the given chat conversation.
  version: 1.0.0
servers:
- url: https://api.deepseek.com
tags:
- name: Completions
paths:
  /completions:
    post:
      summary: DeepSeek Create FIM Completion
      description: Generates a fill-in-the-middle completion for a given prompt using DeepSeek models.
      operationId: createFIMCompletion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - model
              - prompt
              properties:
                model:
                  type: string
                  enum:
                  - deepseek-chat
                  description: ID of the model to use.
                prompt:
                  type: string
                  default: Once upon a time,
                  description: The prompt to generate completions for.
                echo:
                  type: boolean
                  nullable: true
                  description: Echo back the prompt in addition to the completion.
                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.

                    '
                logprobs:
                  type: integer
                  nullable: true
                  maximum: 20
                  description: 'Number of most likely tokens to return with log probabilities. The API will always return the log probability of the sampled token.

                    '
                max_tokens:
                  type: integer
                  nullable: true
                  description: The maximum number of tokens that can be generated in the completion.
                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.

                    '
                stop:
                  type: object
                  nullable: true
                  description: Sequence where the model stops generating tokens.
                stream:
                  type: boolean
                  nullable: true
                  description: 'Whether to stream back partial progress. If set, tokens are sent  as server-sent events until completion.

                    '
                stream_options:
                  type: object
                  nullable: true
                  description: Options for streaming responses.
                suffix:
                  type: string
                  nullable: true
                  description: Text that comes after the completion of the inserted text.
                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.

                    '
      responses:
        '200':
          description: Successful completion.
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - choices
                - created
                - model
                - object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the completion.
                  choices:
                    type: array
                    items:
                      type: object
                      description: Array of generated responses.
                  created:
                    type: integer
                    format: int64
                    description: Unix timestamp of the response creation.
                  model:
                    type: string
                    description: The model used for the completion.
                  system_fingerprint:
                    type: string
                    description: Backend configuration fingerprint (optional).
                  object:
                    type: string
                    enum:
                    - text_completion
                    description: Object type of the response.
                  usage:
                    type: object
                    description: Details of token usage.
      tags:
      - Completions