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
The unique identifier of the AI model to use for completion.
Body
streambooleanOptional
max_tokensinteger · int32 | nullableOptional
Responses
200
Successfully generated chat completion response
application/json
400
Invalid request - token limit exceeded or malformed input
application/json
401
Unauthorized
application/json
402
Insufficient credits to process the request
application/json
403
Forbidden
application/json
404
Specified model not found
application/json
500
Internal server error during processing
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: 126
{
"messages": [
{
"role": "text",
"content": "text"
}
],
"stream": true,
"response_format": {
"type": "text",
"schema": "text"
},
"max_tokens": 1
}{
"id": "text",
"model": "text",
"choices": [
{
"index": 1,
"message": {
"role": "text",
"content": "text"
},
"finishReason": "text"
}
],
"usage": {
"promptTokens": 1,
"completionTokens": 1,
"totalTokens": 1
}
}