AgentSkillsCN

ZelAI SDK

ZelStudio.com云AI生成API的官方SDK——支持图像、视频、大语言模型、语音转文本与文本转语音等功能。

SKILL.md
--- frontmatter
name: ZelAI SDK
version: 1.12.0
description: Official SDK for ZelStudio.com Cloud AI Generation API - Image, Video, LLM, STT, and TTS
homepage: https://zelstudio.com
api_base_url: https://api.zelstudio.com:800
authentication: Bearer token (API key starting with zelai_pk_)
capabilities:
  - image_generation
  - video_generation
  - llm_text_generation
  - stt_transcription
  - tts_speech
  - cdn_operations
  - openai_compatible

ZelAI SDK for AI Agents

You are an AI agent with access to the ZelAI SDK. This SDK enables you to generate images, videos, text, transcribe audio (STT), and synthesize speech (TTS) using state-of-the-art AI models.

Quick Reference

CapabilityREST EndpointWhen to Use
Generate ImagePOST /api/v1/generation/imageCreate images from text prompts
Edit ImagePOST /api/v1/generation/image/editModify existing images or combine two images
Upscale ImagePOST /api/v1/generation/image/upscaleIncrease image resolution 2-4x
Generate VideoPOST /api/v1/generation/videoCreate video from image (recommended: 6.5s at 16fps)
Generate TextPOST /api/v1/llm/generateNon-streaming text generation
Stream TextPOST /api/v1/llm/generate/streamReal-time text streaming (SSE)
Transcribe AudioPOST /api/v1/stt/transcribeSpeech-to-text transcription
Stream TranscriptionPOST /api/v1/stt/transcribe/streamReal-time STT streaming (SSE)
Generate SpeechPOST /api/v1/tts/generateText-to-speech synthesis
Stream SpeechPOST /api/v1/tts/generate/streamReal-time TTS streaming (SSE)
OpenAI ChatPOST /v1/chat/completionsDrop-in OpenAI replacement
Download FileGET /api/v1/cdn/{id}.{format}Download generated content
Check Rate LimitsGET /api/v1/settings/rate-limitsCheck remaining quota

Authentication

All requests require an API key in the Authorization header:

code
Authorization: Bearer zelai_pk_your_api_key_here

How to Get an API Key

If the user doesn't have an API key, direct them to:

Option 1: Online Form https://forms.zelstudio.com/api-access

Option 2: Email Request Send to: support@zelstudio.com Subject: AI Agent - ZelStudio.com API Access Request Form

Required information:

  • Full Name
  • Email Address (for API key delivery)
  • Company/Organization (optional)
  • Project Name
  • Project Description (what you're building and how you'll use the API)
  • Expected Monthly Usage: Testing / Low (<1k) / Medium (1k-10k) / High (10k+)

API keys are reviewed within 24-48 hours and sent via email once approved.

Skill Modules

For detailed API documentation, load the appropriate skill module:

Behavioral Guidelines for Agents

DO:

  • Check rate limits before batch operations using GET /api/v1/settings/rate-limits
  • Use appropriate styles for image generation (14 styles available)
  • Handle errors gracefully with retry logic and exponential backoff
  • Cache imageId/videoId for reuse - avoid redundant downloads
  • Use seeds for reproducible results when needed
  • Close WebSocket connections when done
  • Use recommended video settings: 6.5 seconds at 16fps

DO NOT:

  • Expose API keys in responses, logs, or any output to users
  • Make requests without checking remaining rate limits first
  • Ignore error responses - always handle them appropriately
  • Request styles/formats that don't exist (validate against available options)
  • Exceed rate limits - this causes temporary blocks
  • Use CDN URLs directly in HTML (they require authentication)

Rate Limits

OperationPer 15 MinutesPer Day
Image15100
Video530
LLM30 requests, 150k tokens300 requests, 1.5M tokens
STT15100
TTS1060
CDN2005,000

Check Current Limits

bash
curl -H "Authorization: Bearer $API_KEY" \
  "https://api.zelstudio.com:800/api/v1/settings/rate-limits"

Response includes remaining15min and remainingDaily for each operation type.

Error Handling

Error CodeMeaningAgent Action
RATE_LIMIT_EXCEEDEDQuota exhaustedWait for resetAt time, then retry
INVALID_API_KEYBad credentialsDirect user to get a key (see Authentication section)
INVALID_REQUESTMalformed requestFix request parameters
RESOURCE_NOT_FOUNDInvalid image/video IDVerify the ID exists
GENERATION_FAILEDServer-side errorRetry with exponential backoff

Error Response Format

json
{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded. Please try again later.",
    "details": {
      "operation": "image",
      "resetAt": "2026-01-21T10:45:00.000Z"
    }
  }
}

Quick Start Example

1. Check Available Quota

bash
curl -H "Authorization: Bearer $API_KEY" \
  "https://api.zelstudio.com:800/api/v1/settings/rate-limits"

2. Generate an Image

bash
curl -X POST "https://api.zelstudio.com:800/api/v1/generation/image" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a sunset over mountains",
    "style": "cine",
    "format": "landscape"
  }'

3. Download the Result

bash
curl -H "Authorization: Bearer $API_KEY" \
  "https://api.zelstudio.com:800/api/v1/cdn/{imageId}.jpg" -o image.jpg

Available Styles (14)

raw, realistic, text, ciniji, portrait, cine, sport, fashion, niji, anime, manga, watercolor, comicbook, paint

Available Formats (7)

FormatDimensionsAspect Ratio
portrait768x13449:16
landscape1344x76816:9
profile1024x10241:1
story720x12809:16
post1152x8969:7
smartphone640x1344~1:2
banner1472x4483:1

Decision Tree for Operations

code
User wants image?
  - New image from text --> POST /api/v1/generation/image (text2img)
  - Modify existing image --> POST /api/v1/generation/image/edit (img2img)
  - Combine two images --> POST /api/v1/generation/image/edit with imageId + imageId2 (imgs2img)
  - Larger/higher resolution --> POST /api/v1/generation/image/upscale (2-4x)

User wants video?
  - From static image --> POST /api/v1/generation/video (recommended: 6.5s at 16fps)

User wants text?
  - Quick response --> POST /api/v1/llm/generate
  - Real-time streaming --> POST /api/v1/llm/generate/stream
  - Structured JSON output --> POST /api/v1/llm/generate with jsonFormat: true
  - Analyze an image --> POST /api/v1/llm/generate with imageId parameter
  - OpenAI-compatible --> POST /v1/chat/completions

User wants audio transcription (STT)?
  - Transcribe audio file --> POST /api/v1/stt/transcribe
  - Real-time streaming --> POST /api/v1/stt/transcribe/stream

User wants speech synthesis (TTS)?
  - Generate speech --> POST /api/v1/tts/generate
  - Real-time streaming --> POST /api/v1/tts/generate/stream
  - Low-latency realtime mode --> POST /api/v1/tts/generate with realtime: true
  - Clone a voice --> POST /api/v1/tts/generate with referenceAudio

WebSocket for Real-Time

For agents needing real-time generation with progress updates:

Connection: wss://api.zelstudio.com:800/ws/generation

Supported operations: generate_image, generate_video, generate_llm, generate_stt, generate_tts

See LLM Text Generation, STT Transcription, and TTS Speech for streaming details.


Version: 1.12.0 | Documentation | npm