1. Create an account

Sign up, verify your email, and add prepaid credit. Then create an API key in your dashboard. Keep that key in a server-side environment variable.

2. Configure your SDK

JavaScript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.CLANKER_API_KEY,
  baseURL: "https://api.cheapclankers.com/v1",
});

const models = await client.models.list();
console.log(models.data);

3. Send a request

JavaScript
const result = await client.chat.completions.create({
  model: "YOUR_ENABLED_MODEL",
  messages: [{ role: "user", content: "Let’s build." }],
  max_tokens: 512,
});

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

Streaming and compatibility

For supported models, set stream: true. Use /v1/messages for enabled Anthropic-compatible models and /v1/responses only when your selected model lists that protocol. Your key’s model list is the authority for available access.

Request limits and billing

Set an explicit output-token limit. Available credit is reserved before inference and settled from usage. Interrupted requests may remain pending until supplier records confirm their charge. Avoid blindly retrying a timed-out generation.

Errors and request IDs

401 means an invalid or revoked key. 402 means insufficient credit. 429 means a rate or concurrency limit. 503 means the route, model, or supplier is not available. Include the x-request-id response header when asking for help.