Documentation Index
Fetch the complete documentation index at: https://docs.aihubmix.com/llms.txt
Use this file to discover all available pages before exploring further.
Imagen Guide
Imagen is an advanced series of image generation AI models developed by Google, capable of creating high-quality, realistic images based on text prompts. This guide will help you understand how to use the Imagen API to generate images, including parameter settings, model selection, and code examples. Modelos Disponíveis:- imagen-4.0-ultra-generate-001
- imagen-4.0-generate-001
- imagen-4.0-fast-generate-001
- imagen-4.0-fast-generate-preview-06-06
- imagen-3.0-generate-002
Model Parameters
Imagen currently only suporta English prompts and provides o seguinte parameters:- numberOfImages: The number of images to generate, ranging from 1 to 4 (inclusive). The default value is 4.
imagen-4.0-ultra-generate-001can only generate 1 image at a time.- aspectRatio: Changes the aspect ratio of the generated images. Supported values are “1:1”, “3:4”, “4:3”, “9:16”, and “16:9”. The default value is “1:1”.
- personGeneration: Allows the model to generate images of people. Suporta o seguinte values:
- “DONT_ALLOW”: Prevents the generation of images containing people.
- “ALLOW_ADULT”: Geres images of adults but not children. This is the default value.
Usage Pricing
The cost of using the Imagen API to generate images:- imagen-4-ultra:$0.06/image
- imagen-4:$0.04/image
- imagen-4-fast:$0.02/image
- imagen-3:$0.03/image
API Call Example
Here’s a Python example of generating images using Imagen 3.0:Prompt Tips
Creating effective prompts is crucial for obtaining desired images:- Use detailed descriptions, including subject, style, lighting, angle, etc.
- Specify artistic styles (como cinematic, photorealistic, anime style, etc.).
- Include technical details (como DSLR, high-definition, rich in detail, etc.).
- Avoid negative or prohibited content.
- Avoid including large amounts of text in prompts, only use key keywords for more stable results.
Gemini Image Generation
Gemini also offers image generation capabilities as an alternative. Compared to Imagen, Gemini’s image generation is better suited for scenarios that require contextual understanding and reasoning, rather than pursuing ultimate artistic expression and visual quality. Instructions:- Model id:
gemini-2.5-flash-image-preview - Input/Outpt pricing: Text: $0.3→$2.5/M tokens; Image: $0.3→$30/M tokens
- Need to add parameters to experience new features:
"modalities":["text","image"] - Images are passed and output in Base64 encoding
- Default height for output images is 1024px
- Python calls require o mais recente OpenAI SDK, run
pip install -U openaifirst - Para mais informações, visit the Gemini official documentation
Text-to-Image Generation
Input: text Output: text + image
Edit Image
Input: text + imageOutput: text + image

Choosing the Right Model
When to Escolha Gemini:
- When você precisa leverage world knowledge and reasoning abilities to generate contextually relevant images.
- When você precisa seamless integration of text and images.
- When you want to embed accurate visual content in long text sequences.
- When you want to edit images conversationally while maintaining context.
When to Escolha Imagen:
- When image quality, photorealism, artistic detail, or specific styles (como impressionism, anime) are the primary considerations.
- When performing professional editing tasks, como product background updates or image enlargement.
- When injecting branding, style, or generating logos and product designs.
Melhores Práticas
- Optimize prompts: Carefully crafting prompts is key to obtaining high-quality output.
- Experiment with parameters: Try different aspect ratios and settings to find the configuration that best suits your needs.
- Batch generation: Gere multiple images to increase the chance of getting ideal results.
- Save metadata: Save prompts and timestamps along with images to track and replicate successful results.
- Comply with usage policies: Ensure your usage complies with Google’s content policies and terms of service.
Veo 3.0 Video Generation
VEO 3.0 is o mais recente advanced video generation model developed by Google DeepMind. With VEO 3.0, você pode generate videos with o seguinte features:- Enhanced quality from text and image prompts
- Speech, como dialogue and voiceovers
- Audio, como music and sound effects
Known Limitations
Atualmente, VEO 3.0 parameters are fixed and cannot be changed:- Resolution: 720p (landscape)
- Frame Rate: 24fps
- Video Length: 8 seconds
Preços
The cost of the VEO 3.0 API is $0.675/second (Aihubmix offers a 10% limited-time discount)Usage Example
VEO 3.0 currently only suporta curl command calls, using a two-step process: Note:sk-*** is your key generated on AiHubMix.
Response Examples
Passo 1 Response:Melhores Práticas
- Be Patient: Video generation usually takes a few minutes, longer during peak times
- Check Status: If the response doesn’t contain
done: true, it’s still processing - Save Operation ID: Certifique-se de salve o operation ID returned from Passo 1 for subsequent queries
- Comply with Usage Policies: Ensure your usage complies with Google’s content policies and terms of use
Veo 3.0 Reverse API Access
AIhubmix offers a reverse access method that delivers the same output quality as the official API but at a lower rate—just $0.41 per request. However, observe que any reverse method cannot guarantee stable generation. Recomenda-se for use in development environments as early experimentation or for personal exploration only. Known limitations are consistent com o official API. See the “Veo 3.0 Video Generation” section above.Response Examples
The VEO 3.0 reverse API is OpenAI-compatible. Simply specify the model IDveo-3 along with your video prompt.
Example Response
The output is a video URL. Please save it locally in time.Veo 2.0 Video Generation
VEO 2.0 is an advanced video generation AI model launched by Google, capable of creating high-quality, realistic short videos based on text prompts. This part will help you understand how to use the VEO 2.0 API to generate videos, including parameter settings, model selection, and code examples.Model Parameters
VEO 2.0 provides o seguinte parameters:- numberOfVideos: The number of videos to generate, options are 1 or 2. Default is 2.
- aspectRatio: The aspect ratio of the generated videos. Supported values are “16:9” and “9:16”.
- durationSeconds: Video duration, options are 5 seconds or 8 seconds. Default is 8 seconds.
- personGeneration: Controls whether to allow videos containing people. Suporta o seguinte values:
- “dont_allow”: Prevents generation of videos containing people.
- “allow_adult”: Allows generation of videos containing adults, but not children.
Preços
The cost of the VEO 2.0 API is $0.35/sUsage Example
Here’s a Python example of using VEO 2.0 to generate videos:Prompt Tips
Creating effective prompts is crucial for obtaining desired videos:- Describe clear scenes, actions, and atmosphere
- Specify filming styles (como panoramic, close-up, tracking shots, etc.)
- Describe lighting conditions (como sunny, dusk, indoor lighting, etc.)
- Specify the main subject and its actions (p. ex., “a kitten sleeping no sunshine”)
- Avoid overly complex narratives or rapidly changing scenes
- Avoid negative or prohibited content
Melhores Práticas
- Clear and concise prompts: Use clear, specific descriptions to guide video generation.
- Patience is key: Video generation takes 2-3 minutes, please wait for completion.
- Test different parameters: Try different aspect ratios and durations to find the settings that best suit your needs.
- Save generation records: Record prompts along with generated videos to track successful results.
- Comply with usage policies: Ensure your usage complies with Google’s content policies and terms of use.
Última atualização: 2026-06-01