import requests
response = requests.request(
"POST",
"https://customerDomain.ambersearch.com/api/beta/amberai/chat/completions",
headers={
"Authorization": "ambrs-exampletoken"
},
json={
"model": "azure-gpt-4o",
"temperature": 0.7,
"stream": false,
"tools": [],
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What would be the best activity to do in summer in Paris?"
}
]
}
)
{
"id": "<string>",
"object": "chat.completion",
"created": 123,
"model": "<string>",
"choices": [
"<any>"
],
"usage": {},
"service_tier": "default",
"system_fingerprint": "default"
}
Create chat completion
import requests
response = requests.request(
"POST",
"https://customerDomain.ambersearch.com/api/beta/amberai/chat/completions",
headers={
"Authorization": "ambrs-exampletoken"
},
json={
"model": "azure-gpt-4o",
"temperature": 0.7,
"stream": false,
"tools": [],
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What would be the best activity to do in summer in Paris?"
}
]
}
)
{
"id": "<string>",
"object": "chat.completion",
"created": 123,
"model": "<string>",
"choices": [
"<any>"
],
"usage": {},
"service_tier": "default",
"system_fingerprint": "default"
}
import requests
response = requests.request(
"POST",
"https://customerDomain.ambersearch.com/api/beta/amberai/chat/completions",
headers={
"Authorization": "ambrs-exampletoken"
},
json={
"model": "azure-gpt-4o",
"temperature": 0.7,
"stream": false,
"tools": [],
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What would be the best activity to do in summer in Paris?"
}
]
}
)
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Successful Response
The response is of type object
.