amberSearch and webSearch, to enhance your application’s capabilities.
The base URL for the API is:
Supported Endpoints
- GET /models
- GET /models/
- POST /chat/completions
Authentication
Authorization for the endpoints is the same as other Endpoints. You need to provide an API key in theAuthorization header of your request. The API key should be prefixed with Bearer .
Models
Model endpoints are for getting the model identifiers, which are needed to create chat completions. Each model has a unique identifier, and you can retrieve the list of available models or details about a specific model using the following endpoints:GET /modelsto list all available models.GET /models/{model}to get details about a specific model.
amberai version of the model. To do this, simply append -amberai to the model identifier. For example, if you want to use the gpt-4o model with amberSearch, you would use gpt-4o-amberai. The amberai version of the model is optimized with our custom instructions, providing a better experience for your applications if you just want to use it without any modifications.
Chat Completions
The chat completions endpoint is used to generate responses based on a given set of messages. For getting chat completions, you can specify the model you want to use, the messages that form the conversation, and various parameters to control the generation process. Let’s take a look at the endpoints:Create Chat Completion
The endpoint for creating chat completions is:- messages:
list - model:
str - stream:
bool - temperature:
float - metadata:
dict - tools:
list
Messages
We follow the same structure as OpenAI for the messages parameter, which is a list of message objects. Each message object should have arole and content. The roles can be one of the following:
systemuserassistant
Tools
We have two tools supported at the moment:amberSearch and webSearch. The amberSearch tool is enabled by default unless you pass an empty array to the tools parameter.
To specify which tool to be used, simply pass it in the request body as follows:
Agents
To create chat completions with an agent, you need to specify the agent ID in the metadata of the request body as follows:Language
To specify which language your messages are in, you can use thelanguage parameter in the metadata of the request body as follows:
language parameter is de (German). If you don’t specify it, the system will assume that the messages are in German. If you want to use English, you need to explicitly set the language parameter to en.
