- Authorization
- Request Body
- Response
Authorization
Authentication is done using Bearer Auth in header.Format:
Authorization: Bearer sk-xxxxxxRequest Body
The ID of the model to use for the request.
A list of messages comprising the conversation history.
Controls randomness; lower values are deterministic, higher are creative. Default
1 Range 0 <= value <= 2Nucleus sampling parameter to focus on top probability tokens. Default
1 Range 0 <= value <= 1Specifies how many chat completion choices to generate. Default
1 Range 1 <= valueIf true, partial message deltas will be sent as events. Default
falseOptions for configuring the behavior of the streaming response.
Up to 4 sequences where the API will stop generating.
The maximum number of tokens to generate in the completion.
Limits the total tokens generated specifically for the completion.
Penalizes tokens based on whether they appeared in text. Default
0 Range -2 <= value <= 2Penalizes tokens based on their existing frequency in text. Default
0 Range -2 <= value <= 2Modifies the likelihood of specified tokens appearing in the completion.
A unique identifier representing your end-user for monitoring.
A list of tools the model may call (e.g., functions).
Controls which (if any) tool is called by the model.
Specifies the format that the model must output (e.g., JSON).
Used for deterministic sampling to ensure repeatable outputs.
Sets the computational intensity for models with reasoning capabilities. Values
"low" | "medium" | "high"Specifies the output modalities the model should use (e.g., audio).
Parameters for the audio output when using audio modalities.
Successfully created response.
Hide Object Properties
Hide Object Properties
The unique identifier for the chat completion.
The object type, which is always
chat.completion.The Unix timestamp (in seconds) of when the chat completion was created.
The model used for the chat completion.
A list of chat completion choices. Can be more than one if
n is greater than 1.Show Choice Object
Show Choice Object
The index of the choice in the list of choices.
A chat completion message generated by the model.
Show Message Object
Show Message Object
The role of the author of this message.
The contents of the message.
The name of the author of this message.
The tool calls generated by the model, such as function calls.
Show Tool Call Object
Show Tool Call Object
The ID of the tool call.
The type of the tool. Currently, only
function is supported.Tool call that this message is responding to.
The reasoning content generated by the model prior to the final response.
The reason the model stopped generating tokens (e.g.,
stop, length, tool_calls).Usage statistics for the completion request.
Show Usage Details
Show Usage Details
Number of tokens in the prompt.
Number of tokens in the generated completion.
Total tokens used (prompt + completion).
This fingerprint represents the backend configuration that the model runs with.
The request was unacceptable, often due to missing a required parameter or invalid formatting.
curl -X POST "https://decode.abingdoncs.org.uk/v1/chat/completions" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "string"
}
]
}'

