API Reference

API Overview

Endpoints, authentication, errors, and protocol entry points

Base URL

https://api.sunai.lol

For OpenAI-compatible requests, include /v1: https://api.sunai.lol/v1 See Endpoints for the complete address list.

Authentication

Authorization: Bearer sk-your-token

The token group determines which models are available.

Protocols

ProtocolDocumentation
OpenAI compatibleOpenAI
Async image generationAsync Image
Anthropic compatibleAnthropic
Gemini compatibleGemini

Common errors

StatusMeaningWhat to do
401Authentication failedCheck the API key and token status
404 or model not foundWrong group or model nameCompare the token group with the model catalog
429Rate limit reachedReduce concurrency or use another group
5xx or timeoutProvider or network problemCheck the status page and try api2.sunai.lol

For detailed troubleshooting, see the FAQ.

On this page