GPT 4o Mini Search Preview
Model Overview
A specialized model trained to understand and execute web search queries with the Chat completions API.
API Schema
post
Body
modelstring · enumRequiredPossible values:
max_tokensnumber · min: 1Optional
The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API.
streambooleanOptionalDefault:
If set to True, the model response data will be streamed to the client as it is generated using server-sent events.
falseResponses
200Success
idstringRequiredExample:
A unique identifier for the chat completion.
chatcmpl-CQ9FPg3osank0dx0k46Z53LTqtXMlobjectstring · enumRequiredExample:
The object type.
chat.completionPossible values: creatednumberRequiredExample:
The Unix timestamp (in seconds) of when the chat completion was created.
1762343744modelstringRequiredExample:
The model used for the chat completion.
gpt-4o-mini-search-previewpost/v1/chat/completions
curl -L \
--request POST \
--url 'https://api.aimlapi.com/v1/chat/completions' \
--header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-4o-mini-search-preview",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}'200Success
{
"id": "chatcmpl-CQ9FPg3osank0dx0k46Z53LTqtXMl",
"object": "chat.completion",
"created": 1762343744,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm just a program, so I don't have feelings, but I'm here and ready to help you. How can I assist you today?",
"refusal": null,
"annotations": null,
"audio": null,
"tool_calls": null
},
"finish_reason": "stop",
"logprobs": null
}
],
"model": "gpt-4o-mini-search-preview",
"usage": {
"prompt_tokens": 137,
"completion_tokens": 914,
"total_tokens": 1051,
"completion_tokens_details": null,
"prompt_tokens_details": null
},
"meta": {
"usage": {
"credits_used": 120000,
"usd_spent": 0.06
}
}
}Code Example
Last updated
Was this helpful?