LogoTARS

API Reference

Technical specification for AI microservice.

API Reference

The Tars AI service provides a unified interface for LLM text generation and image creation. All requests must be sent as JSON.

Image Generation

Endpoint for high-resolution image synthesis using FLUX.2-dev.

  • URL: /generate-image
  • Method: POST
  • Model: black-forest-labs/FLUX.2-dev

Body Parameters

PropertyTypeRequiredDescription
promptstringYesText description of the image to be generated.

Response Schema

PropertyTypeDescription
successbooleanIndicates if the generation was successful.
base64stringBase64 encoded string of the generated image.
mimeTypestringThe MIME type of the image (e.g., image/png).

Chat Completions

Streaming endpoint for multi-provider text generation.

  • URL: /chat
  • Method: POST
  • Protocol: Server-Sent Events (SSE)

Body Parameters

PropertyTypeRequiredDescription
messagesarrayYesArray of message objects: { role, content }.

Example Request

curl -X POST https://ai-service.tarsdevs.com/chat \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      { "role": "user", "content": "Explain quantum computing." }
    ]
  }'

User Management

Direct access to the PostgreSQL user directory.

List Users

  • URL: /users
  • Method: GET

Create User

  • URL: /users
  • Method: POST
  • Body: { "name": "string", "email": "string" }

Delete User

  • URL: /users/:id
  • Method: DELETE

Get User

  • URL: /users/:id
  • Method: GET

On this page