Introduction to YEScale Media
Welcome to the YEScale Media API documentation. This document provides a technical overview for developers looking to integrate our unified media generation service.YEScale Media is a powerful API layer designed to simplify the use of generative media models (Video, Audio, Images). Our primary goal is to abstract away the complexity of managing multiple endpoints and sources, such as official APIs (OpenAI, Stability AI), Fal-AI, and Replicate, providing you with a single, reliable point of integration.Core Features#
1. YEScale CDN#
All media generated through our service is automatically stored on the YEScale Content Delivery Network (CDN). This provides a stable, long-term storage solution for your assets, eliminating issues with temporary signed URLs from underlying services that expire quickly.Persistent Links: Generated media links do not expire.
High Availability: Benefit from a robust and globally distributed network.
Simplified Asset Management: No need to build your own system for downloading and re-hosting files.
2. Auto Route Mode#
Our intelligent routing system ensures high availability and successful task completion. If a request to a primary source fails for any reason (e.g., capacity issues, API errors), YEScale Media automatically reroutes the task to a capable alternative source to fulfill the request.Increased Reliability: Drastically reduces the rate of failed generations.
Seamless Fallback: The entire process is transparent to the end-user.
Optimized Performance: We continuously monitor provider performance to route your request to the best available option.
Example Scenario: A request for an image using dall-e-3 via the official API fails. YEScale Media's Auto Route Mode detects the failure and seamlessly resubmits the same request to a provider like Fal-AI, ensuring the user receives their generated image.3. Simplified & Unified Payload#
We provide a consistent and intuitive payload structure across all supported models, regardless of the underlying source. This dramatically reduces integration time and code complexity.The core structure is as follows:{
"model": "model-name",
"prompt": "Your descriptive prompt here.",
"config": {}
}
model (string): The identifier for the desired model (e.g., gemini-2.5-flash-image[nano-banana], gpt-image).
prompt (string): The text prompt for the generation.
config (object): A flexible container for all model-specific parameters. We standardize common parameters for ease of use.
Standardized config Parameters#
We standardize common parameters across similar model types. For example, image generation models often use:aspect_ratio: e.g., "16:9"
For image-to-image or video generation tasks, you can provide input media in the images list within the config object. We support both publicly accessible URLs and Base64 encoded strings for maximum flexibility.{
"model": "some-image-to-image-model",
"prompt": "A cat wearing a wizard hat.",
"config": {
"images": [
"https://example.com/source_image.jpg",
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA..."
]
}
}
API Reference#
The YEScale Media API is organized around the task resource. The workflow consists of submitting a task and then polling for its result.1. Submit a Task#
This endpoint creates a new media generation task. The task is processed asynchronously.Endpoint: POST /task/submit{
"model": "gpt-image",
"prompt": "Edit Text to We Are Yescale",
"config": {
"background": "transparent",
"quality": "low",
"size": "1024x1024",
"images": ["https://cdn.yescale.vip/yescale-gpt-image-e3cb4a854f7e.png"]
}
}
Success Response (202 Accepted):The response will contain a task_id which you will use to retrieve the result.{
"created_at": 1763103034,
"progress": "0%",
"results": {},
"status": "SUBMITTED",
"task_id": "yescale-gpt-image-3bff624161c0",
"updated_at": 1763103034
}
2. Get Task Result#
Retrieve the status and result of a previously submitted task using its task_id.Endpoint: GET /task/{task_id}task_id (string): The ID of the task returned from the POST /task/submit endpoint.
GET /task/t_0a1b2c3d4e5f6g7h8i9jSuccess Response (200 OK):Once the task is complete, the status will be completed, and the result object will contain the output, including the permanent YEScale CDN URL for your generated media.{
"finish_time": 1761576861,
"message": "YEScale - YESCALE_MEDIA - sora-2 - Task Result",
"progress": "100%",
"status": "SUCCESS",
"submit_time": 1761576676,
"task_id": "yescale-sora-2-eefd4aad095d",
"task_result": {
"note": "Link will be removed at the specified time (GMT+7).",
"url": "https://cdn.yescale.vip/yescale-sora-2-eefd4aad095d.mp4",
"url_expires_at": "2025-11-11 21:54:21"
}
}
Modified at 2025-11-14 07:02:42