Skip to main content
Point the official OpenAI JavaScript SDK at apisale. Routes and response shapes match OpenAI’s image/video APIs where applicable.

Install

Configure client

The SDK sends Authorization: Bearer <apiKey>. apisale accepts Bearer and Key schemes.

List models

Equivalent REST:
Returns OpenAI-shaped models including openai and grok-openai protocol entries. See SDK-compatible models.

Generate images (sync)

Image edit endpoint

REST: POST /v1/images/edits

Generate video (async)

Video generation is asynchronous — submit a job, then poll until complete.

Python (official SDK)

Parameter mapping (images)

Errors

Errors follow OpenAI-style JSON where possible. Check:
  • 401 — invalid API key
  • 402 — insufficient wallet balance
  • 429 — concurrency or rate limit (Errors & limits)