You can use an agent to generate images without writing an API integration by installing the Kaien GPT Image 2 skill and then describing the image you need.

What you need

  • A Kaien API key with access to an image model.
  • Codex, Claude Code, Cursor, or another supported agent tool.
  • A local project directory where generated images can be saved.

Install the skill

Choose the command that matches your agent:
After installation, restart the agent if it does not discover the new skill automatically.

Configure the API key

When the agent asks for a key, provide it through the tool’s supported secret or environment-variable mechanism. Do not paste a real key into a committed file. A typical environment setup is:

Ask for an image

Give the agent a concrete request:
The agent should select a model, create an asynchronous image job, poll its status, and save the result locally.

Reference images

Give the agent a public image URL or a local path when the installed skill supports local upload. Describe what each reference image controls:

When a task fails

Ask the agent to inspect the original error response and task ID before retrying. A temporary polling error should not create a duplicate job. Common causes include an unavailable model, an expired reference URL, an unsupported size, or a missing API key.

Continue reading