Diamond "Freevpn

AI Image Generation API Documentation (v1)

This endpoint provides a secure proxy gateway, allowing you to trigger AI image generation models without exposing your underlying service provider credentials.

1. Overview

2. Authentication

All requests must include a security token in the HTTP Header to prevent unauthorized access. You must obtain this token from your administrator.

3. Request Parameters

All parameters must be sent in the JSON request body.

ParameterTypeRequiredDescription
promptstringYesText description of the image you want to generate
sizestringNoImage resolution. Default: 1024x1024. Supported values: 256x256, 512x512, 1024x1024
nintegerNoNumber of images to generate. Default: 1. Recommended range: 1–4

4. cURL Example

5. JavaScript Example

6. Response Format

7. Error Responses

If an error occurs, the API will return a JSON error message.

8. Status Codes

CodeMeaning
200Request successful
400Invalid request parameters
403Invalid or missing API token
500Remote AI service failed or timed out
On This Page
Wiki
广告▲
广告▶
◀广告