Developers
Developer API
Use Tacita from your own code with the standard OpenAI SDK — wallet-owned API keys, pay for what you use, free daily credits for token holders.
On this page
Tacita's API is OpenAI-compatible. Point any OpenAI SDK or tool at https://api.tacita.chat/v1, use a Tacita API key, and your existing code works: chat completions, streaming, images and video.
- Wallet-owned keys. Create keys on tacita.chat after signing in with your wallet. There is no email and no account to set up. See API keys & limits.
- Pay for what you use. Usage is billed to the wallet that owns the key. Free daily credits go first if you hold the token, then paid credits. See Billing.
- Anonymous mode. Requests run on a secondary compute market of trusted providers. They see the prompt but never who sent it. TEE mode through the API is not available yet. See Models & modes.
Quickstart#
1. Create a key#
Open tacita.chat → Developers, sign in with your wallet and click Create key. The key looks like tc_live_… and is shown once, so store it somewhere safe.
export TACITA_API_KEY="tc_live_..."
2. Call it with the OpenAI SDK#
JavaScript / TypeScript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.TACITA_API_KEY,
baseURL: "https://api.tacita.chat/v1",
});
const r = await client.chat.completions.create({
model: "deepseek-v4.1-flash",
messages: [{ role: "user", content: "Write a haiku about silence." }],
});
console.log(r.choices[0].message.content);
Python
import os
from openai import OpenAI
client = OpenAI(api_key=os.environ["TACITA_API_KEY"], base_url="https://api.tacita.chat/v1")
r = client.chat.completions.create(
model="claude-sonnet-5.5",
messages=[{"role": "user", "content": "Explain zero-knowledge proofs in two sentences."}],
)
print(r.choices[0].message.content)
curl
curl https://api.tacita.chat/v1/chat/completions \
-H "Authorization: Bearer $TACITA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello!"}]}'
3. Stream#
const stream = await client.chat.completions.create({
model: "claude-sonnet-5.5",
stream: true,
messages: [{ role: "user", content: "Tell me a short story." }],
});
for await (const chunk of stream) process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
The last chunk carries usage (prompt and completion tokens).
Images and video#
const img = await client.images.generate({ model: "seedream-4.5", prompt: "a lighthouse at dusk, oil painting", size: "1024x1024" });
console.log(img.data[0].url); // temporary link, valid 10–30 minutes
const job = await client.videos.create({ model: "ltx-2-fast-text-to-video", prompt: "a paper boat on a rainy street", seconds: "6" });
// poll client.videos.retrieve(job.id) until status is "completed", then client.videos.downloadContent(job.id)
Image and video prompts go through a safety check first. Clearly illegal content is refused. Video is in beta.
Safe retries for images. Send your own id in the X-Tacita-Request-Id header (8–64 characters of letters, digits, _ or -), for example client.images.generate(params, { headers: { "X-Tacita-Request-Id": id } }). If the connection drops, GET /media/by-request/{id} returns the images, and repeating the request with the same id never generates or charges twice. An image is charged when it is delivered; one that is never delivered is refunded automatically.
Endpoints#
| Method | Path | OpenAI SDK |
|---|---|---|
GET | /v1/models | client.models.list() |
POST | /v1/chat/completions | client.chat.completions.create() |
POST | /v1/images/generations | client.images.generate() |
GET | /media/by-request/{id} | (recover an image request by its X-Tacita-Request-Id) |
POST | /v1/videos | client.videos.create() |
GET | /v1/videos/{id} | client.videos.retrieve() |
GET | /v1/videos/{id}/content | client.videos.downloadContent() |
DELETE | /v1/videos/{id} | client.videos.delete() (cancels the job) |
Privacy#
- Keys are stored only as a hash. We keep no request logs, no prompts, no responses and no IP addresses.
- Per key we keep only a name, the creation date, an optional spend limit and this month's spend counter.
- Generated media is scrubbed of GPS and device metadata, and AI-provenance labels are kept.
For more, see Data handling.