Cloud, Vault & APIs · OpenAPI 3.1 · /api/v1 · Full AI Markdown Manual (llms-full.txt) · OpenAPI 3.1 Spec
TRC Developer API v1 — Unified AI Model Gateway, Media, Voice & Storage Reference
One SHA-256 scoped key unlocks OpenAI- and Anthropic-compatible frontier inference across eight model providers, automatic 50% DeepSeek off-peak & cache discounts, $0-markup BYOK, Whisper transcription, game sprite-sheet generation, AI music, telephony, and Cloud Vault storage.
- Base URL: api.trc.inc — Prefix /api/v1 · OpenAPI 3.1 (/openapi.json)
- DeepSeek Off-Peak: $0.15 / 1M in — $0.60/1M out · $0.003/1M cached · active 79% of week
- Realtime Voice AI: $0.10 / 1M in — Qwen 3.5 Omni Flash (qwen3.5-omni-flash · $0.40/1M out)
- Fee Policy: 0% BYOK · 10% Wallet — $0.00 BYOK markup · 10% managed TRC Wallet gateway fee
Authentication, 12 Granular Scopes & Wallet Guardrails
Pass your API key in either Authorization: Bearer trc_... or x-trc-api-key: trc_.... Keys are displayed once at creation, stored as irreversible SHA-256 hashes, isolated per client installation (rotating or signing into one device never invalidates another device key), and rate-limited at 120 req/min per key.
Deterministic Billing Order & Fee Transparency: Every billable call draws from your included monthly plan compute allowance first, then from your pre-funded TRC Wallet balance (which carries a transparent 10% gateway settlement fee over provider base rates; Bring-Your-Own-Key routing carries $0.00 / 0% markup). If balance reaches zero, the gateway returns a clean, structured HTTP 402 Payment Required JSON payload (code: "INSUFFICIENT_FUNDS") rather than incurring surprise post-paid overages.
| Scope Identifier | Permitted Operations |
|---|---|
| models:use | Chat completions, reasoning, Anthropic Messages API, live model catalog, and image/tileset generation |
| storage:read | List Cloud Storage Vault folders, retrieve metadata/signed URLs, and inspect quota usage |
| storage:write | Stream binary and multipart uploads up to 2 GB into your Cloud Storage Vault |
| whisper:use | Transcribe audio files to structured text via POST /api/v1/transcribe |
| music:use | Generate full AI songs and poll job status via /api/v1/audio/generate |
| soundbites:use | Create and publish short-form SoundBite audio clips via /api/v1/soundbites/clips |
| gifs:use | Search and fetch trending reaction GIFs via /api/v1/gifs/search & /trending |
| telephony:call | Initiate and manage programmable voice bridge sessions |
| telephony:numbers | Provision and configure inbound carrier phone numbers |
| sms:send | Dispatch transactional and conversational SMS messages |
| profile:read | Read authenticated account identity (/api/v1/me) and public handle profiles |
| pages:read | Fetch sanitized public custom page blueprints (/api/v1/pages/:ownerType/:ownerId/:pageType) |
Multi-Provider AI Gateway & Verified Token Economics
Route standard OpenAI Chat Completions payloads to POST /api/v1/ai/:provider/chat/completions where :provider is deepseek, google, openai, anthropic, alibaba, kimi, xai, or together. Native Claude tool-use and thinking blocks are also supported directly at POST /api/v1/ai/anthropic/messages.
Automatic Off-Peak & Prefix-Cache Savings: DeepSeek V4.1 peak hours are strictly 01:00–04:00 UTC and 06:00–10:00 UTC Monday–Friday (35 hours/week). During the remaining 133 of 168 hours each week (79% of the week, including all weekend hours), TRC automatically applies 50% off-peak pricing plus prefix-cache discounts with zero configuration required. Query GET /api/v1/pricing (no API key required) at any moment for the live machine-readable rate card.
| Provider Path | Model ID & Tier | Input / 1M Tokens | Output / 1M Tokens | Cached / Special Notes |
|---|---|---|---|---|
| deepseek | deepseek-flash / deepseek-reasoner (Off-Peak · 79% of week) | $0.15 | $0.60 | $0.003 / 1M cached · $0.165 / $0.66 on Managed Wallet |
| deepseek | deepseek-flash / deepseek-reasoner (Peak · 01–04 & 06–10 UTC M–F) | $0.30 | $1.20 | $0.006 / 1M cached · $0.33 / $1.32 on Managed Wallet |
| alibaba | qwen3.5-omni-flash (Qwen 3.5 Omni Flash) | $0.10 | $0.40 | Unified text + realtime audio tokens (20–60x below legacy voice APIs) |
| alibaba | qwen3.8-flash (Qwen 3.8 Flash · 1M context) | $0.15 | $0.47 | High-speed multilingual coding & synthesis |
| trc | trc/gemini-3.8-flash (TRC Gemini 3.8 Flash · 1M context) | $0.30 | $0.30 | $0.03 / 1M cached · high-throughput multimodal coding workhorse |
| gemini-3.8-flash (Google Gemini 3.8 Flash · 1M context) | $0.75 | $3.75 | $0.075 / 1M cached · direct multimodal tool calling & UI engineering | |
| gemini-4-argon (Gemini 4 Argon · 1M context) | $1.25 | $5.00 | $0.125 / 1M cached · multi-repository architecture & deep synthesis | |
| openai | gpt-4o-mini (GPT-4o Mini) | $0.15 | $0.60 | Low-latency structured JSON & tool calling |
| anthropic | claude-haiku-4-5-20251001 (Claude Haiku 4.5) | $1.00 | $5.00 | $0.10 / 1M cached · OpenAI or native Messages API |
| alibaba | qwen3.8-max (Qwen 3.8 Max · 262K context) | $2.00 | $6.00 | Flagship multilingual reasoning & agentic execution |
| xai | grok-4.6 (xAI Grok 4.6 · 256K context) | $2.00 | $6.00 | $0.50 / 1M cached (75% cache discount; 2x >= 200K tokens) |
| anthropic | claude-sonnet-4-6 (Claude Sonnet 4.6) | $3.00 | $15.00 | $0.30 / 1M cached · extended thinking & multi-file engineering |
| kimi | kimi-k3 (Moonshot Kimi K3 · 256K context) | $4.55 | $13.64 | Long-horizon agentic tool calling & synthesis |
| anthropic | claude-opus-4-8-20260210 (Claude Opus 4.8) | $5.00 | $25.00 | $0.50 / 1M cached · deep architectural synthesis |
| openai | gpt-6-astra (GPT-6 Astra · 1.05M context) | $10.00 | $50.00 | $1.00 / 1M cached input |
| local (Desktop & IDE) | Local Ollama GPU Runtime | $0.00 | $0.00 | 100% offline inference on Apple Unified Memory or NVIDIA/AMD GPUs |
Core /api/v1 Endpoint Reference
Public discovery endpoints (/api/v1/pricing and /api/v1/models) require no authentication; billable and account endpoints accept Bearer trc_... over HTTPS at https://api.trc.inc/api/v1. Machine-readable schemas are published at https://www.trc.inc/openapi.json.
| Method & Path | Required Scope | Description |
|---|---|---|
| GET /api/v1/pricing | Public (no key required) | Live machine-readable token rates, active DeepSeek UTC window, fee policy, media prices, and enclave/vault tiers |
| GET /api/v1/models | Public (no key required) | Unauthenticated OpenAI-compatible catalog of supported models, context windows, and per-1M token rates |
| POST /api/v1/ai/:provider/chat/completions | models:use (or trc_eval_public_v1 on deepseek-flash) | OpenAI SDK drop-in chat, streaming SSE, tool calling, and structured JSON output |
| POST /api/v1/ai/anthropic/messages | models:use | Native Anthropic Messages API passthrough (streaming, thinking blocks, prompt caching) |
| POST /api/v1/ai/images/generate | images:use (or models:use) | High-resolution AI image generation returning durable CDN URLs |
| POST /api/v1/ai/images/tileset | images:use (or models:use) | Generates 2D game sprite sheets & tilesets with automatic chroma-key slicing |
| POST /api/v1/storage/upload | storage:write | Stream up to 2 GB binary or multipart files into your Cloud Storage Vault |
| GET /api/v1/storage/files | storage:read | List stored files, sizes, timestamps, and signed download URLs by folder prefix |
| GET /api/v1/storage/usage | storage:read | Inspect bytes used, plan ceiling (50 GB – 50 TB), and remaining vault quota |
| POST /api/v1/transcribe | whisper:use | High-accuracy Whisper speech-to-text transcription for audio/voice uploads |
| POST /api/v1/audio/generate | music:use | Start asynchronous full-track AI music generation |
| GET /api/v1/audio/generate/:jobId/status | music:use | Poll generation progress and retrieve master audio stream URLs |
| POST /api/v1/soundbites/clips | soundbites:use | Publish short-form audio clips and voice notes |
| GET /api/v1/gifs/search & /trending | gifs:use | Query searchable reaction GIFs and trending loops |
| GET /api/v1/me & /users/:handle | profile:read | Fetch current authenticated identity or public profile metadata |
| GET /api/v1/pages/:ownerType/:ownerId/:pageType | pages:read | Read sanitized public page blueprints and widget slot configurations |
Anthropic SDK (Native)
import Anthropic from '@anthropic-ai/sdk';
const anthropic = new Anthropic({
apiKey: process.env.TRC_API_KEY, // Bearer trc_...
baseURL: 'https://api.trc.inc/api/v1/ai/anthropic',
});
const message = await anthropic.messages.create({
model: 'claude-sonnet-4-6',
max_tokens: 1024,
messages: [{ role: 'user', content: 'Review this SQL migration for lock contention.' }],
});
console.log(message.content);
Game Sprite Tileset + Whisper (cURL)
# 1. Generate a chroma-key sliced 4x4 2D game sprite sheet
curl -X POST "https://api.trc.inc/api/v1/ai/images/tileset" \
-H "Authorization: Bearer trc_live_your_scoped_key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "isometric stone dungeon floor tiles, crisp pixel art",
"columns": 4,
"rows": 4
}'
# 2. Transcribe a recorded meeting or voice memo with TRC Whisper
curl -X POST "https://api.trc.inc/api/v1/transcribe" \
-H "Authorization: Bearer trc_live_your_scoped_key" \
-F "file=@./standup-note.m4a"Frequently Asked Questions
How does Bring-Your-Own-Key (BYOK) work alongside the TRC Wallet?
You can attach your own OpenAI, Anthropic, Google, DeepSeek, Alibaba, Kimi, or xAI provider keys in account settings or VS Code SecretStorage. TRC charges $0.00 markup on BYOK requests while still letting you use TRC Storage Vault, Studios, and fallback Wallet models.