Skip to main content
POST
/
v1
/
chat
/
completions
cURL
curl --request POST \
  --url https://api.shuttleai.com/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "shuttle-3.5",
  "messages": [
    {
      "role": "system",
      "content": "<string>",
      "name": "<string>"
    }
  ],
  "stream": true,
  "stream_options": {
    "include_usage": true
  },
  "max_tokens": 2,
  "temperature": 1,
  "frequency_penalty": 0,
  "presence_penalty": 0,
  "top_p": 0.5,
  "stop": "<string>",
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "<string>",
        "description": "<string>",
        "parameters": {}
      }
    }
  ],
  "tool_choice": "none",
  "response_format": {
    "type": "text"
  },
  "reasoning_effort": "none"
}'
{
  "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,
    "completions_tokens_details": {
      "reasoning_tokens": 123
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer token must be a valid Shuttle API key. All keys are prefixed with shuttle-. Example: Bearer shuttle-abc123def456ghi789jkl012mno345pq

Body

application/json
model
string
required

ID of the model to use.

Example:

"shuttle-3.5"

messages
object[]
required

A list of messages comprising the conversation so far.

Minimum length: 1
  • Option 1
  • Option 2
  • Option 3
  • Option 4
stream
boolean | null

If set, tokens will be sent as server-sent events as they become available.

stream_options
object
max_tokens
integer | null

The maximum number of tokens the model can generate.

Required range: x >= 1
temperature
number | null
Required range: 0 <= x <= 2
frequency_penalty
number | null
Required range: -2 <= x <= 2
presence_penalty
number | null
Required range: -2 <= x <= 2
top_p
number | null
Required range: 0 <= x <= 1
stop
tools
object[] | null
  • Option 1
  • Option 2
tool_choice
default:auto

Controls which (if any) tool is called by the model.

Available options:
none,
auto
response_format
object
  • Option 1
  • Option 2
reasoning_effort
enum<string> | null

Specifies the amount of deliberate reasoning the model should apply.

Available options:
none,
minimal,
low,
medium,
high

Response

200 - application/json

Model response

id
string
object
string
created
integer
model
string
choices
object[]
usage
object