Models Hub
API ReferenceChat

Playground chat debugging endpoint.

Playground chat debugging endpoint. This endpoint is derived from the current new-api router code and returns a unified management API response; the specific `data` structure varies by business object.

Edit this page
POST
/pg/chat/completions

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/pg/chat/completions" \  -H "Content-Type: application/json" \  -d '{    "model": "gpt-5.4-nano",    "messages": [      {        "role": "system",        "content": "string"      }    ]  }'
{
  "success": true,
  "message": "string",
  "data": null
}