GENXT Confidential LLM API
    • Server attestation
      POST
    • Generate a completion
      POST
    • Generate a chat completion
      POST
    • List Local Models
      GET
    • Show Model Information
      POST
    • Generate Embeddings
      POST
    • OpenAI compatible endpoints
      POST

      Generate a completion

      POST
      https://api.genxt.ai/api/generate
      This endpoint generates a text completion based on a given prompt using a specified AI model. It can optionally accept base64-encoded images for multimodal model interactions. The endpoint supports streaming responses where the result is delivered in a series of messages; this can be disabled to receive a single response object.

      Request

      Authorization
      Provide your bearer token in the
      Authorization
      header when making requests to protected resources.
      Example:
      Authorization: Bearer ********************
      Body Params application/json

      Examples

      Responses

      🟢200Successfully generated completion with model statistics and response data.
      application/json
      Bodyapplication/json

      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location 'https://api.genxt.ai/api/generate' \
      --header 'Authorization: Bearer <token>' \
      --header 'Content-Type: application/json' \
      --data '{
          "model": "string",
          "prompt": "string",
          "images": [
              "string"
          ],
          "options": {},
          "stream": true
      }'
      Response Response Example
      {
          "model": "string",
          "created_at": "2019-08-24T14:15:22.123Z",
          "response": "string",
          "done": true,
          "total_duration": 0,
          "load_duration": 0,
          "eval_count": 0,
          "eval_duration": 0,
          "context": [
              0
          ]
      }
      Modified at 2024-11-25 19:58:23
      Previous
      Server attestation
      Next
      Generate a chat completion
      Built with