APIs and capabilities
Image Generation Guide
Install the image generation skill, choose a Codex, Gemini or Grok image group, and generate or edit images with reference pictures.
To ask an AI assistant to generate or edit images, install this skill once, then describe what you need. The assistant can use the skill for these tasks. To write API requests yourself, see the API Scripting Guide.
Copy this prompt to your AI assistant
Replace `sk-XXXXX` with the image generation API key you created.
Create a key and select a group
- Open https://zhenapi.ai/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 source code, public conversations and Git. Ensure the process running the skill inherits this environment variable in every client.
Groups and image models
| API key group | Common image models | Usage |
|---|---|---|
| Codex Pro (External) | 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 generation and image editing. |
| Gemini (Official Direct) | gemini-nano-banana-2.1 gemini-3.1-flash-lite-image gemini-3.1-flash-image gemini-3-pro-image gemini-2.5-flash-image | For Gemini image generation. Specify the exact model ID. |
| Grok Enterprise | grok-imagine-image grok-imagine-image-quality | Select the desired model explicitly in your script or prompt. |
The model parameter is passed to the gateway as provided, but the model must be available for your key group. If you receive model_not_found, check your group on the API Keys page.
Example prompts after installation
Use this skill when you want an AI assistant to generate images for you. For direct API calls, response handling or application integration, open the API Scripting Guide for Python, Node.js and parameter examples.