Skip to main content
POST
Create chat completion

承認

Authorization
string
header
必須

Authenticate with a Bearer Token. Format: Authorization: Bearer sk-xxxxxx

ボディ

application/json
model
string
必須

Model ID

:

"gpt-4"

messages
object[]
必須

List of conversation messages

temperature
number
デフォルト:1

Sampling temperature

必須範囲: 0 <= x <= 2
top_p
number
デフォルト:1

Nucleus sampling parameter

必須範囲: 0 <= x <= 1
n
integer
デフォルト:1

Number of generations

必須範囲: x >= 1
stream
boolean
デフォルト:false

Whether to stream the response

stream_options
object
stop

Stop sequences

max_tokens
integer

Maximum generated tokens

max_completion_tokens
integer

Maximum completion tokens

presence_penalty
number
デフォルト:0
必須範囲: -2 <= x <= 2
frequency_penalty
number
デフォルト:0
必須範囲: -2 <= x <= 2
logit_bias
object
user
string
tools
object[]
tool_choice
利用可能なオプション:
none,
auto,
required
response_format
object
seed
integer
reasoning_effort
enum<string>

Reasoning effort (for models that support reasoning)

利用可能なオプション:
low,
medium,
high
modalities
enum<string>[]
利用可能なオプション:
text,
audio
audio
object

レスポンス

Response created successfully

id
string
object
string
:

"chat.completion"

created
integer
model
string
choices
object[]
usage
object
system_fingerprint
string