Skip to content

Documentation

Sakuranbo AI is a developer API for text, image, and video generation models. One catalog, one error format, and one prepaid USD balance cover every model.

Sakuranbo AI works with the OpenAI SDKs. To try it with code that already calls the OpenAI API, change the base URL to https://api.sakuranbo.ai/v1 and the API key to your Sakuranbo AI key. Set model to a Sakuranbo AI model ID, as in the examples.

Terminal window
curl -X POST "https://api.sakuranbo.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SAKURANBO_API_KEY" \
-d '{
"model": "sakuranbo/cherrytext-1.0-flash",
"messages": [
{
"role": "system",
"content": "You are a concise assistant."
},
{
"role": "user",
"content": "Summarize the benefits of prepaid API credits in two lines."
}
],
"max_tokens": 2048
}'

The TypeScript and Python examples use the official OpenAI SDK. The examples read the API key from the environment variable SAKURANBO_API_KEY and use the model sakuranbo/cherrytext-1.0-flash. To create a key, follow the Quickstart. For the Anthropic SDKs and the other chat features, see Chat.

  • Quickstart: create an account and an API key, add balance, and send your first chat request.
  • Authentication: how requests are authenticated with an API key.
  • Chat: generate text with the OpenAI-compatible and Anthropic-compatible endpoints, with streaming.
  • Images: generate and edit images.
  • Videos: generate videos from text, a first frame, or reference images.
  • Jobs: track, list, and cancel image and video jobs.
  • Webhooks: receive job, deposit, and low-balance events, and verify their signatures.
  • Balance and key limits: read your balance and the spending limit of an API key.
  • Models API: GET /v1/models and GET /v1/models/{vendor}/{model}.
  • Estimate API: POST /v1/estimate.
  • Errors: the error format, HTTP status codes, and every error code.
  • Pricing and billing: prepaid balance, deposits, unit prices, and what is not billed.
  • MCP server: connect coding agents to search the docs, browse models, estimate costs, and read your balance and history.