Image Generation
Generate high-quality images from text descriptions using ASI:One’s advanced AI models.
Generate high-quality images from text descriptions using ASI:One’s image generation API. This feature allows you to create custom images based on natural language prompts.
Overview
The image generation API accepts text prompts and returns generated images in various sizes. The API supports different image dimensions and uses advanced AI models to create realistic and creative images.
Endpoint: POST https://api.asi1.ai/v1/image/generate
Quick Start
cURL
Python
JavaScript
API Reference
Request Parameters
Supported Image Sizes
Response Format
The API returns a JSON response containing the generated image as a base64-encoded data URL.
Success Response:
- Status Code: 200 OK
- Content-Type: application/json
- Body: JSON object with image data
Examples
Basic Image Generation
cURL
Python
JavaScript
Landscape Image Generation
cURL
Python
JavaScript
Portrait Image Generation
cURL
Python
JavaScript
Error Handling
Common Error Responses
Example Error Response
Best Practices
Writing Effective Prompts
- Be Specific: Include details about style, mood, lighting, and composition
- Use Descriptive Language: Mention colors, textures, and artistic styles
- Specify Perspective: Include camera angles and viewpoints
- Add Context: Provide background information and setting details
Example Prompts
Rate Limiting
- The API applies rate limits based on your plan
- Monitor your usage to avoid hitting limits
- Implement exponential backoff for retries
Image Quality Tips
- Use High-Resolution Sizes: Choose larger sizes for better quality
- Provide Detailed Prompts: More specific prompts yield better results
- Experiment with Different Models: Try different models for various styles
- Consider Aspect Ratios: Choose appropriate sizes for your use case