Chat Completions API
POST https://genaiapi.cloudsway.net/v1/ai/{ENDPOINT_PATH}/chat/completions
Function Overview: Create a model response for a given chat conversation
Request Parameters
Field | Meaning | Level | Format | Required | Remarks |
---|---|---|---|---|---|
messages | A list of messages comprising the conversation so far. | 1 | array | Yes | Depending on the model you use, different message types (modalities) are supported, like text, images, and audio. |
Developer message | Developer-provided instructions that the model should follow, regardless of messages sent by the user | 2 | object | With o1 models and newer, developer messages replace the previous system messages | |
content | The contents of the developer message | 3 | string or array | Yes | |
Text content | The contents of the developer message | 4 | string | ||
Array of content parts | An array of content parts with a defined type | 4 | array | For developer messages, only type text is supported | |
text | The text content | 5 | string | Yes | |
type | The type of the content part | 5 | string | Yes | |
role | The role of the messages author, in this case developer | 3 | string | Yes | |
name | An optional name for the participant. Provides the model information to differentiate between participants of the same role | 3 | string | ||
System message | Developer-provided instructions that the model should follow, regardless of messages sent by the user | 2 | object | With o1 models and newer, use developer messages for this purpose instead | |
content | The contents of the system message | 3 | string or array | Yes | |
Text content | The contents of the system message | 4 | string | ||
Array of content parts | An array of content parts with a defined type | 4 | array | For system messages, only type text is supported | |
Text content part | 5 | object | |||
text | The text content | 6 | string | Yes | |
type | The type of the content part | 6 | string | Yes | |
role | The role of the messages author, in this case system | 3 | string | Yes | |
name | An optional name for the participant. Provides the model information to differentiate between participants of the same role | 3 | string | ||
User message | Messages sent by an end user, containing prompts or additional context information | 2 | object | ||
content | The contents of the user message | 3 | string or array | Yes | |
Text content | The text contents of the message | 4 | string | ||
Array of content parts | An array of content parts with a defined type | 4 | array | Supported options differ based on the model being used to generate the response. Can contain text, image, or audio inputs | |
Text content part | 5 | object | |||
text | The text content | 6 | string | Yes | |
type | The type of the content part | 6 | string | Yes | |
Image content part | 5 | object | |||
image_url | 6 | object | Yes | ||
url | Either a URL of the image or the base64 encoded image data | 7 | string | Yes | |
detail | Specifies the detail level of the image | 7 | string | Defaults to auto | |
type | The type of the content part | 6 | string | Yes | |
role | The role of the messages author, in this case user | 3 | string | Yes | |
name | An optional name for the participant. Provides the model information to differentiate between participants of the same role | 3 | string | ||
Assistant message | Messages sent by the model in response to user messages | 2 | object | ||
role | The role of the messages author, in this case assistant | 3 | string | Yes | |
audio | Data about a previous audio response from the model | 3 | object or null | ||
id | Unique identifier for a previous audio response from the model | 4 | string | Yes | |
content | The contents of the assistant message | 3 | string or array | Required unless tool_calls or function_call is specified | |
Text content | The contents of the assistant message | 4 | string | ||
Array of content parts | An array of content parts with a defined type | 4 | array | Can be one or more of type text, or exactly one of type refusal | |
Text content part | 5 | object | |||
text | The text content | 6 | string | Yes | |
type | The type of the content part | 6 | string | Yes | |
Refusal content part | 5 | object | |||
refusal | The refusal message generated by the model | 6 | string | Yes | |
type | The type of the content part | 6 | string | Yes | |
function_call | Deprecated and replaced by tool_calls | 3 | object or null | The name and arguments of a function that should be called, as generated by the model | |
name | The name of the function to call | 4 | string | Yes | |
arguments | The arguments to call the function with, as generated by the model in JSON format | 4 | string | Yes | Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function |
name | An optional name for the participant. Provides the model information to differentiate between participants of the same role | 3 | string | ||
refusal | The refusal message by the assistant | 3 | string or null | ||
tool_calls | The tool calls generated by the model, such as function calls | 3 | array | ||
Function tool call | A call to a function tool created by the model | 4 | object | ||
function | The function that the model called | 5 | object | Yes | |
arguments | The arguments to call the function with, as generated by the model in JSON format | 6 | string | Yes | Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function |
name | The name of the function to call | 6 | string | Yes | |
id | The ID of the tool call | 5 | string | Yes | |
type | The type of the tool. Currently, only function is supported | 5 | string | Yes | |
Tool message | 2 | object | |||
content | The contents of the tool message | 3 | string or array | Yes | |
Text content | The contents of the tool message | 4 | string | ||
Array of content parts | An array of content parts with a defined type. For tool messages, only type text is supported | 4 | array | ||
Text content part | 5 | object | |||
text | The text content | 6 | string | Yes | |
type | The type of the content part | 6 | string | Yes | |
role | The role of the messages author, in this case tool | 3 | string | Yes | |
tool_call_id | Tool call that this message is responding to | 3 | string | Yes | |
model | Model ID used to generate the response, like gpt-4o or o3 | 1 | string | Yes | |
frequency_penalty | Number between -2.0 and 2.0. Defaults to 0 | 1 | number or null | Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim | |
logit_bias | Modify the likelihood of specified tokens appearing in the completion.Defaults to null | 1 | map | Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. | |
max_completion_tokens | An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. | 1 | integer or null | ||
n | How many chat completion choices to generate for each input message.Defaults to 1 | 1 | integer or null | Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. | |
parallel_tool_calls | Whether to enable parallel function calling during tool use.Defaults to true | 1 | boolean | ||
presence_penalty | Number between -2.0 and 2.0.Defaults to 0 | 1 | number or null | Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. | |
response_format | An object specifying the format that the model must output | 1 | object | ||
Text | Default response format. Used to generate text responses | 2 | object | ||
type | The type of response format being defined. Always text | 3 | string | Yes | |
JSON schema | JSON Schema response format. Used to generate structured JSON responses | 2 | object | ||
json_schema | Structured Outputs configuration options, including a JSON Schema | 3 | object | Yes | |
name | The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64 | 4 | string | Yes | |
description | A description of what the response format is for, used by the model to determine how to respond in the format | 4 | string | ||
schema | The schema for the response format, described as a JSON Schema object | 4 | object | ||
strict | Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when strict is true | 4 | boolean or null | ||
type | The type of response format being defined. Always json_schema | 3 | string | Yes | |
JSON object | JSON object response format | 2 | object | An older method of generating JSON responses. Using json_schema is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so | |
type | The type of response format being defined. Always json_object | 3 | string | Yes | |
seed | This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend | 1 | integer or null | ||
stop | Not supported with latest reasoning models o3 and o4-mini.Defaults to null | 1 | string/array/null | Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence | |
store | Whether or not to store the output of this chat completion request for use in our model distillation or evals products.Defaults to false | 1 | boolean or null | Supports text and image inputs. Note: image inputs over 8MB will be dropped | |
stream | If set to true, the model response data will be streamed to the client as it is generated using server-sent events.Defaults to false | 1 | boolean or null | ||
stream_options | Options for streaming response. Only set this when you set stream: true.Defaults to null | 1 | object or null | ||
include_obfuscation | When true, stream obfuscation will be enabled. Stream obfuscation adds random characters to an obfuscation field on streaming delta events to normalize payload sizes as a mitigation to certain side-channel attacks. These obfuscation fields are included by default, but add a small amount of overhead to the data stream | 2 | boolean | ||
include_usage | If set, an additional chunk will be streamed before the data: [DONE] message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array | 2 | boolean | All other chunks will also include a usage field, but with a null value. NOTE: If the stream is interrupted, you may not receive the final usage chunk which contains the total token usage for the request | |
temperature | What sampling temperature to use, between 0 and 2.Defaults to 1 | 1 | number or null | Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both | |
tool_choice | Controls which (if any) tool is called by the model | 1 | string or object | none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool | |
Tool choice mode | 2 | string | none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools | ||
Function tool choice | Specifies a tool the model should use. Use to force the model to call a specific function | 2 | object | ||
function | 3 | object | Yes | ||
name | The name of the function to call | 4 | string | Yes | |
type | For function calling, the type is always function | 3 | object | Yes | |
tools | A list of tools the model may call | 1 | array | ||
Function tool | A function tool that can be used to generate a response | 2 | object | ||
function | 3 | object | Yes | ||
name | The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64 | 4 | string | Yes | |
description | A description of what the function does, used by the model to choose when and how to call the function | 4 | string | ||
parameters | The parameters the functions accepts, described as a JSON Schema object. See the guide for examples, and the JSON Schema reference for documentation about the format | 4 | object | ||
strict | Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the parameters field | 4 | boolean or null | Only a subset of JSON Schema is supported when strict is true | |
type | The type of the tool. Currently, only function is supported | 3 | string | Yes | |
top_p | An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass | 1 | number or null | So 0.1 means only the tokens comprising the top 10% probability mass are considered |
Return Result
Returns a chat completion object. If streaming is enabled in the request, it returns a streaming sequence of chat completion chunk objects
Example Request and Response Result
Default
Example
curl
curl https://genaiapi.cloudsway.net/v1/ai/{ENDPOINT_PATH}/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {YOUR_ACCESS_KEY}" \
-d '{
"model": "gpt-5",
"messages": [
{
"role": "developer",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}'
python
from openai import OpenAI
client = OpenAI()
completion = client.chat.completions.create(
model="gpt-5",
messages=[
{"role": "developer", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
)
print(completion.choices[0].message)
node js
import OpenAI from "openai";
const openai = new OpenAI();
async function main() {
const completion = await openai.chat.completions.create({
messages: [{ role: "developer", content: "You are a helpful assistant." }],
model: "gpt-5",
store: true,
});
console.log(completion.choices[0]);
}
main();
csharp
using System;
using System.Collections.Generic;
using OpenAI.Chat;
ChatClient client = new(
model: "gpt-4.1",
apiKey: Environment.GetEnvironmentVariable("YOUR_ACCESS_KEY")
);
List messages =
[
new SystemChatMessage("You are a helpful assistant."),
new UserChatMessage("Hello!")
];
ChatCompletion completion = client.CompleteChat(messages);
Console.WriteLine(completion.Content[0].Text);
Response Result
{
"id": "chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT",
"object": "chat.completion",
"created": 1741569952,
"model": "gpt-4.1-2025-04-14",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I assist you today?",
"refusal": null,
"annotations": []
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 19,
"completion_tokens": 10,
"total_tokens": 29,
"prompt_tokens_details": {
"cached_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
},
"service_tier": "default"
}
Streaming Request
Example
curl
curl https://genaiapi.cloudsway.net/v1/ai/{ENDPOINT_PATH}/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {YOUR_ACCESS_KEY}" \
-d '{
"model": "gpt-5",
"messages": [
{
"role": "developer",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
],
"stream": true
}'
python
from openai import OpenAI
client = OpenAI()
completion = client.chat.completions.create(
model="gpt-5",
messages=[
{"role": "developer", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
stream=True
)
for chunk in completion:
print(chunk.choices[0].delta)
print(completion.choices[0].message)
node js
import OpenAI from "openai";
const openai = new OpenAI();
async function main() {
const completion = await openai.chat.completions.create({
model: "gpt-5",
messages: [
{"role": "developer", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
stream: true,
});
for await (const chunk of completion) {
console.log(chunk.choices[0].delta.content);
}
}
main();
csharp
using System;
using System.ClientModel;
using System.Collections.Generic;
using System.Threading.Tasks;
using OpenAI.Chat;
ChatClient client = new(
model: "gpt-4.1",
apiKey: Environment.GetEnvironmentVariable("{YOUR_ACCESS_KEY}")
);
List messages =
[
new SystemChatMessage("You are a helpful assistant."),
new UserChatMessage("Hello!")
];
AsyncCollectionResult completionUpdates = client.CompleteChatStreamingAsync(messages);
await foreach (StreamingChatCompletionUpdate completionUpdate in completionUpdates)
{
if (completionUpdate.ContentUpdate.Count > 0)
{
Console.Write(completionUpdate.ContentUpdate[0].Text);
}
}
Response Result
{"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-4o-mini", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}]}
{"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-4o-mini", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}]}
....
{"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-4o-mini", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]}
Functions
Example
curl
curl https://genaiapi.cloudsway.net/v1/ai/{ENDPOINT_PATH}/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {YOUR_ACCESS_KEY}" \
-d '{
"model": "gpt-4.1",
"messages": [
{
"role": "user",
"content": "What is the weather like in Boston today?"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": ["celsius", "fahrenheit"]
}
},
"required": ["location"]
}
}
}
],
"tool_choice": "auto"
}'
python
from openai import OpenAI
client = OpenAI()
tools = [
{
"type": "function",
"function": {
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA",
},
"unit": {"type": "string", "enum": ["celsius", "fahrenheit"]},
},
"required": ["location"],
},
}
}
]
messages = [{"role": "user", "content": "What's the weather like in Boston today?"}]
completion = client.chat.completions.create(
model="gpt-5",
messages=messages,
tools=tools,
tool_choice="auto"
)
print(completion)
node js
import OpenAI from "openai";
const openai = new OpenAI();
async function main() {
const messages = [{"role": "user", "content": "What's the weather like in Boston today?"}];
const tools = [
{
"type": "function",
"function": {
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA",
},
"unit": {"type": "string", "enum": ["celsius", "fahrenheit"]},
},
"required": ["location"],
},
}
}
];
const response = await openai.chat.completions.create({
model: "gpt-4.1",
messages: messages,
tools: tools,
tool_choice: "auto",
});
console.log(response);
}
main();
csharp
using System;
using System.Collections.Generic;
using OpenAI.Chat;
ChatClient client = new(
model: "gpt-4.1",
apiKey: Environment.GetEnvironmentVariable("{YOUR_ACCESS_KEY}")
);
ChatTool getCurrentWeatherTool = ChatTool.CreateFunctionTool(
functionName: "get_current_weather",
functionDescription: "Get the current weather in a given location",
functionParameters: BinaryData.FromString("""
{
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": [ "celsius", "fahrenheit" ]
}
},
"required": [ "location" ]
}
""")
);
List messages =
[
new UserChatMessage("What's the weather like in Boston today?"),
];
ChatCompletionOptions options = new()
{
Tools =
{
getCurrentWeatherTool
},
ToolChoice = ChatToolChoice.CreateAutoChoice(),
};
ChatCompletion completion = client.CompleteChat(messages, options);
Response Result
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1699896916,
"model": "gpt-4o-mini",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": null,
"tool_calls": [
{
"id": "call_abc123",
"type": "function",
"function": {
"name": "get_current_weather",
"arguments": "{\n\"location\": \"Boston, MA\"\n}"
}
}
]
},
"logprobs": null,
"finish_reason": "tool_calls"
}
],
"usage": {
"prompt_tokens": 82,
"completion_tokens": 17,
"total_tokens": 99,
"completion_tokens_details": {
"reasoning_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
}
}
Logprobs
Example
curl
curl https://genaiapi.cloudsway.net/v1/ai/{ENDPOINT_PATH}/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {YOUR_ACCESS_KEY}" \
-d '{
"model": "gpt-5",
"messages": [
{
"role": "user",
"content": "Hello!"
}
],
"logprobs": true,
"top_logprobs": 2
}'
python
from openai import OpenAI
client = OpenAI()
completion = client.chat.completions.create(
model="gpt-5",
messages=[
{"role": "user", "content": "Hello!"}
],
logprobs=True,
top_logprobs=2
)
print(completion.choices[0].message)
print(completion.choices[0].logprobs)
node js
import OpenAI from "openai";
const openai = new OpenAI();
async function main() {
const completion = await openai.chat.completions.create({
messages: [{ role: "user", content: "Hello!" }],
model: "gpt-5",
logprobs: true,
top_logprobs: 2,
});
console.log(completion.choices[0]);
}
main();
csharp
using System;
using System.Collections.Generic;
using OpenAI.Chat;
ChatClient client = new(
model: "gpt-4.1",
apiKey: Environment.GetEnvironmentVariable("{YOUR_ACCESS_KEY}")
);
List messages =
[
new UserChatMessage("Hello!")
];
ChatCompletionOptions options = new()
{
IncludeLogProbabilities = true,
TopLogProbabilityCount = 2
};
ChatCompletion completion = client.CompleteChat(messages, options);
Console.WriteLine(completion.Content[0].Text);
Response Result
{
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1702685778,
"model": "gpt-4o-mini",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I assist you today?"
},
"logprobs": {
"content": [
{
"token": "Hello",
"logprob": -0.31725305,
"bytes": [72, 101, 108, 108, 111],
"top_logprobs": [
{
"token": "Hello",
"logprob": -0.31725305,
"bytes": [72, 101, 108, 108, 111]
},
{
"token": "Hi",
"logprob": -1.3190403,
"bytes": [72, 105]
}
]
},
{
"token": "!",
"logprob": -0.02380986,
"bytes": [
33
],
"top_logprobs": [
{
"token": "!",
"logprob": -0.02380986,
"bytes": [33]
},
{
"token": " there",
"logprob": -3.787621,
"bytes": [32, 116, 104, 101, 114, 101]
}
]
},
{
"token": " How",
"logprob": -0.000054669687,
"bytes": [32, 72, 111, 119],
"top_logprobs": [
{
"token": " How",
"logprob": -0.000054669687,
"bytes": [32, 72, 111, 119]
},
{
"token": "<|end|>",
"logprob": -10.953937,
"bytes": null
}
]
},
{
"token": " can",
"logprob": -0.015801601,
"bytes": [32, 99, 97, 110],
"top_logprobs": [
{
"token": " can",
"logprob": -0.015801601,
"bytes": [32, 99, 97, 110]
},
{
"token": " may",
"logprob": -4.161023,
"bytes": [32, 109, 97, 121]
}
]
},
{
"token": " I",
"logprob": -3.7697225e-6,
"bytes": [
32,
73
],
"top_logprobs": [
{
"token": " I",
"logprob": -3.7697225e-6,
"bytes": [32, 73]
},
{
"token": " assist",
"logprob": -13.596657,
"bytes": [32, 97, 115, 115, 105, 115, 116]
}
]
},
{
"token": " assist",
"logprob": -0.04571125,
"bytes": [32, 97, 115, 115, 105, 115, 116],
"top_logprobs": [
{
"token": " assist",
"logprob": -0.04571125,
"bytes": [32, 97, 115, 115, 105, 115, 116]
},
{
"token": " help",
"logprob": -3.1089056,
"bytes": [32, 104, 101, 108, 112]
}
]
},
{
"token": " you",
"logprob": -5.4385737e-6,
"bytes": [32, 121, 111, 117],
"top_logprobs": [
{
"token": " you",
"logprob": -5.4385737e-6,
"bytes": [32, 121, 111, 117]
},
{
"token": " today",
"logprob": -12.807695,
"bytes": [32, 116, 111, 100, 97, 121]
}
]
},
{
"token": " today",
"logprob": -0.0040071653,
"bytes": [32, 116, 111, 100, 97, 121],
"top_logprobs": [
{
"token": " today",
"logprob": -0.0040071653,
"bytes": [32, 116, 111, 100, 97, 121]
},
{
"token": "?",
"logprob": -5.5247097,
"bytes": [63]
}
]
},
{
"token": "?",
"logprob": -0.0008108172,
"bytes": [63],
"top_logprobs": [
{
"token": "?",
"logprob": -0.0008108172,
"bytes": [63]
},
{
"token": "?\n",
"logprob": -7.184561,
"bytes": [63, 10]
}
]
}
]
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 9,
"total_tokens": 18,
"completion_tokens_details": {
"reasoning_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
},
"system_fingerprint": null
}