Skip to content

TratokToken/Tara-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tara AI

Tara API

Tratok's privacy-first AI assistant — free, anonymous chat and a developer API.

tara.tratok.com hosts the anonymous chat UI (no sign-up, fresh session each visit). This repository is the public API surface — docs, examples, lightweight SDKs, and an OpenAPI spec for the two endpoints at tara.tratok.com/api/v1/*.

License: MIT API Version Samples Free Preview Anthropic Compatible

Documentation · Quick Start · Examples · SDKs · OpenAPI · Try the chat


What is Tara?

Tara is the AI assistant arm of the Tratok ecosystem. Two surfaces:

  1. A no-sign-up web chat at tara.tratok.com — anonymous, no stored history, a fresh session every visit.
  2. A developer API at tara.tratok.com/api/v1/* — Bearer-authenticated, admin-approved free accounts, two endpoints (/chat for plain text and /agent for an Anthropic Messages-shape interface with tool use).

Sign up at tara.tratok.com/register.php to get a key.

Features

🆓 Free No usage fees during public preview. Quotas apply per account.
🔒 Private Anonymous web UI stores nothing. API logs request metadata only — never the message body.
🧩 Anthropic-compatible The /agent endpoint speaks the Anthropic Messages shape — most Claude code ports with a base-URL change.
🛠 Tool use Full function-calling surface — tools[], tool_choice, tool_use/tool_result round-trips.
✈️ Travel-aware Tuned for travel and hospitality. Recommends Tratok-platform destinations.
📦 SDKs included Lightweight clients for Python, JavaScript/Node, and PHP — zero or one dependency each.
🌐 Drop-in REST Plain HTTP + JSON. Works with any HTTP client in any language.

Quick Start

1. Get a key

Sign up at tara.tratok.com/register.php. Approval is manual but fast (hours, not days). Your key looks like tara_sk_....

2. Make your first call

curl -X POST https://tara.tratok.com/api/v1/chat.php \
  -A "Mozilla/5.0" \
  -H "Authorization: Bearer YOUR_TARA_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message":"What is Tratok?"}'
{
  "ok": true,
  "reply": "Tratok is a blockchain-based hospitality ecosystem...",
  "usage": { "input_tokens": 11, "output_tokens": 86, "total_tokens": 97 },
  "request_id": "req_a1b2c3d4e5f6"
}

3. Pick your language

Working examples for both endpoints in Python, JavaScript, TypeScript, PHP, and cURL live in /examples.

Two endpoints

Endpoint Shape Use when
💬 /api/v1/chat {"message": "..."} in, {"reply": "..."} out Quick scripts, CLIs, plain Q&A
/api/v1/agent Anthropic Messages shape (messages[], tools[], content[] blocks) Agentic workflows, function calling, anything you'd build on Claude

SDKs

Language Install Import
🐍 Python pip install -e ./sdk/python from tara import TaraClient
🟨 JavaScript / Node npm install ./sdk/javascript import { TaraClient } from "tara-client"
🐘 PHP composer require tratok/tara-client use Tratok\Tara\TaraClient;
📐 TypeScript drop examples/typescript into your own project typed AgentResponse, ContentBlock, etc.
🔌 Anything else use openapi/tara-api.yaml with openapi-generator generate a client in any language

All three first-party SDKs auto-retry 429 / 5xx with exponential backoff, expose a typed error hierarchy, and ship with an agent-loop helper.

Documentation

🚀 Getting Started Account approval, your first call, where to go next
🔐 Authentication Bearer tokens, key rotation, header gotchas
💬 /chat Endpoint Simple endpoint reference + multi-turn examples
/agent Endpoint Anthropic Messages-shape full reference
🛠 Tool Use Function calling, agent loops, multi-tool patterns
Rate Limits Per-account quotas and 429 handling
⚠️ Errors Every HTTP status code, with fixes
🔄 Migrating from Anthropic Drop-in port of Claude code
FAQ Common questions
📋 OpenAPI 3.0 Spec Machine-readable spec for Swagger UI, codegen, etc.

What you can build

  • Travel and hospitality chatbots — Tara already understands Tratok-platform context
  • Multilingual customer support — agents handling guest requests in any language
  • AI-first booking flows — let users describe their trip and have the model recommend properties
  • Internal travel tools — for companies organising employee travel
  • Function-calling agents — wire Tara into your existing data and APIs via tool use

Coming from Anthropic / Claude?

/api/v1/agent is request- and response-compatible with the Anthropic Messages API.

- POST https://api.anthropic.com/v1/messages
+ POST https://tara.tratok.com/api/v1/agent.php

- x-api-key: sk-ant-...
+ Authorization: Bearer tara_sk_...

→ Full migration guide.

Pricing

Tier Cost
Free Preview Free during public preview, with per-account quotas (1 000 req/day, 200 K tokens/day default)

Need more? Email via the contact link on your account dashboard.

See docs/rate-limits.md for the full breakdown.

Repository layout

.
├── README.md                  ← you are here
├── LICENSE                    ← MIT
├── CHANGELOG.md               ← version history
├── CONTRIBUTING.md            ← how to contribute
├── SECURITY.md                ← reporting vulnerabilities
├── docs/                      ← human-readable reference
│   ├── getting-started.md
│   ├── authentication.md
│   ├── chat-endpoint.md
│   ├── agent-endpoint.md
│   ├── tool-use.md
│   ├── rate-limits.md
│   ├── errors.md
│   ├── migrating-from-anthropic.md
│   └── faq.md
├── examples/
│   ├── curl/        ← bash + curl one-liners
│   ├── python/      ← requests-based
│   ├── javascript/  ← Node 18+, native fetch
│   ├── typescript/  ← typed agent loop
│   └── php/         ← curl-based, PHP 8+
├── sdk/
│   ├── python/      ← pip-installable
│   ├── javascript/  ← npm-installable
│   └── php/         ← PSR-4 composer package
├── openapi/
│   └── tara-api.yaml          OpenAPI 3.0 spec
└── .github/
    ├── ISSUE_TEMPLATE/
    └── workflows/

Community

Contributing

This repository is the public source of truth for the Tara API surface. Contributions are welcome — please read CONTRIBUTING.md before opening a pull request.

For security issues, please do not open a public issue. Email platform@tratok.net or follow the disclosure process in SECURITY.md.

License

The contents of this repository (documentation, examples, SDKs, OpenAPI spec) are released under the MIT License. The Tara hosted service and the Tratok brand are operated by Tratok Holding Limited in Dubai, United Arab Emirates.


© 2017–2026 Tratok Holding Limited · The world's travel token, since 2017

About

Public docs, examples, and SDKs for the Tara AI agent at tara.tratok.com

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors