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
Example
{"messages":[{"role":"system","content":"You are a large language model assistant."},{"role":"user","content":"Hello"}],"stream":false,"model":"gpt-5","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--location--request POST 'https://app.ppapi.ai/v1/chat/completions' \
--header'Authorization: Bearer {{YOUR_API_KEY}}' \
--header'Content-Type: application/json' \
--data-raw'{
"messages": [
{
"role": "system",
"content": "You are a large language model assistant."
},
{
"role": "user",
"content": "Hello"
}
],
"stream": false,
"model": "gpt-5",
"temperature": 0.5,
"presence_penalty": 0,
"frequency_penalty": 0,
"top_p": 1
}'
Responses
🟢200Success
application/json
Body
Example
{"id":"chatcmpl-AJaak2I8cuhBbdpMor1SikpkWOvSy","object":"chat.completion","created":1729232254,"model":"gpt-3.5-turbo","choices":[{"index":0,"message":{"role":"assistant","content":"Hello, I am an AI assistant. I am a virtual agent without emotions, but I can help you answer questions and provide information. How can I help you today?"},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":27,"completion_tokens":57,"total_tokens":84},"system_fingerprint":null}