Skip to content

Image Generation Overview ​

RKAPI supports both Gemini Native Image Generation and the OpenAI Images API through your existing API key and account balance. Choose the protocol that best fits your workflow—conversational multimodal editing with Gemini, or standardized image generation/editing endpoints with OpenAI-compatible SDKs.

Always Use the Dedicated API Domain

Send all image generation API requests to https://api.zwwbai.com. Never send API calls to the web console domain https://s2pbxm0xv5y.adtyai-fz.top, which returns HTTP 403.

Choosing the Right Image API ​

DimensionGemini Native Image GenerationOpenAI Images API
EndpointPOST https://api.zwwbai.com/v1beta/models/{model}:generateContentPOST https://api.zwwbai.com/v1/images/generations & /v1/images/edits
Typical Modelsgemini-2.5-flash-image, gemini-3-pro-image-preview (check Pricing for live IDs)gpt-image-1 (and other image models on Pricing)
Best StrengthsMulti-turn conversational editing, fine-grained text rendering, image-to-image transformation with natural instructions, combined text + image repliesDrop-in compatibility with existing OpenAI SDKs, transparent backgrounds, explicit size/quality controls, batch n generation
Official SDKPython google-genai (base_url="https://api.zwwbai.com")Python / Node openai (base_url="https://api.zwwbai.com/v1")
Response PayloadBase64 bytes inside candidates[].content.parts[].inlineDatab64_json (default for gpt-image-1) or temporary url depending on model
Detailed GuideGemini Image GenerationOpenAI Images API

Check Live Enabled Image Models ​

Image model availability, resolutions, and per-image or token-based pricing depend on the active channels in your token's group. Before hardcoding a model slug in production:

  1. Open the Pricing page at https://s2pbxm0xv5y.adtyai-fz.top/pricing.
  2. Search for image, gemini, or gpt-image to confirm the exact model IDs currently enabled.
  3. Verify your API key (created at https://s2pbxm0xv5y.adtyai-fz.top under API Tokens) belongs to a group that supports that model. See Channel Availability for group selection guidance.

Handling base64 vs. url Responses ​

When integrating image APIs into backend services or scripts, plan for how image payloads arrive:

  • Base64 (inlineData.data or b64_json):
    • Returned inline as a base64-encoded PNG/JPEG/WebP string directly inside the JSON response.
    • Pros: Self-contained, never expires, does not require a secondary download call, and avoids upstream CDN timeouts.
    • Best practice: Decode immediately and persist to local disk or object storage (S3 / R2 / OSS); never log raw base64 payloads into application logs.
  • Temporary URL (data[].url):
    • Some legacy OpenAI-compatible image models return a short-lived signed URL when response_format="url" is supported.
    • Best practice: Download and re-host URL-based outputs immediately after generation, because upstream signed links typically expire within minutes to an hour.

Next Steps ​