gpt-4o-mini-search-preview
Model Overview
A specialized model trained to understand and execute web search queries with the Chat completions API.
How to Make a Call
API Schema
Creates a chat completion using a language model, allowing interactive conversation by predicting the next response based on the given chat history. This is useful for AI-driven dialogue systems and virtual assistants.
Authorizations
Body
modelundefined · enumRequiredPossible values:
max_tokensnumber · min: 1OptionalDefault:
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.
512
streambooleanOptionalDefault:
If set to True, the model response data will be streamed to the client as it is generated using server-sent events.
false
Responses
201Success
201Success
No content
Code Example
import requests
response = requests.post(
"https://api.aimlapi.com/v1/chat/completions",
headers={
"Content-Type":"application/json",
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
"Authorization":"Bearer <YOUR_AIMLAPI_KEY>",
"Content-Type":"application/json"
},
json={
"model":"gpt-4o-mini-search-preview",
"messages":[
{
"role":"user",
# Insert your question for the model here, instead of Hello:
"content":"Hello"
}
]
}
)
data = response.json()
print(data)
Last updated
Was this helpful?