TypeScript 97.4%
SQL 1%
JavaScript 0.9%
CSS 0.6%
1// Endpoint discovery: /models with and without /v1, /user/balance, HEAD-ish checks.2import { raw, save } from "./lib.ts";34const out: Record<string, unknown> = {};5out.models = await raw("/models");6out.models_v1 = await raw("/v1/models");7out.balance = await raw("/user/balance");8out.balance_v1 = await raw("/v1/user/balance");9out.chat_v1 = await raw("/v1/chat/completions", {10 method: "POST",11 body: JSON.stringify({ model: "deepseek-v4-flash", messages: [{ role: "user", content: "Say OK" }], max_tokens: 5, thinking: { type: "disabled" } }),12});13out.chat_beta = await raw("/beta/chat/completions", {14 method: "POST",15 body: JSON.stringify({ model: "deepseek-v4-flash", messages: [{ role: "user", content: "Say OK" }], max_tokens: 5, thinking: { type: "disabled" } }),16});17out.files = await raw("/files");18save("00-models.json", out);19for (const [k, v] of Object.entries(out)) console.log(k, (v as any).status, JSON.stringify((v as any).body).slice(0, 400), JSON.stringify((v as any).headers));20