import requestsresponse = requests.request( "POST", "https://customerDomain.ambersearch.de/api/beta/amberai/chat/completions", headers={ "Authorization": "Bearer ambrs-exampletoken" }, json={ "model": "azure/gpt-5.4", "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?", }, ], },)
import requestsresponse = requests.request( "POST", "https://customerDomain.ambersearch.de/api/beta/amberai/chat/completions", headers={ "Authorization": "Bearer ambrs-exampletoken" }, json={ "model": "azure/gpt-5.4", "temperature": 0.7, "stream": True, "tools": [], "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the capital of France?" } ] })
import requestsresponse = requests.request( "POST", "https://customerDomain.ambersearch.de/api/beta/amberai/chat/completions", headers={ "Authorization": "Bearer ambrs-exampletoken" }, json={ "model": "azure/gpt-5.4", "temperature": 0.7, "stream": False, "tools": [ { "function": { "name": "amberSearch" } } ], "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What are the credentials for the postman development environment?" } ] })
{ "id": "3f2b8c1e-6a4d-4e9b-9c2f-1d7e5a8b0c3d", "object": "chat.completion", "created": 1782397258, "model": "azure/gpt-5.4", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "In summer, a picnic along the Seine or in one of the city's parks is a great choice ...", "refusal": null, "annotations": [] }, "logprobs": null, "finish_reason": "stop" } ], "usage": {}, "service_tier": "default", "system_fingerprint": "default"}
data: {"id":"3f2b8c1e-6a4d-4e9b-9c2f-1d7e5a8b0c3d","object":"chat.completion.chunk","created":1782397258,"model":"azure/gpt-5.4","system_fingerprint":"default","choices":[{"index":0,"delta":{"content":"The","role":"assistant"},"logprobs":null,"finish_reason":null}]}data: {"id":"3f2b8c1e-6a4d-4e9b-9c2f-1d7e5a8b0c3d","object":"chat.completion.chunk","created":1782397258,"model":"azure/gpt-5.4","system_fingerprint":"default","choices":[{"index":0,"delta":{"content":" capital of France is Paris."},"logprobs":null,"finish_reason":null}]}data: {"id":"3f2b8c1e-6a4d-4e9b-9c2f-1d7e5a8b0c3d","object":"chat.completion.chunk","created":1782397258,"model":"azure/gpt-5.4","system_fingerprint":"default","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]}
{ "id": "8c0d1f2a-4b3e-4f5a-9e6d-7c8b9a0f1e2d", "object": "chat.completion", "created": 1782397258, "model": "azure/gpt-5.4", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "The Paris Plages festival takes place along the Seine every summer ([Paris Plages](https://www.paris.fr/pages/paris-plages-2296)).", "refusal": null, "annotations": [ { "type": "url_citation", "url_citation": { "end_index": 129, "start_index": 67, "title": "Paris Plages", "url": "https://www.paris.fr/pages/paris-plages-2296" } } ] }, "logprobs": null, "finish_reason": "stop" } ], "usage": {}, "service_tier": "default", "system_fingerprint": "default"}
OpenAI-like Endpoints
Create chat completion
Create a chat completion based on the provided messages and parameters.
This endpoint generates responses using the specified model and conversation history. You can also utilize tools and agents to enhance the response generation.
POST
/
api
/
beta
/
amberai
/
chat
/
completions
import requestsresponse = requests.request( "POST", "https://customerDomain.ambersearch.de/api/beta/amberai/chat/completions", headers={ "Authorization": "Bearer ambrs-exampletoken" }, json={ "model": "azure/gpt-5.4", "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?", }, ], },)
import requestsresponse = requests.request( "POST", "https://customerDomain.ambersearch.de/api/beta/amberai/chat/completions", headers={ "Authorization": "Bearer ambrs-exampletoken" }, json={ "model": "azure/gpt-5.4", "temperature": 0.7, "stream": True, "tools": [], "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the capital of France?" } ] })
import requestsresponse = requests.request( "POST", "https://customerDomain.ambersearch.de/api/beta/amberai/chat/completions", headers={ "Authorization": "Bearer ambrs-exampletoken" }, json={ "model": "azure/gpt-5.4", "temperature": 0.7, "stream": False, "tools": [ { "function": { "name": "amberSearch" } } ], "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What are the credentials for the postman development environment?" } ] })
{ "id": "3f2b8c1e-6a4d-4e9b-9c2f-1d7e5a8b0c3d", "object": "chat.completion", "created": 1782397258, "model": "azure/gpt-5.4", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "In summer, a picnic along the Seine or in one of the city's parks is a great choice ...", "refusal": null, "annotations": [] }, "logprobs": null, "finish_reason": "stop" } ], "usage": {}, "service_tier": "default", "system_fingerprint": "default"}
data: {"id":"3f2b8c1e-6a4d-4e9b-9c2f-1d7e5a8b0c3d","object":"chat.completion.chunk","created":1782397258,"model":"azure/gpt-5.4","system_fingerprint":"default","choices":[{"index":0,"delta":{"content":"The","role":"assistant"},"logprobs":null,"finish_reason":null}]}data: {"id":"3f2b8c1e-6a4d-4e9b-9c2f-1d7e5a8b0c3d","object":"chat.completion.chunk","created":1782397258,"model":"azure/gpt-5.4","system_fingerprint":"default","choices":[{"index":0,"delta":{"content":" capital of France is Paris."},"logprobs":null,"finish_reason":null}]}data: {"id":"3f2b8c1e-6a4d-4e9b-9c2f-1d7e5a8b0c3d","object":"chat.completion.chunk","created":1782397258,"model":"azure/gpt-5.4","system_fingerprint":"default","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]}
{ "id": "8c0d1f2a-4b3e-4f5a-9e6d-7c8b9a0f1e2d", "object": "chat.completion", "created": 1782397258, "model": "azure/gpt-5.4", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "The Paris Plages festival takes place along the Seine every summer ([Paris Plages](https://www.paris.fr/pages/paris-plages-2296)).", "refusal": null, "annotations": [ { "type": "url_citation", "url_citation": { "end_index": 129, "start_index": 67, "title": "Paris Plages", "url": "https://www.paris.fr/pages/paris-plages-2296" } } ] }, "logprobs": null, "finish_reason": "stop" } ], "usage": {}, "service_tier": "default", "system_fingerprint": "default"}
import requestsresponse = requests.request( "POST", "https://customerDomain.ambersearch.de/api/beta/amberai/chat/completions", headers={ "Authorization": "Bearer ambrs-exampletoken" }, json={ "model": "azure/gpt-5.4", "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?", }, ], },)
import requestsresponse = requests.request( "POST", "https://customerDomain.ambersearch.de/api/beta/amberai/chat/completions", headers={ "Authorization": "Bearer ambrs-exampletoken" }, json={ "model": "azure/gpt-5.4", "temperature": 0.7, "stream": True, "tools": [], "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the capital of France?" } ] })
import requestsresponse = requests.request( "POST", "https://customerDomain.ambersearch.de/api/beta/amberai/chat/completions", headers={ "Authorization": "Bearer ambrs-exampletoken" }, json={ "model": "azure/gpt-5.4", "temperature": 0.7, "stream": False, "tools": [ { "function": { "name": "amberSearch" } } ], "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What are the credentials for the postman development environment?" } ] })
{ "id": "3f2b8c1e-6a4d-4e9b-9c2f-1d7e5a8b0c3d", "object": "chat.completion", "created": 1782397258, "model": "azure/gpt-5.4", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "In summer, a picnic along the Seine or in one of the city's parks is a great choice ...", "refusal": null, "annotations": [] }, "logprobs": null, "finish_reason": "stop" } ], "usage": {}, "service_tier": "default", "system_fingerprint": "default"}
data: {"id":"3f2b8c1e-6a4d-4e9b-9c2f-1d7e5a8b0c3d","object":"chat.completion.chunk","created":1782397258,"model":"azure/gpt-5.4","system_fingerprint":"default","choices":[{"index":0,"delta":{"content":"The","role":"assistant"},"logprobs":null,"finish_reason":null}]}data: {"id":"3f2b8c1e-6a4d-4e9b-9c2f-1d7e5a8b0c3d","object":"chat.completion.chunk","created":1782397258,"model":"azure/gpt-5.4","system_fingerprint":"default","choices":[{"index":0,"delta":{"content":" capital of France is Paris."},"logprobs":null,"finish_reason":null}]}data: {"id":"3f2b8c1e-6a4d-4e9b-9c2f-1d7e5a8b0c3d","object":"chat.completion.chunk","created":1782397258,"model":"azure/gpt-5.4","system_fingerprint":"default","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]}
{ "id": "8c0d1f2a-4b3e-4f5a-9e6d-7c8b9a0f1e2d", "object": "chat.completion", "created": 1782397258, "model": "azure/gpt-5.4", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "The Paris Plages festival takes place along the Seine every summer ([Paris Plages](https://www.paris.fr/pages/paris-plages-2296)).", "refusal": null, "annotations": [ { "type": "url_citation", "url_citation": { "end_index": 129, "start_index": 67, "title": "Paris Plages", "url": "https://www.paris.fr/pages/paris-plages-2296" } } ] }, "logprobs": null, "finish_reason": "stop" } ], "usage": {}, "service_tier": "default", "system_fingerprint": "default"}
The conversation so far. Supported roles are system, user and assistant; messages with other roles (e.g. developer) are ignored. content can be a string or a list of text parts, which are joined. At least one user or assistant message is required.
ID of the model to use, as returned by GET /api/beta/amberai/models. Required and validated even if metadata.agent_id is set (an unavailable model returns 404); the agent's model is then used instead.
If true, the response is streamed as server-sent events containing chat.completion.chunk objects. The last chunk has finish_reasonstop; no [DONE] message is sent.
amber tools the model may use, identified by function.name: amberSearch (alias amber_search) or webSearch (alias web_search). The names deepResearch, outlook, imageGeneration, videoGeneration and canvas are also accepted but not officially supported via the API. Unknown names are ignored. Replaced by the agent's tools if metadata.agent_id is set.