GPT-5.4 Pro
[Deprecated] Legacy text completions endpoint. GPT-5.4 Pro has been retired; GPT-5.4 / GPT-5.5 are now served via the Responses API — see /docs/codex.
This /v1/completions endpoint is a legacy prompt-based completions API with no currently active model (GPT-5.4 Pro has been retired). For the new GPT-5.4 / GPT-5.5, use the Responses API (/v1/responses) — see /docs/codex. For ordinary chat models, use /v1/messages or /v1/chat/completions (see /docs/llm).
/api/v1/completionsPrices are per 1M tokens
| Model | Input | Output | Description |
|---|
curl -X POST https://apimodels.app/api/v1/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4-pro",
"prompt": "Write a detailed analysis of quantum computing:",
"max_tokens": 1024
}'{
"id": "cmpl-abc123",
"object": "text_completion",
"created": 1700000000,
"model": "gpt-5.4-pro",
"choices": [
{
"text": "Quantum computing leverages the principles of quantum mechanics...",
"index": 0,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 256,
"total_tokens": 268
}
}Set stream: true to receive Server-Sent Events (SSE).
curl -X POST https://apimodels.app/api/v1/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4-pro",
"prompt": "Explain the theory of relativity:",
"max_tokens": 1024,
"stream": true
}'Credits are calculated based on actual token usage:
Cost = (prompt_tokens * input_price + completion_tokens * output_price) / 1,000,000 Credits = Cost(CNY) // credits are in ¥