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

      POST
      https://api.genxt.ai/api/chat
      This endpoint facilitates the generation of the next message in a conversation using a specified AI model. It supports maintaining a chat history to provide context to the model. The endpoint also supports streaming responses, which 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 the next message in the chat with model statistics and response data.
      application/json
      Bodyapplication/json

      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location 'https://api.genxt.ai/api/chat' \
      --header 'Authorization: Bearer <token>' \
      --header 'Content-Type: application/json' \
      --data '{
          "model": "string",
          "messages": [
              {
                  "role": "string",
                  "content": "string",
                  "images": [
                      "string"
                  ]
              }
          ],
          "stream": true
      }'
      Response Response Example
      {
          "model": "string",
          "created_at": "2019-08-24T14:15:22.123Z",
          "message": {
              "role": "string",
              "content": "string"
          },
          "done": true,
          "total_duration": 0
      }
      Modified at 2024-11-25 19:58:30
      Previous
      Generate a completion
      Next
      List Local Models
      Built with