TypeScript SDK
Configure the OpenAI SDK with the Zokasta base URL.
Use the OpenAI SDK from server-side TypeScript. Set ZOKASTA_API_KEY in the environment that runs the code.
Run this in your project.
Terminalnpm install openaiUse a base URL ending in /v1.
TypeScriptimport OpenAI from "openai"; const apiKey = process.env.ZOKASTA_API_KEY; if (!apiKey) throw new Error("Set ZOKASTA_API_KEY first."); const client = new OpenAI({ baseURL: "https://api.zokasta.com/v1", apiKey, });Use an ID from your OpenAI model list.
TypeScriptconst response = await client.chat.completions.create({ model: "gpt-5.6-sol", messages: [{ role: "user", content: "Hello" }], max_completion_tokens: 64, }); console.log(response.choices[0]?.message.content);