Skip to main content
POST
/
api
/
v1
/
{workspaceID}
/
playground
/
chat
/
completions
Playground chat completion
curl --request POST \
  --url https://ai.liara.ir/api/v1/{workspaceID}/playground/chat/completions \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "messages": [
    {
      "content": "<string>"
    }
  ],
  "stream": false,
  "temperature": 123,
  "max_tokens": 123,
  "tools": [
    {}
  ]
}
'
{}

Authorizations

Authorization
string
header
required

Enter the token with the Bearer: prefix, e.g. "Bearer abcde12345"

Path Parameters

workspaceID
string
required

The workspace ID

Pattern: ^[a-f0-9]{24}$

Body

application/json
model
string
required

Model ID

messages
object[]
required
stream
boolean
default:false
temperature
number
max_tokens
integer
tools
object[]

Response

Successful response (non-streaming)

The response is of type object.