Introduction to aiapigiare Media

Introduction to aiapigiare Media

Welcome to the aiapigiare Media API documentation. This document provides a technical overview for developers looking to integrate our unified media generation service.

aiapigiare 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. aiapigiare CDN

All media generated through our service is automatically stored on the aiapigiare 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), aiapigiare 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. aiapigiare 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:

(Code extracted to sandbox)

  • 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:

  • size: e.g., "1024x1024"
  • aspect_ratio: e.g., "16:9"

Input Images

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.

(Code extracted to sandbox)

API Reference

The aiapigiare 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

Request Payload:

(Code extracted to sandbox)

Success Response (202 Accepted):

The response will contain a task_id which you will use to retrieve the result.

(Code extracted to sandbox)

2. Get Task Result

Retrieve the status and result of a previously submitted task using its task_id.

Endpoint: GET /task/{task_id}

Path Parameters:

  • task_id (string): The ID of the task returned from the POST /task/submit endpoint.

Example Request:

GET /task/t_0a1b2c3d4e5f6g7h8i9j

Success Response (200 OK):

Once the task is complete, the status will be completed, and the result object will contain the output, including the permanent aiapigiare CDN URL for your generated media.

(Code extracted to sandbox)

Infrastructure: AiApiGiaRe-v10.0
Gateway Status: Operational