OpenAI
OpenAI-style Chat Completions, reasoning, and code model overview
OpenAI-series models use the OpenAI-compatible Chat Completions endpoint. This page describes common parameters and model differences for GPT, Codex, and o reasoning models.
Endpoint Paths
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/chat/completions | Create a chat completion, reasoning, or code-generation request |
| GET | /v1/models | List models available to the current token |
| GET | /v1/models/{model} | Retrieve one model's details |
Request Structure
{
"model": "gpt-5.4",
"messages": [
{
"role": "user",
"content": "Introduce Routescope API in one sentence."
}
],
"temperature": 0.7
}curl -X POST "https://api.routescope.ai/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o-mini", "messages": [ { "role": "user", "content": "Hello, please introduce yourself in one sentence." } ] }'{
"id": "task_01JZ8M9Q4R7V2K8N9P0Q",
"object": "string",
"created": 1,
"model": "gpt-4o-mini",
"choices": [],
"usage": {
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1,
"input_tokens": 1,
"output_tokens": 1
}
}{
"error": null,
"message": "success"
}Authorization
BearerAuth
Model relay interface recognition. Request heading: Autoration: Bearer .
In: header
Request Body
application/json
The model name to call.
Can not open message Can not open message Scope: At least 1 message.
Sampling temperatures spread more and more. Sample temperature. Range: 0 to 2; the larger the value, the more random.
0 <= value <= 2Nuclear sampling parameters. Nuclear sampling parameters. Range: 0 to 1; usually no large adjustments with temperature.
0 <= value <= 1Maximum output number of Tokens. Maximum output number of Tokens. Scope: 1 to the maximum of the context of the model.
1 <= valueWhether to enable SSE flow output. Whether or not to enable flow output. Scope: True or false.
Stream extension options. Upstream support varied.
Whether or not to start deep thinking mode. Qwen/Ariyuncrery OpenAI compatible extension parameters: _FD_PROTECT_0 _ Start thinking, _FD_PROTECT_1 _ Close thinking; part of the thinking model is always open and does not support closure. Python OpenAI SDK can be imported through FD_PROTECT_2.
Tool definitions for which models can be called. . Scope: The length of arrays and the complexity of schema are based on upstream limits.
Tools call policies, such as _FD_PROTEC_0, FD_PROTEC_1 or visible specifying functions. Tool call policy. Scope: auto, none, required or visible tool objects.
Structured output constraints, such as JSON Schema.
End-user identification for audit and control.
Response Body
application/json
application/json
Model Selection
| Model ID | Capability | Typical Use |
|---|---|---|
gpt-5, gpt-5-2025-08-07 | Chat completions | General text generation and multi-turn conversation |
gpt-5.1, gpt-5.1-2025-11-13, gpt-5.1-chat-latest | Chat completions | General conversation, pinned versions, or latest entry |
gpt-5.2-2025-12-11, gpt-5.2-chat-latest | Chat completions | General conversation, pinned versions, or latest entry |
gpt-5.3-chat-latest | Chat completions | Latest entry |
gpt-5.4, gpt-5.4-2026-03-05, gpt-5.4-mini, gpt-5.4-mini-2026-03-17, gpt-5.4-nano, gpt-5.4-pro, gpt-5.4-pro-2026-03-05 | Chat completions | General, mini, nano, and pro tiers |
gpt-5-pro, gpt-5-pro-2025-10-06 | Chat completions | Advanced text tasks |
gpt-5.1-codex-mini, gpt-5.1-codex, gpt-5.1-codex-max, gpt-5.2-codex, gpt-5.3-codex | Code generation | Codex and code-focused tasks |
o3, o3-2025-04-16 | Reasoning | Reasoning-heavy tasks |
Common Parameters
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID to call. |
messages | array | Yes | Conversation messages. Roles include system, user, assistant, and tool. |
temperature | number | No | Sampling temperature. OpenAPI schema marks the range as 0 to 2. |
top_p | number | No | Nucleus sampling parameter. OpenAPI schema marks the range as 0 to 1. |
max_tokens | integer | No | Maximum output tokens, limited by the selected model context. |
stream | boolean | No | Whether to use SSE streaming. |
tools | array | No | Tool definitions. |
tool_choice | string/object | No | Tool-calling strategy. |
response_format | object | No | Structured output constraint, such as JSON Schema. |
user | string | No | End-user identifier for auditing and risk control. |
Model-Specific Notes
| Field | Applicable Models | Description |
|---|---|---|
model | All | Copy a model ID available to the current token from the model selection table or /v1/models. |
stream_options | OpenAI-compatible models that support streaming | Marked in the OpenAPI schema as streaming extensions. Upstream support may vary. |
enable_thinking | Qwen / Alibaba Cloud OpenAI-compatible extension | This field exists in the OpenAPI schema but is not a generic OpenAI GPT-series field, so it is not included in GPT examples. |
Reasoning / code model capability | o3 and Codex series | There is no unified extra field listed here. Follow API responses or the actual console display. |
Response Structure
OpenAI-style responses include id, object, created, model, choices, and usage. When stream=true, the response is pushed as SSE chunks.
How is this guide?
Last updated on