Skip to content

API Reference

Custom Models Inference API Documentation

This document outlines the endpoints for the Custom Model API, allowing interaction with model generation, management, and configuration.

Inference API

This section details the available endpoints in the Inference API, used for obtaining information on available resources and managing image generation processes.

Aspect Ratios

Endpoint to retrieve available aspect ratios for image generation.

  • /infer_api/v1/aspect_ratios: Provides a list of available aspect ratios for image generation tasks.
Output Image Dimensions

Endpoint to get output dimensions for a specified aspect ratio.

  • /infer_api/v1/output_image_dimensions/{aspect_ratio}: Returns the dimensions associated with a specific aspect ratio.
Models Management

Endpoints for accessing model information and related resources.

  • /infer_api/v1/projects: Lists all available projects (blob storage containers).
  • /infer_api/v1/projects/{container_name}/models: Lists all models for a specific project.
  • /infer_api/v1/projects/{container_name}/models/{model_name}/config: Provides detailed information about a specific model, including its parameters and capabilities.
  • /infer_api/v1/projects/{container_name}/models/{model_name}/images: Retrieves images associated with a specific model.
Generation Jobs

Endpoints for managing and tracking image generation jobs.

  • /infer_api/v1/generations: Initiates a new image generation job using the specified model and parameters.
  • /infer_api/v1/generations/{job_id}/result: Obtains the result of a completed generation job, including the generated image(s).
Prompt Enhancement

Endpoint for refining and enhancing input prompts to improve generation quality.

  • /infer_api/v1/projects/{project_name}/models/{model_name}/enhance-prompt: Accepts an input prompt and modifies it to enhance the quality of the generated image.
Jobs Management

Endpoints for managing jobs in the Azure storage table.

  • /infer_api/v1/jobs: Retrieves all jobs.
  • /infer_api/v1/jobs/completed: Retrieves all completed jobs.
  • /infer_api/v1/jobs/failed: Retrieves all failed jobs.
  • /infer_api/v1/jobs/{job_id}: Deletes a specific job.
  • /infer_api/v1/jobs: Deletes all jobs.

Secure Route

A secure route that can only be accessed by the admin.

  • /infer_api/v1/secure-route: A secure route that requires an access token.