curl --request POST \
--url https://api.sierra.absconsulting.com/v1/chat/completions \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
{
"content": "<string>",
"role": "system"
}
],
"model": "<string>"
}
'{
"choices": [
{
"delta": {
"content": "<string>",
"role": "system"
},
"finish_reason": "<string>",
"index": 123,
"message": {
"content": "<string>",
"role": "system"
}
}
],
"created": 123,
"id": "<string>",
"model": "<string>",
"object": "<string>",
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123
}
}Send a request to an LLM to generate a completion. Refer to the /v1/chat/completions/models endpoint for supported models.
curl --request POST \
--url https://api.sierra.absconsulting.com/v1/chat/completions \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
{
"content": "<string>",
"role": "system"
}
],
"model": "<string>"
}
'{
"choices": [
{
"delta": {
"content": "<string>",
"role": "system"
},
"finish_reason": "<string>",
"index": 123,
"message": {
"content": "<string>",
"role": "system"
}
}
],
"created": 123,
"id": "<string>",
"model": "<string>",
"object": "<string>",
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123
}
}Access the API as yourself. You can find your API key in your profile menu in Portal.
The GEMS number of a project this request is associated with. Currently, this is only used for Royal Caribbean Group. Use 'NA' or leave blank if not associated with a specific project.
The completion request.
The messages array passed to the model. Messages are in the format of [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is the capital of France?"}].
Show child attributes
The model to use for completion.
The maximum number of tokens the model can generate in the completion response.
The response format to use for completion.
Show child attributes
If true, the response will be streamed back as it is generated, allowing for real-time output. If false, the complete response is returned after generation finishes.
Controls the randomness of the model's output. Lower values (e.g., 0.2) make the output more deterministic and focused, while higher values (e.g., 1.0) make it more creative and varied. The accepted range typically is dependent on the model. It is often between 0.0-2.0. Model-specific defaults apply if not provided.
Was this page helpful?