Image Generate
Scenarios
When you need to generate an image based on a text description, use this skill to call the image_generate function.
Steps
- Prepare a clear and specific
prompt. - Run the script
python scripts/image_generate.py "<prompt>". Before running, navigate to the corresponding directory. - The script will return the generated image URL.
Authentication and Credentials
- First, it will try to read the
MODEL_IMAGE_API_KEYorARK_API_KEYenvironment variables. - If not configured, it will try to use
VOLCENGINE_ACCESS_KEYandVOLCENGINE_SECRET_KEYto get the Ark API Key.
Output Format
- The console will output the generated image URL.
- If the call fails, it will print the error information.
Examples
python scripts/image_generate.py "a cute cat"