DOC 09APIs and capabilities
Image Generation Guide
Install the image generation skill, choose a GPT, Grok or Seedream image group, and generate or edit images with reference pictures.
To have an AI assistant generate or edit images for you, install this skill once and then describe what you need. To write API requests yourself, see the API Scripting Guide.
Copy this prompt to your AI assistant
Replace sk-XXXXX with the image generation key you created.
Please install and enable this image generation skill:
https://spiderai.fun/install/skill/image-gen/INSTALL.md
When I ask you to generate an image, edit an image, or create a new image from a reference,
use this skill by default and prefer its scripts.
This is my API key for image generation:
sk-XXXXX
Save this key in the environment variable IMAGE_GEN_API_KEY
and use it for all image generation and editing.
Do not write the key into code, replies or Git commits.Create a key and choose a group
- Open API Keys and create an API key.
- Choose the group for your image model and copy the complete key.
- Save the key in the environment variable
IMAGE_GEN_API_KEY, then ask your assistant to install the skill. - Keep the key out of code, public chats and Git. Make sure the process running the skill inherits this variable in every client.
Groups and image models
| Key group | Common image models | Usage |
|---|---|---|
| GPT General | gpt-image-2.6-sunburst gpt-image-2.6-flare gpt-image-2.5-sunburst gpt-image-2.5-flare gpt-image-2 | Recommended for general text-to-image and editing. |
| GPT Economy | gpt-image-2.6-sunburst gpt-image-2.6-flare gpt-image-2.5-sunburst gpt-image-2.5-flare gpt-image-2 | Same usage and per-image prices as above. |
| GPT Images | gpt-image-2.6-sunburst gpt-image-2.6-flare gpt-image-2.5-sunburst gpt-image-2.5-flare gpt-image-2 | Image-only group; same usage as above. |
| Grok General | grok-imagine-image grok-imagine-image-quality | Switch to the model explicitly in the script or your prompt. |
| Seedream Images | seedream-5-5 | Say in your prompt that seedream-5-5 should be used. Up to 10 reference images; for transparent backgrounds and layer splitting see the Seedream 5.5 Image Guide. |
The model is passed to the gateway as given, but it must belong to your key’s group. If you get model_not_found, check the group on the API Keys page.
Example prompts after installation
Use the image generation skill to create a clean blue tech-style product poster with plenty of white space.Use the image generation skill to edit my image: change the background to light blue and keep the subject and text unchanged.Use the image generation skill to create a new brand visual from my reference image, keeping the subject and unifying the colors.Use the image generation skill and switch to grok-imagine-image-quality to create a cinematic banner.Tip
Use this skill when you want an assistant to make images for you. For direct API calls, response handling or integration into your app, see the API Scripting Guide.