POST
/
v1
/
chat
/
completions
curl --request POST \
  --url https://api.shuttleai.com/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "<string>",
  "messages": [
    {
      "role": "<string>",
      "content": "<string>"
    }
  ],
  "max_tokens": 123,
  "temperature": 123,
  "top_p": 123,
  "tools": [
    {
      "type": "<string>",
      "function": {
        "name": "<string>",
        "parameters": {}
      }
    }
  ],
  "tool_choice": "<string>",
  "internet": true,
  "citations": true,
  "tone": "<string>",
  "raw": true,
  "image": "<string>"
}'
{
  "id": "<string>",
  "object": "<string>",
  "created": 123,
  "model": "<string>",
  "choices": [
    {
      "index": 123,
      "logprobs": {},
      "finish_reason": "<string>",
      "message": {
        "content": "<string>",
        "role": "<string>"
      }
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123
  },
  "system_fingerprint": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
model
string
required

The id of the model to use for the generation

messages
object[]
required

The list of messages to generate a response for. The last message is the prompt.

max_tokens
integer

The maximum number of tokens to generate

temperature
number

The temperature of the sampling distribution

top_p
number

The cumulative probability of the top tokens to keep in the nucleus of the distribution

tools
object[]

The list of tools to use for the generation

tool_choice

Defaults to auto for automatic tool choice

internet
boolean

Whether to use the internet for the generation > Model limitations apply, defaults to true for bing models.

citations
boolean

Whether to include citations in the generation > For use in owned_by: bing/openai models only, defaults to true.

tone
string

The tone of the generation > For use in owned_by: bing/openai models only, defaults to precise.

raw
boolean

Whether to return the raw response > For use in owned_by: bing/openai models only! Returns Bing AI Suggestions and Search Results, defaults to false.

image

The url of the image to use for the generation > Model limitations apply

Response

200 - application/json
Model response
id
string
object
string
created
integer
model
string
choices
object[]
usage
object
system_fingerprint
string