Model Gateway
Your app can call TellWang's model gateway for summaries, search, chat, classification, and image understanding. Every plan includes Private and the text-only DeepSeek models; paid plans can also select Kimi. Generated images and SVG assets remain prepaid.
Built-in model
The default model is private. It accepts text and OpenAI-compatible image_url content blocks. Every plan may also request deepseek-v4-flash or deepseek-v4-pro for text-only work; paid plans add kimi-k2.7-code, which also accepts images. The technical gateway keeps the complete catalog. Wang chat presents a smaller plan-aware choice: DeepSeek Flash on Free, Flash plus Pro on paid plans, and no Private pill. The endpoint is OpenAI-compatible, so existing AI libraries can call it:
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://tellwang.com/v1/llm/v1",
apiKey: process.env.TELLWANG_LLM_KEY, // minted via POST /v1/llm-keys
});
const reply = await client.chat.completions.create({
model: "private",
messages: [{ role: "user", content: "Summarise this ticket…" }],
});Included grants are sized by plan. Usage beyond included allowances uses prepaid credits while postpaid usage billing is disabled. See Pricing for the token-type rates and funding rules.
Managed RAG
Applications call managed RAG through the model gateway, not the RAG sidecar directly. The gateway key proves the organization, the Wok id selects the governed corpus, and X-Wok-Authorization carries the end user's exact Wok bearer so document access rules are enforced before retrieval.
const userAuthorization = request.headers.get("Authorization");
if (!userAuthorization?.startsWith("Bearer ")) throw new Error("authentication required");
const response = await fetch(
"https://tellwang.com/v1/llm/v1/rag/acme/agents/support/chat",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.TELLWANG_LLM_KEY}`,
"X-Wok-Authorization": userAuthorization,
"Content-Type": "application/json",
},
body: JSON.stringify({ question: "What is our return policy?" }),
},
);The model-gateway key is never forwarded to RAG. The user bearer is used only for the Wok's RAG policy check. Private ingestion and management continue through control-plane RAG endpoints.
Model discovery
SDKs that call client.models.list() work out of the box. The endpoint returns the OpenAI-spec shape {object:"list", data:[{id, object:"model", created, owned_by}]}. Free lists private, deepseek-v4-flash, and deepseek-v4-pro; paid plans also list kimi-k2.7-code.
curl https://tellwang.com/v1/llm/v1/models \
-H "Authorization: Bearer $SLLM_KEY"Streaming responses
For chat UIs that need a live typing effect — or long completions where waiting for the full response is bad UX — pass stream: true. The endpoint emits Server-Sent Events (SSE) data: {…} chunks per OpenAI's wire format. Token metering happens after the stream closes, off the final usage chunk; the gateway automatically forces stream_options.include_usage = true so accurate billing is preserved.
const stream = await client.chat.completions.create({
model: "private",
messages: [{ role: "user", content: "Write a 200-word brief…" }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || "");
}The gateway pipes the upstream's SSE chunks through verbatim (Content-Type: text/event-stream, X-Accel-Buffering: no to suppress edge buffering). For TellWang-funded usage, a client disconnect does not discard the provider's final usage record: the bounded upstream completion is drained and settled against the exact funding identity admitted before the call. If the provider stream is severed without a trustworthy usage frame, the admission stays held for reconciliation instead of guessing a charge or allowing an unsafe replay.
Visual generation
The same gateway also generates build-time assets for a Wok: raster images through Flux, and website-ready SVG/vector assets through Recraft. Wang uses this for logos, icons, favicons, hero art, and brand-consistent illustrations; apps can call the same endpoint from an edge function when they need a user-facing workflow.
curl https://tellwang.com/v1/llm/v1/images/generations \
-H "Authorization: Bearer $SLLM_KEY" \
-H "Content-Type: application/json" \
-d '{
"model":"recraft-svg",
"prompt":"brand-consistent SVG icon set for a premium dental clinic, navy linework, warm gold accent",
"style_id":"optional-recraft-style-uuid",
"num_images":3,
"image_size":"1024x1024"
}'recraft-svg is backed by Recraft's vector model and returns SVG assets when the Recraft upstream key is configured. Pass a Recraft style_id for a learned brand style, or put palette, line style, typography, and motif constraints directly in the prompt. The response includes cost_cents and image URLs; when a Wok bucket is supplied, outputs are stored under that Wok so the site can reference stable URLs.