1. Chat (Chat)
PP API
  • GPT SDK
    • Chat (Chat)
      • Chat Completions (General)
        POST
  1. Chat (Chat)

Chat Completions (General)

POST
https://app.ppapi.ai/v1/chat/completions
Given a prompt, the model will return one or more predicted completions, and can also return the
probabilities of alternative tokens at each position.
Create a completion for the provided prompt and parameters.

Request

Header Params

Body Params application/json

Examples
{
    "messages": [
        {
            "role": "system",
            "content": "You are a large language model assistant."
        },
        {
            "role": "user",
            "content": "Hello"
        }
    ],
    "stream": false,
    "model": "deepseek-v4-pro",
    "temperature": 0.5,
    "presence_penalty": 0,
    "frequency_penalty": 0,
    "top_p": 1
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://app.ppapi.ai/v1/chat/completions' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
    "messages": [
        {
            "role": "system",
            "content": "You are a large language model assistant."
        },
        {
            "role": "user",
            "content": "Hello"
        }
    ],
    "stream": false,
    "model": "deepseek-v4-pro",
    "temperature": 0.5,
    "presence_penalty": 0,
    "frequency_penalty": 0,
    "top_p": 1
}'

Responses

🟢200Success
application/json
Bodyapplication/json

Examples
{
    "id": "f4275fb7-c907-4cfd-bf1e-f51595ff34fc",
    "object": "chat.completion",
    "created": 1777028922,
    "model": "deepseek-v4-pro",
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "Hello! How can I assist you today?",
                "reasoning_content": "We are asked: \"Hello\" - This is a greeting. The user might be starting a conversation. I should respond helpfully, maybe introduce myself if needed, but keep it simple. The instruction says \"You are a large language model assistant.\" So I can respond in a friendly manner."
            },
            "logprobs": null,
            "finish_reason": "stop"
        }
    ],
    "usage": {
        "prompt_tokens": 13,
        "completion_tokens": 69,
        "total_tokens": 82,
        "prompt_tokens_details": {
            "cached_tokens": 0
        },
        "completion_tokens_details": {
            "reasoning_tokens": 59
        },
        "prompt_cache_hit_tokens": 0,
        "prompt_cache_miss_tokens": 13
    },
    "system_fingerprint": "fp_9954b31ca7_prod0820_fp8_kvcache_20260402"
}
Modified at 2026-04-26 01:50:46
Built with