Docs ChatGPT Chat /v1/responses
API reference

Create model response

https://platform.openai.com/docs/api-reference/responses/create Some OpenAI models only support Response format, such as o3-pro, codex-mini-latest

POST/v1/responses

Body Parametersapplication/json

model string

The ID of the model to use. For more information about which models can be used with the Chat API, see the model endpoint compatibility table.

input array

Responses

200 application/json
response-200 object
properties
choices* array

List of candidate results

created* integer

Creation time (Unix timestamp)

id* string

Resource or task ID

object* string

Object type identifier, e.g. chat.completion

usage* object

Token usage statistics

400 Bad request or validation failed application/json
response-400 object
properties
error* object
401 Missing or invalid API Key application/json
response-401 object
Request Body Example Create model response
1{
2"model": "gpt-4o-mini",
3"max_tokens": 100,
4"text": {
5"format": {
6"type": "text"
7}
8},
9"include": [
10"output[*].logprobs"
11],
12"input": [
13{
14"role": "user",
15"content": "1+1等于几?"
16}
17]
18}
Code Sample cURL
1curl -X POST "https://api.digislash.com/v1/responses" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"model": "gpt-4o-mini",
6"max_tokens": 100,
7"text": {
8"format": {
9"type": "text"
10}
11},
12"include": [
13"output[*].logprobs"
14],
15"input": [
16{
17"role": "user",
18"content": "1+1等于几?"
19}
20]
21}'
Response
1▼{
2"id": "chatcmpl-123",
3"object": "chat.completion",
4"created": 1677652288,
5▼"choices": [
6▶{ 3 keys }
7],
8▼"usage": {
9"prompt_tokens": 9,
10"completion_tokens": 12,
11"total_tokens": 21
12}
13}