Build with AI that refuses to be weaponized.

Full API access to Thaura: chat, vision, document parsing, and speech-to-text. Ethics, not extraction. It never trains on your data, and never will.

API Illustration

Quick Start Guide

Get up and running with the Thaura 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. Audio transcription is $0.006 per audio minute.

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 for chat (default: "thaura"). Other names return 400 invalid_model. Note that /v1/models also lists "thaura-whisper", which is the transcription model for /v1/audio/transcriptions and is not valid here, so pin your client to "thaura" rather than letting it pick from the model list.
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 (deprecated name, still fully supported). Capped at 32000. If both this and max_completion_tokens are sent, max_completion_tokens wins.
Optional
max_completion_tokensMaximum tokens to generate. The current OpenAI SDK sends this name; it takes precedence over max_tokens. Capped at 32000.
Optional
response_formatControl output format (e.g., JSON-only responses)
Optional
toolsArray of function/tool definitions with JSON schemas for function calling. Parallel tool calls, 30+ tool payloads, nested/enum/array argument schemas and strict:true schemas are all supported. When the model calls a tool, finish_reason is "tool_calls"; when streaming, each tool_calls delta carries an index so the OpenAI SDK can reassemble it.
Optional
tool_choiceControl tool usage: "auto" (default), "required", "none", or {"type":"function","function":{"name":"..."}} for a specific tool. "none" returns ordinary prose and never calls a tool.
Optional
parallel_tool_callsEnable/disable parallel function calling (boolean)
Optional
stopUp to 4 sequences where the model stops generating (string or array). The stop text is not included in the output.
Optional
seedInteger for best-effort deterministic sampling. The same seed and parameters return the same output.

Parameters accepted but ignored

top_p, frequency_penalty, presence_penalty, logit_bias, n and user are accepted for OpenAI SDK compatibility and then discarded — Thaura pins its own sampling so the API never quietly produces worse output than the product. Sending them is safe; changing them has no effect. Only temperature, stop and seed actually influence sampling.

Parameters that are rejected

The legacy functions and function_call parameters are not supported and return 400 unsupported_parameter. Use tools and tool_choice instead — they are OpenAI's current function-calling API, and every modern client and SDK sends them by default.

Rate limits

  • 60 requests per minute per API key
  • 8 concurrent requests per API key
  • Over either limit returns 429 — retry after a moment. Agent frameworks spend several requests per user turn (one per tool round), so budget for that when sizing concurrency. Need more? Contact us and we will raise the ceiling on your key.
POST
/v1/audio/transcriptions

Speech-to-text: upload an audio file as multipart form data, get the transcript back. Billed per audio minute. Full examples in the Speech-to-Text tab below.

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 always included in the final streaming chunk.
// No need to set stream_options - usage is enabled automatically.
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]

Error Response:

{
  "error": {
    "message": "Human-readable description of what went wrong",
    "type": "invalid_request_error",
    "code": "invalid_model"
  }
}

// Status Codes:
// 400: Invalid request (bad body, invalid model, or undecodable image/audio)
// 401: Missing or invalid API key
// 402: Insufficient balance (add funds in Settings → API → Billing)
// 404: Unknown model
// 413: File too large (audio uploads over 50MB)
// 429: Rate limit exceeded (slow down and retry)
// 500: Internal error
// 503: AI service temporarily unavailable (retry after a moment)

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

Start Building with Ethical AI Today

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