> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cubeuaeai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# deepseek-v4-pro

> Generate a model response from the conversation.



## OpenAPI

````yaml en/api-reference/model-api/deepseek/openapi/deepseek-v4-pro/openapi.yaml POST /v1/chat/completions
openapi: 3.1.0
info:
  title: DeepSeek V4 Pro
  description: Call DeepSeek V4 Pro
  version: 1.0.0
servers:
  - url: https://ai.cubeuaeai.com
security:
  - bearerAuth: []
paths:
  /v1/chat/completions:
    post:
      summary: Chat completion
      description: Generate a model response from the conversation.
      operationId: createChatCompletionDeepseekV4Pro
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - messages
              properties:
                model:
                  type: string
                  enum:
                    - deepseek-v4-pro
                  description: model ID
                  example: deepseek-v4-pro
                messages:
                  type: array
                  minItems: 1
                  description: List of conversation messages.
                  items:
                    type: object
                    required:
                      - role
                      - content
                    properties:
                      role:
                        type: string
                        enum:
                          - system
                          - user
                          - assistant
                          - tool
                      content:
                        type: string
                      name:
                        type: string
                        description: >-
                          Participant name, used to distinguish different
                          participants with the same role.
                      prefix:
                        type: boolean
                        description: >-
                          When true, the model continues generation using this
                          message as a prefix.
                      tool_call_id:
                        type: string
                        description: >-
                          Required for tool messages. The ID of the tool call
                          this message responds to.
                  example:
                    - role: user
                      content: Hello!
                thinking:
                  type: object
                  nullable: true
                  description: Enable or disable thinking mode.
                  properties:
                    type:
                      type: string
                      enum:
                        - enabled
                        - disabled
                      description: '`enabled` turns on thinking mode.'
                    reasoning_effort:
                      type: string
                      enum:
                        - high
                        - max
                        - low
                        - medium
                      description: Controls reasoning intensity.
                max_tokens:
                  type: integer
                  minimum: 1
                  description: Maximum number of tokens to generate.
                response_format:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - text
                        - json_object
                      default: text
                  description: 'Set `{"type": "json_object"}` to enable JSON mode.'
                stop:
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                  description: Sequences that stop generation. Up to 16.
                stream:
                  type: boolean
                  default: false
                  description: When true, results are streamed back via SSE.
                stream_options:
                  type: object
                  description: Streaming options. Only valid when stream is true.
                  properties:
                    include_usage:
                      type: boolean
                      description: >-
                        When true, usage statistics are returned before the
                        stream ends.
                temperature:
                  type: number
                  minimum: 0
                  maximum: 2
                  default: 1
                  description: >-
                    Sampling temperature. Higher values make the output more
                    random.
                  example: 1
                top_p:
                  type: number
                  minimum: 0
                  maximum: 1
                  default: 1
                  description: Nucleus sampling threshold.
                tools:
                  type: array
                  description: >-
                    A list of tools the model can call. Currently only function
                    calling is supported.
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - function
                      function:
                        type: object
                        required:
                          - name
                        properties:
                          name:
                            type: string
                            description: Function name.
                          description:
                            type: string
                            description: Description of what the function does.
                          parameters:
                            type: object
                            description: Function parameters in JSON Schema format.
                          strict:
                            type: boolean
                            description: When true, enables strict mode.
                tool_choice:
                  oneOf:
                    - type: string
                      enum:
                        - none
                        - auto
                        - required
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - function
                        function:
                          type: object
                          required:
                            - name
                          properties:
                            name:
                              type: string
                  description: >-
                    Controls tool-calling behavior: `none`, `auto`, `required`,
                    or a specific function.
                frequency_penalty:
                  type: number
                  minimum: -2
                  maximum: 2
                  default: 0
                  description: Deprecated by DeepSeek. Passing this has no effect.
                presence_penalty:
                  type: number
                  minimum: -2
                  maximum: 2
                  default: 0
                  description: Deprecated by DeepSeek. Passing this has no effect.
                user_id:
                  type: string
                  maxLength: 512
                  pattern: ^[a-zA-Z0-9\-_]+$
                  description: >-
                    Custom user ID, used for content-safety processing and
                    KVCache isolation.
      responses:
        '200':
          description: Response generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletion'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      type:
                        type: string
                      code:
                        type: string
        '401':
          description: Unauthorized
        '429':
          description: Rate limit exceeded
components:
  schemas:
    ChatCompletion:
      type: object
      properties:
        id:
          type: string
          example: chatcmpl-abc123
        object:
          type: string
          example: chat.completion
        created:
          type: integer
          description: Unix timestamp
        model:
          type: string
          example: deepseek-v4-pro
        choices:
          type: array
          items:
            type: object
            properties:
              index:
                type: integer
              message:
                type: object
                properties:
                  role:
                    type: string
                    example: assistant
                  content:
                    type: string
                    nullable: true
                    example: Hello! How can I help you?
                  reasoning_content:
                    type: string
                    nullable: true
                    description: Reasoning process in thinking mode.
                  tool_calls:
                    type: array
                    nullable: true
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                          enum:
                            - function
                        function:
                          type: object
                          properties:
                            name:
                              type: string
                            arguments:
                              type: string
              finish_reason:
                type: string
                nullable: true
                enum:
                  - stop
                  - length
                  - content_filter
                  - tool_calls
                  - insufficient_system_resource
                  - null
              matched_stop:
                type: string
                nullable: true
        usage:
          type: object
          properties:
            prompt_tokens:
              type: integer
            completion_tokens:
              type: integer
            total_tokens:
              type: integer
            prompt_tokens_details:
              type: object
              nullable: true
              properties:
                cached_tokens:
                  type: integer
                audio_tokens:
                  type: integer
                text_tokens:
                  type: integer
            completion_tokens_details:
              type: object
              properties:
                reasoning_tokens:
                  type: integer
                accepted_prediction_tokens:
                  type: integer
                rejected_prediction_tokens:
                  type: integer
        system_fingerprint:
          type: string
          nullable: true
          description: Backend configuration fingerprint.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authenticate with a Bearer token. After creating an API key in the Cube
        AI console, pass it as `Bearer YOUR_API_KEY` in the Authorization
        header.

````