Completions
Sends a chat completion request to generate AI responses based on the provided messages. Supports both streaming and non-streaming modes with automatic token billing.
Authorizations
AuthorizationstringRequired
Bearer authentication with JWT
Path parameters
modelIdentifierstring · uuidRequired
Body
streambooleanOptional
max_tokensinteger · int32 · nullableOptional
sourcestring · nullableOptional
Responses
200
OK
application/json
idstring · nullableOptional
modelstring · nullableOptional
400
Bad Request
application/json
401
Unauthorized
application/json
402
Payment Required
application/json
403
Forbidden
application/json
404
Not Found
application/json
500
Internal Server Error
post/inference/completions/{modelIdentifier}
POST /inference/completions/{modelIdentifier} HTTP/1.1
Host: api.example.uk.jylo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 318
{
"messages": [
{
"role": "text",
"content": "text",
"tool_call_id": "text",
"tool_calls": [
{
"id": "text",
"type": "text",
"function": {
"name": "text",
"arguments": "text"
}
}
]
}
],
"stream": true,
"response_format": {
"type": "text",
"schema": "text"
},
"max_tokens": 1,
"tools": [
{
"name": "text",
"description": "text",
"parameters": null
}
],
"source": "text"
}{
"id": "text",
"model": "text",
"choices": [
{
"index": 1,
"message": {
"role": "text",
"content": "text",
"tool_call_id": "text",
"tool_calls": [
{
"id": "text",
"type": "text",
"function": {
"name": "text",
"arguments": "text"
}
}
]
},
"finishReason": "text"
}
],
"usage": {
"promptTokens": 1,
"completionTokens": 1,
"totalTokens": 1
}
}Last updated
