Post to Pinterest from Codex

A scheduled Codex run can build boards and generate Pin creative today. The Pin itself is blocked in production for Trial-access apps, and the error names the tier.

Hermoso is a marketing MCP server: 301 tools over one OAuth’d endpoint that let an agent research the ads already running in a market, generate finished image and video ads, publish them, and build the paid campaigns behind them. Codex reaches all of it through one connection. This page is about one slice of that — what Codex can actually do on Pinterest, and what Pinterest will not let it do.

Connect Hermoso to Codex

  1. Create an API key. In Hermoso, open Settings → Agents & API keys and press + Create API key. It looks like hmk_… and carries real spend authority, so treat it like a password.
  2. Add it to ~/.codex/config.toml. Codex reads TOML, not JSON — a copied mcpServers block will not load:
    [mcp_servers.hermoso]
    url = "https://app.hermoso.ai/mcp"
    http_headers = { "Authorization" = "Bearer <your key>" }
  3. Ask Codex for something. “Pull my three closest competitors’ longest-running ads and remix the best hook into a 9:16 video,” or “post this render to the channel.” The agent picks the tools; you approve the spend.

The TOML detail is the one that trips people up: every other client in this list takes a JSON mcpServers object, and Codex takes [mcp_servers.<name>] with http_headers.

Then connect Pinterest itself, once, under Settings → Connectors in Hermoso. That is an OAuth consent screen, so it is the one step that needs a browser — everything after it is a tool call.

The Pinterest tools Codex gets

  • list_pinterest_boards — the account’s boards, including secret ones, with their ids.
  • create_pinterest_board — makes a new board.
  • post_to_pinterest — creates an image or video Pin on a board you name, with a title, a description, a destination link and alt text.
  • schedule_post — queues the Pin, carrying boardId.
  • list_pinterest_ads_campaigns / pinterest_ads_report — read the paid side.

The limit you need before you plan a Pinterest workflow: this app holds Trial access, and Pinterest refuses Pin creation in production on Trial. Their words, caught on the first real Pin: “Apps with Trial access may not create Pins in production.” Boards and reads do work on Trial — listing boards, creating boards, reading Pins — and Hermoso’s error names the access tier rather than telling you to reconnect, because reconnecting cannot fix it. An upgrade to Standard access is what unblocks Pin creation, and it is pending review. The same tier limits the paid side: on Trial, Pinterest exposes no ad accounts at all.

Pinterest limits worth knowing before you automate anything

TextA Pin description is capped at 800 characters and a Pin title at 100. It is enforced when the post is created or queued — refused while you are still there to fix it, rather than silently cut on the way out.
VisibilityPublic, and the control is the board rather than the Pin. A Pin inherits its board’s public or secret state, so “post it somewhere private” is expressed by choosing a secret board — which is why the board is a required argument rather than a default.
Carousel2 to 5 images, images only. Both bounds come straight from Pinterest’s own v5 OpenAPI (minItems: 2, maxItems: 5), which is the only machine-readable source Pinterest publishes — their developer site is a client-rendered app that returns nothing to a fetch. There is no multi-video source, so a video slide is refused rather than dropped.
Which accountboardId, and it is the only identity field refused at enqueue rather than at publish time: “A Pin has to go on a board — pass boardId. Nothing was scheduled: a Pin on the wrong board is a public mistake, so we never choose one for you.”

Try it in Codex

Ask for it in ordinary language — these are sentences, not a DSL:

“Non-interactive: for each new product in the feed, generate a vertical Pin image, a title and a description, and stage the whole batch as JSON.”

That walks list_pinterest_boardsplan_adgenerate_imagepost_to_pinterest. Interactively Codex shows the call before it runs it. Non-interactively there is nobody to ask, which is worth designing around on any step that publishes or spends.

Codex on Pinterest: the part that bites

Stage, do not publish. An unattended job that tries to create Pins in production on Trial access will fail on every item, and no retry policy fixes an access tier. Boards read and write, so the structure can be built for real, and boardId is refused at enqueue rather than at fire time — which for a scheduled run is the difference between a clean failure now and a silent one later.

For unattended runs, prefer the hermoso CLI with --json over the full tool manifest — it is far cheaper in context and easier to assert on.

Research Pinterest before you post

There is no Pinterest ad library, so competitor research on Pinterest is not something Hermoso claims. The creative you would run there is well covered by the rest of the studio — make_template_ad and the image models produce the vertical, text-forward stills the surface rewards.

The paid half

Pinterest Ads tools exist — campaign, ad group and an ad that promotes an existing Pin, everything created paused, and archiving rather than deleting because Pinterest’s API has no delete anywhere. But the same Trial-access tier that blocks Pin creation exposes no ad accounts, so ad writes are not usable until Standard access lands. That is the honest state, and it is better in a sentence here than discovered on a deadline.

What Codex cannot do on its own

An agent with a budget is only useful if the blast radius is bounded, so the fence is in the server rather than in a prompt. Every ad campaign, ad set, ad group and ad is created paused, and the status switches that arm real money refuse to run without an explicit confirmation flag. Every render is quoted first — hermoso_capabilities publishes each model’s exact credit cost before anything spends — and credits are reserved before the first provider call and settled at the exact cost afterwards, so a failed dispatch refunds rather than leaving you billed for nothing. Deletes are confirm-gated too, and every campaign tree is read back from the ad platform before your agent tells you what it built.

One step is deliberately not headless: linking an account is an OAuth consent screen, so you connect the channel once in a browser. Everything after that is a tool call.

The rest of the matrix

From Codex, post to: Facebook · Instagram · Threads · TikTok · YouTube · X · LinkedIn — or see everything Codex can publish to.

Post to Pinterest from: Claude · ChatGPT · Claude Code · Cursor · Cline · OpenClaw · Hermes · Ads from the command line

Frequently asked questions

Can Codex post to Pinterest?

Yes, through Hermoso's MCP server. Create an API key in Hermoso under Settings → Agents & API keys, then add https://app.hermoso.ai/mcp to Codex with an Authorization: Bearer header. Codex then has 301 tools, including the ones that publish to Pinterest — and the ones that research the ads already running in your market and render the creative in the first place.

How do I connect Pinterest to Codex?

Two steps, once each. Create an API key in Hermoso under Settings → Agents & API keys, then add https://app.hermoso.ai/mcp to Codex with an Authorization: Bearer header. Then connect Pinterest inside Hermoso under Settings → Connectors, which is an OAuth consent screen in a browser. After that Codex publishes to Pinterest as an ordinary tool call.

Does Codex need my Pinterest password?

No. You connect Pinterest to Hermoso once through an OAuth consent screen in a browser, and Codex then reaches it as a tool call. Linking an account is the one step that is not headless; nothing after it needs a password, and no credential is ever handed to the model.

What does it cost to post to Pinterest from Codex?

Pinterest charges nothing per API call, so publishing costs no credits. Credits are spent generating the Pin creative. Plans are $19, $49 and $149 a month for 1,000, 3,000 and 10,000 credits, and every feature is on every plan including Free — the only exception is enterprise SSO.

Start free — 25 credits at signup and 250+ more to earn, and every feature on every plan.

Start free   See pricing