Build with Ethical AI

Full-featured API access to Thaura's AI capabilities. Image analysis and document parsing - all with privacy by design.

API Illustration

Quick Start Guide

Get up and running with the Thaura Partner API in minutes

1

Authentication

All requests must include an Authorization header with your API key:

Authorization: Bearer YOUR_API_KEY

API Access

Create your API key in Settings → API → API Keys to get started with the Thaura API.

Prepaid Billing

Pay only for what you use: $0.50 per million input tokens, $2.00 per million output tokens. Add funds in Settings → API → Billing.

2

Inference Endpoint

Simplified Attachments

Now supports sending attachments as simple base64 strings! No need for complex object structures.

POST
/v1/chat/completions

Request Parameters:

Required
messagesMessage array. Can include custom system prompts via system role messages. Default: "You are Thaura, an ethical AI assistant."
Optional
modelModel to use - only "thaura" is supported (default: "thaura"). Other model names will return an error.
Optional
streamEnable SSE streaming (default: false)
Optional
temperatureControl response creativity (0.0-2.0, default: 0.7)
Optional
attachmentsFile attachments - simple base64 string or array (images, PDFs, audio)
Optional
max_tokensMaximum tokens to generate
Optional
response_formatControl output format (e.g., JSON-only responses)
Optional
toolsArray of function/tool definitions with JSON schemas for function calling
Optional
tool_choiceControl tool usage: "auto" (default), "required", "none", or specific tool name
Optional
parallel_tool_callsEnable/disable parallel function calling (boolean)
3

Response Formats

Non-Streaming Response (Thaura Format):

{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "created": 1234567890,
  "model": "thaura",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "The AI response text..."
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 52,
    "completion_tokens": 18,
    "total_tokens": 70
  }
}

Streaming Response (Thaura SSE Format):

data: {"id":"chatcmpl-...","object":"chat.completion.chunk","created":1234567890,"model":"thaura","choices":[{"index":0,"delta":{"content":"Response "},"finish_reason":null}]}
data: {"id":"chatcmpl-...","object":"chat.completion.chunk","created":1234567890,"model":"thaura","choices":[{"index":0,"delta":{"content":"text..."},"finish_reason":null}]}
data: {"id":"chatcmpl-...","object":"chat.completion.chunk","created":1234567890,"model":"thaura","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}
data: [DONE]

Streaming with Token Usage:

// Token usage is included in the final streaming chunk
data: {"id":"chatcmpl-...","object":"chat.completion.chunk","created":1234567890,"model":"thaura","choices":[{"index":0,"delta":{"content":"text"},"finish_reason":null}]}
...
data: {"id":"chatcmpl-...","object":"chat.completion.chunk","created":1234567890,"model":"thaura","choices":[{"index":0,"delta":{},"finish_reason":"stop"}],"usage":{"prompt_tokens":52,"completion_tokens":18,"total_tokens":70}}
data: [DONE]

// To enable usage in streaming, include:
{
  "stream": true,
  "stream_options": { "include_usage": true }
}

Error Response:

{
  "error": "Error message"
}

// Status Codes:
// 400: Invalid request
// 401: Invalid API key
// 500: Internal error

Code Examples

Ready-to-use examples for common use cases

Simple Question
Basic API call with a simple question
curl -X POST https://backend.thaura.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {"role": "system", "content": "You are an ethical AI assistant"},
      {"role": "user", "content": "What is 2+2?"}
    ],
    "stream": true
  }'

Thaura CLI

All API functionalities included in a powerful command-line interface. Available for macOS and Linux.

macOS
Linux

Install with one command

curl -fsSL https://thaura.ai/downloads/install.sh | bash

The installer automatically detects your platform and architecture (x64/arm64)

Start Building with Ethical AI Today

Create your API keys instantly in Settings and start building with Thaura AI.