# Generate an image with the PostEverywhere API

**Source:** https://posteverywhere.ai/docs/api/generate-image

---

[Works with ChatGPT, Claude and every AI agentWorks with all AI agentsConnect yours](https://posteverywhere.ai/agents)Connect your AI agent

Choose your AI agent and connect in seconds.

![](https://posteverywhere.ai/icons/agent-claude.7c82f37955.svg)

Claude

![](https://posteverywhere.ai/icons/agent-chatgpt.7fea935cf6.svg)

ChatGPT

![](https://posteverywhere.ai/icons/agent-cursor.6ba4a87b66.svg)

Cursor

![](https://posteverywhere.ai/icons/agent-claude-code.de1e124c77.svg)

Claude Code

![](https://posteverywhere.ai/icons/agent-grok.4553243764.svg)

Grok

![](https://posteverywhere.ai/icons/agent-gemini.69eaadb526.svg)

Gemini

![](https://posteverywhere.ai/icons/agent-perplexity.5acbaca9db.svg)

Perplexity

![](https://posteverywhere.ai/icons/agent-codex.05fd5c3ce1.svg)

Codex

![](https://posteverywhere.ai/icons/agent-copilot.b2633fb35f.svg)

Copilot Studio

![](https://posteverywhere.ai/icons/agent-windsurf.5f325eb21c.svg)

Windsurf

![](https://posteverywhere.ai/icons/agent-cline.2975c7b8f2.svg)

Cline

![](https://posteverywhere.ai/icons/agent-n8n.ec467d709a.svg)

n8n

![](https://posteverywhere.ai/icons/agent-openclaw.30702ad092.svg)

OpenClaw

![](https://posteverywhere.ai/icons/agent-muse.6620f99692.svg)

Meta Muse

![](https://posteverywhere.ai/icons/agent-dots.05fd5c3ce1.svg)

OpenAI DotsHermes AgentVS CodeOther[Add to Claude→](https://claude.ai/directory/posteverywhere)Works on every Claude plan, including free. [Full Claude guide](https://posteverywhere.ai/agents/claude)

- 1Add to Claude

One click from Claude’s connector directory.

- 2Sign in or start your free trial

New here? Create an account and start a 7-day free trial. It’s $0 today, and a card is needed. Then allow access and you’re sent back.

- 3Ask Claude

“Plan and schedule my posts for next week.”

Or paste this into any AI agent and it walks you through it:

`Read https://posteverywhere.ai/SKILL.md and help me plan and schedule next week's social media posts.`CopyPOST/ai/generate-image

# Generate an image with the PostEverywhere API

Generates one image, stores it in the media library and
returns a ready `media_id` for `createPost`. Credit cost depends on
the tier (`model`); credits are reserved atomically and refunded on failure.
Free-trial organizations without a paid subscription get
`402 upgrade_required`. Prompts are safety-filtered
(`400 prompt_rejected`). Additional AI burst limits apply on top of
the API-key limit. Error codes: `validation_error`, `prompt_rejected`,
`upgrade_required`, `insufficient_credits`, `rate_limit_exceeded`,
`generation_failed`, `internal_error`.

Guides: [AI caption guide](https://posteverywhere.ai/docs/generate-caption) · [Brand Kit API guide](https://posteverywhere.ai/docs/brand)

Copy MarkdownCopy for LLMThis endpoint accepts a JSON request body. See the [ai guide](https://posteverywhere.ai/docs/generate-caption) for a worked example.

## Responses

- 201Image generated and stored
- 400
- 401
- 402
- 403
- 429
- 500

## More in AI

- [Get the workspace's brand](https://posteverywhere.ai/docs/api/get-brand)
- [Generate a caption](https://posteverywhere.ai/docs/api/generate-caption)
[← Generate a caption](https://posteverywhere.ai/docs/api/generate-caption)[← All endpoints](https://posteverywhere.ai/docs/api/reference)
