SKYLATHE docs — MCP, CLI, webhooks, SDK
Connect SKYLATHE to any AI chat, script or server. Every paid call shows its exact price first, spends only up to the ceiling you set, needs an approval and refunds what was not delivered.
The reference below is in English (tool names, fields and code).
Use SKYLATHE inside your AI chat
Connect over MCP
# Claude Code (OAuth opens in the browser; contract 2 on every call)
claude mcp add --transport http skylathe https://skylatheai.com/api/mcp
# Any MCP client (Streamable HTTP) — JSON config
{ "mcpServers": { "skylathe": { "type": "http", "url": "https://skylatheai.com/api/mcp" } } }
# Server-to-server with a member key (contract 1 unless you send the header)
curl -s https://skylatheai.com/api/mcp -H "Authorization: Bearer $SKYLATHE_API_KEY" -H "x-skylathe-contract: 2" \
-H "content-type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
# The versioned manifest (classes, versions, input + output schemas, live proof) — public
curl -s https://skylatheai.com/api/mcp/manifestTools and their side-effect classes
24 tools, 0 live-verified
| Tool | Class | Version | Paid | Proof |
|---|---|---|---|---|
| models | READ | 2.0.0 | no | RE-TEST DUE |
| price | PLAN | 2.0.0 | no | RE-TEST DUE |
| generate | GENERATE | 2.1.0 | yes | RE-TEST DUE |
| job | READ | 2.1.0 | no | RE-TEST DUE |
| job_cancel | WRITE | 2.1.0 | no | RE-TEST DUE |
| jobs | READ | 2.0.0 | no | RE-TEST DUE |
| assets | READ | 2.0.0 | no | RE-TEST DUE |
| asset | READ | 2.0.0 | no | RE-TEST DUE |
| balance | READ | 2.0.0 | no | RE-TEST DUE |
| search | READ | 2.0.0 | no | RE-TEST DUE |
| fetch | READ | 2.0.0 | no | RE-TEST DUE |
| plan | PLAN | 2.0.0 | no | RE-TEST DUE |
| ad_studio | PLAN | 2.0.0 | no | RE-TEST DUE |
| influencer_studio | PLAN | 2.0.0 | no | RE-TEST DUE |
| workflows | READ | 2.0.0 | no | RE-TEST DUE |
| workflow_run | GENERATE | 2.1.0 | yes | RE-TEST DUE |
| workflow_status | READ | 2.0.0 | no | RE-TEST DUE |
| identity_save | WRITE | 2.1.0 | no | RE-TEST DUE |
| identity_get | READ | 2.0.0 | no | RE-TEST DUE |
| identity_check | READ | 2.0.0 | no | RE-TEST DUE |
| analyze | PLAN | 2.0.0 | no | RE-TEST DUE |
| edit | GENERATE | 2.1.0 | yes | RE-TEST DUE |
| projects | READ | 2.0.0 | no | RE-TEST DUE |
| project_add | WRITE | 2.1.0 | no | RE-TEST DUE |
Contract 2: dry run, ceiling, approval, idempotency
// 1 · dry run: the exact price + an approval token for exactly these arguments (nothing charged)
{"method":"tools/call","params":{"name":"generate","arguments":{"model":"nano-banana-2","prompt":"a red apple","dry_run":true}}}
// → {"dry_run":true,"credits":16,"charged":0,"approval_token":"sat1.…","expires_at":"…"}
// 2 · show "16 credits" to the person; on yes:
{"method":"tools/call","params":{"name":"generate","arguments":{"model":"nano-banana-2","prompt":"a red apple",
"approval_token":"sat1.…","max_credits":16,"idempotency_key":"order-7f3a91c2"}}}
// → {"job_id":"…","status":"queued","credits_charged":16}
// a retry with the same idempotency_key returns the same job and charges 0
// refused before any credit: idempotency_required · max_credits_required · approval_required ·
// approval_invalid · over_max_credits · price_changed (structuredContent.error.class)Approve an agent
Make a signed approval an AI agent can pass as approval_token: the classes it may run, the most one call may spend, and for how long (up to 24 hours). Only you can make one, signed in here — never with a key.
Command line
npm install -g skylathe # once the package is published
export SKYLATHE_API_KEY=ck_…
skylathe dry-run --model nano-banana-2 --prompt "a red apple"
skylathe generate --model nano-banana-2 --prompt "a red apple" --max-credits 20
skylathe status <job_id>
skylathe download <asset_id> --out apple.webpWebhooks
import { createHmac, timingSafeEqual } from "node:crypto";
// header Skylathe-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, "<t>.<raw body>")>
export function verify(secret: string, rawBody: string, header: string | null, toleranceSec = 300): boolean {
if (!header) return false;
const p = Object.fromEntries(header.split(",").map(x => x.trim().split("=")));
const t = Number(p.t);
if (!Number.isInteger(t) || Math.abs(Date.now() / 1000 - t) > toleranceSec) return false;
const expected = Buffer.from(createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex"));
const given = Buffer.from(String(p.v1 ?? ""));
return expected.length === given.length && timingSafeEqual(expected, given);
}
// events: job.completed · job.failed · job.refunded — body {id, type, created_at, data:{job_id, status, credits_reserved, credits_refunded, refund_reason}}import hmac, hashlib, time
from typing import Optional
def verify(secret: str, raw_body: bytes, header: Optional[str], tolerance: int = 300) -> bool:
if not header:
return False
p = dict(x.strip().split("=", 1) for x in header.split(","))
try:
t = int(p["t"])
except (KeyError, ValueError):
return False
if abs(time.time() - t) > tolerance:
return False
expected = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, p.get("v1", ""))SDK examples
// TypeScript (Node 18+): the CLI package doubles as a small client library
import { istemci } from "skylathe";
const c = istemci({ anahtar: process.env.SKYLATHE_API_KEY });
const { teklif, sonuc } = await c.uret(
{ model: "nano-banana-2", prompt: "a red apple on a table" },
{ enCok: 20, onay: async (q) => q.credits <= 20 }, // your approval rule (or ask a person)
);
console.log(teklif.credits, sonuc?.job_id);
console.log(await c.is(sonuc!.job_id)); // status + receipt# Python 3.9+ — plain JSON-RPC over HTTPS, contract 2
import json, os, uuid, urllib.request
URL = "https://skylatheai.com/api/mcp"
HEAD = {"authorization": f"Bearer {os.environ['SKYLATHE_API_KEY']}", "content-type": "application/json", "x-skylathe-contract": "2"}
def call(name, args):
body = json.dumps({"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": name, "arguments": args}}).encode()
res = json.load(urllib.request.urlopen(urllib.request.Request(URL, body, HEAD)))["result"]
if res.get("isError"):
raise RuntimeError(res["structuredContent"]["error"])
return res.get("structuredContent") or json.loads(res["content"][0]["text"])
order = {"model": "nano-banana-2", "prompt": "a red apple on a table"}
quote = call("generate", {**order, "dry_run": True})
print("exact price:", quote["credits"], "credits")
job = call("generate", {**order, "approval_token": quote["approval_token"], "max_credits": quote["credits"], "idempotency_key": str(uuid.uuid4())})
print(call("job", {"job_id": job["job_id"]}))Error classes
| Class | Meaning |
|---|---|
| invalid_arguments | The arguments do not fit the tool's input schema or its rules. |
| unauthenticated | No member key or OAuth token, or it is not valid. |
| insufficient_scope | The OAuth connection was not allowed this scope. |
| daily_ceiling | The connection's daily credit ceiling would be passed. |
| monthly_ceiling | The connection's monthly credit ceiling would be passed. |
| over_max_credits | The exact price is above the call's max_credits. |
| price_changed | The price is above the one quoted (expected_credits or the approval token). |
| idempotency_required | Contract 2: a paid call needs idempotency_key. |
| max_credits_required | Contract 2: a paid call needs max_credits. |
| approval_required | Contract 2: a GENERATE, WRITE or PUBLISH call needs approval_token. |
| approval_invalid | The approval token is expired, for another call, another member or another class. |
| no_price | The setting is not measured, so it is not sold. |
| content_refused | The content rule refused the request. |
| rate_limited | Too many calls in a short time (see Retry-After). |
| producer_unavailable | The model's maker is switched off or unreachable; nothing was charged. |
| not_found | No such job, asset, identity or run among yours. |
| already_closed | The job is already closed. |
| internal | An unexpected fault on our side; it is logged. |
Skills for Claude Code
claude plugin marketplace add <owner>/skylathe-skills # after the repository is published
claude plugin install skylathe@skylathe
# skills: safe-spend · job-status · product-shot · ad-pack · story-series · identity-dna · refund-dispute · export-assetsExplore more of SKYLATHE
- Creative Intelligence Computer
- MCP
- Plugins
- AI Image
- Video
- Audio
- Voice Studio
- Editor
- Editing Tools
- Effects Engine
- Burned-in Subtitles
- 3D Scene
- Viral Analysis
- All studios
- Film
- Cinema Studio
- Game Studio
- World / 3D
- VEXURA
- Brand/UGC Marketing Suite
- Ad Studio
- Claim Check
- Content Factory
- Launch Film
- Playable Ads
- Social Publishing
- Creative Radar
- Agent Influencer
- Character Studio
- Avatar/Character Studio
- Character Vault
- Creative DNA
- System DNA
- Web Studio
- Canvas
- Galaxy
- Gallery
- Templates
- Presets
- Recipes
- Flows