Skip to main content
POST
/
api
/
beta
/
amberai
/
chat
/
completions
import requests

response = requests.request(
    "POST",
    "https://customerDomain.ambersearch.de/api/beta/amberai/chat/completions",
    headers={
        "Authorization": "Bearer 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>",
  "created": 123,
  "model": "<string>",
  "choices": [
    "<unknown>"
  ],
  "usage": {},
  "object": "chat.completion",
  "service_tier": "default",
  "system_fingerprint": "default"
}
import requests

response = requests.request(
    "POST",
    "https://customerDomain.ambersearch.de/api/beta/amberai/chat/completions",
    headers={
        "Authorization": "Bearer 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?",
            },
        ],
    },
)

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
messages
(ChatCompletionRequestSystemMessage · object | ChatCompletionRequestUserMessage · object | ChatCompletionRequestAssistantMessage · object)[]
required
model
string
required
stream
boolean
default:false
temperature
number
default:1
metadata
Metadata · object
tools
Tool · object[]
Maximum array length: 1

Response

Successful Response

id
string
required
created
integer
required
model
string
required
choices
any[]
required
usage
Usage · object
required
object
string
default:chat.completion
service_tier
string
default:default
system_fingerprint
string
default:default