Skip to main content
POST
/
api
/
v1
/
ai
/
complete
AI Completion
curl --request POST \
  --url https://api.dualship.run/api/v1/ai/complete \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "messages": [
    {
      "content": "<string>",
      "role": "system"
    }
  ],
  "workspace_id": "<string>",
  "max_tokens": 8192,
  "model": "<string>",
  "stream": true,
  "temperature": 1
}
'
{
  "content": "<string>",
  "finish_reason": "<string>",
  "input_tokens": 123,
  "model": "<string>",
  "output_tokens": 123
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication

Body

application/json

Completion request

messages
object[]
required
Minimum array length: 1
workspace_id
string
required
max_tokens
integer
Required range: 1 <= x <= 16384
model
string
stream
boolean
temperature
number
Required range: 0 <= x <= 2

Response

Completion response

content
string
finish_reason
string
input_tokens
integer
model
string
output_tokens
integer