Skip to content

API Code

On this page · 4 sections

Connection settings

  • Provider: OpenAI Compatible / Custom OpenAI provider
  • API-credit base URL: https://api.scalemax.pro/v1
  • API-token base URL: https://api.scalemax.pro/token/v1
  • API key: your full ScaleMax key
  • Model: an exact ID returned by the authenticated /models endpoint (for example, fable-5 for a Claude-capable or both-scope key)

Use the URL that belongs to the key. API-credit and API-token keys deliberately return an authentication failure on the other billing surface. The examples below use SCALEMAX_BASE_URL so the same code works for either key type.

Fable 5 is an Anthropic-family frontend model. It can use this normalized Chat Completions shape, but never appears for an OpenAI-only key. A Claude token key can use the same request shape on https://api.scalemax.pro/token/v1, selecting only an ID returned for that key. Native Anthropic clients use the origin-only token URL https://api.scalemax.pro/token; use the Claude Code guide or Claude Desktop guide.

Models

  • fable-5
  • gpt-6.1-sol
  • gpt-6-sol
  • gpt-6-luna
  • gpt-6-astra
  • gpt-5.6-terra
  • gpt-5.6-sol
  • gpt-5.6-luna

Node example

ts
import OpenAI from 'openai';
const client = new OpenAI({
  apiKey: process.env.SCALEMAX_API_KEY,
  baseURL: process.env.SCALEMAX_BASE_URL
});

Automatic setup

bash
npm install -g scalemax@latest
scalemax

The CLI writes examples with the base URL detected from the key. For apps that only expose UI settings, it writes a setup guide under ~/.scalemax/.