Docs
SDKs

TypeScript SDK

Install and use the native Ablatic TypeScript SDK

The native TypeScript SDK speaks the Ablatic API directly and works in Node. It is MIT-licensed.

Install

npm install ablatic

Authenticate

import { Ablatic } from "ablatic";

const client = new Ablatic({ apiKey: "sk-ablatic-..." });

Keep keys server-side. Keys are created in the console. See Authentication for the key format and header schemes.

Chat

import { Ablatic } from "ablatic";

const client = new Ablatic({ apiKey: "sk-ablatic-..." });

const resp = await client.chat.completions.create({
  model: "talos",
  messages: [{ role: "user", content: "Hello" }],
});

console.log(resp.choices[0].message.content);

The model id is talos. By default it runs in thinking mode. For the lowest latency pass reasoning_effort: "none".

Alternative: the openai JS SDK

If you would rather use the official openai SDK, set baseURL to our endpoint. You keep a familiar client and lose the native extras.

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.ablatic.ai/v1",
  apiKey: "sk-ablatic-...",
});

const resp = await client.chat.completions.create({
  model: "talos",
  messages: [{ role: "user", content: "Hello" }],
});

console.log(resp.choices[0].message.content);

Next