For the complete documentation index, see llms.txt. This page is also available as Markdown.

Completions

Creates a new chat completion response

post

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
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