Resources

Tools

ThAPI Studio for local AI image/video creation, plus API CLI to connect apps to the API.

Desktop app

ThAPI Studio — AI image & video

All-in-one desktop app: paste your ThAPI key, pay from wallet balance, export media locally.

ThAPI Studio image creation interface

AI image creation

Text-to-image, reference edits, aspect ratios and quick styles. Billed per generation.

  • Text → Image
  • Reference / edit
  • API key wallet
Download ThAPI Studio
ThAPI Studio video creation interface

AI video creation

Image-to-video with Seedance, speed presets, aspect ratios, and 720p/1080p output.

  • Image → Video
  • 720p / 1080p
  • API key wallet
Download ThAPI Studio

Install

Download API CLI & thapi-router

One-liner and npm download links. thapi-router is a legacy alias that forwards to API CLI.

macOS / Linux (API CLI)curl -fsSL https://thapi.cloud/install/api-cli.sh | bash
Windows PowerShell (API CLI)irm https://thapi.cloud/install/api-cli.ps1 | iex

thapi-router

Legacy installer (StaliRouter / 9Router). Still works — redirects to API CLI.

Prefer API CLI. Router links below keep old commands working.

# macOS / Linux
curl -fsSL https://thapi.cloud/install/stalirouter.sh | bash

# Windows PowerShell
irm https://thapi.cloud/install/stalirouter.ps1 | iex

API CLI

Install and configure the CLI to connect Claude Code, Cursor, OpenClaw, and other apps.

Anthropic + OpenAIManual setup

Also known as: wizard · api-cli doctor · api-cli

API CLI: install the configuration tool and check app connections.

Published instructions · App version: unverified

Chat, ping, invoke and content-generation examples may send real billable requests. Check the model, balance, rate and minimum before running them. GET /v1/models checks authentication and the catalogue only. Set up environment variables safely

Base URL to paste

OpenAI SDKs generally use a URL ending in /v1; Anthropic SDKs use the root URL. Avoid adding /v1 twice. Protocol compatibility does not guarantee every provider feature.

See notes / depends on the protocol

This app has exceptions — read Notes below before pasting.

Prerequisites

  1. Node.js ≥ 18 (LTS recommended)
  2. An API key in the form sk-thapi-… from Dashboard → Keys
  3. Write access to your home directory (to create ~/.thapi and update app configuration)

Recommended model: claude-fable-5

Quick way — command / config

# Recommended — same on Win / macOS/Linux
npm install -g API CLI@latest

# Open the wizard — paste the API key when prompted
api-cli

# Or configure a specific app
api-cli configure claude -m claude-fable-5
api-cli configure codex -m gpt-5.6-sol
api-cli configure openclaw
api-cli configure cline

Where to place file / fill Settings

Filemacos
~/.thapi/config.json
File created by API CLI (chmod 0600). Contains the saved API key and base URL.
Do not commit this file to Git.
Filelinux
~/.thapi/config.json
Same as macOS. Check: ls -la ~/.thapi/config.json
Filewindows
%USERPROFILE%\.thapi\config.json
PowerShell: notepad $env:USERPROFILE\.thapi\config.json
Edit only if you understand the settings — prefer api-cli auth login / api-cli -k '…'.

Verify connection

  1. Run `api-cli doctor` — installed tools should show that they point to ThAPI.
  2. Open Dashboard → Usage: a test chat command should create a charge entry.
  3. Run `api-cli info` to see the base URL in use.

Troubleshooting

SymptomReasonHow to handle
npm install -g reports EACCES / permission errorsNo permission to write to the global npm prefix.Use nvm/fnm or configure a user-level npm prefix; avoid sudo unless you understand the risks.
doctor reports that the tool is not configuredThe app is not installed, or its old configuration has not been patched.`api-cli configure <tool> -k '…'` or `api-cli doctor --fix`.

Notes

  • Base URL Anthropic: https://thapi.cloud — OpenAI: https://thapi.cloud/v1. API CLI tự chọn theo từng tool.
  • Repo: https://thapi.cloud

Related

Claude Code · Codex CLI · OpenClaw · Cline

Zalo group