---
name: ideogram-webhooks-events
description: >-
  Verify and reconcile Ideogram async webhooks with Ed25519 signatures, replay controls, deduplication, and polling fallback. Use when implementing or auditing an event receiver. Trigger with "verify an Ideogram webhook", "build Ideogram async callbacks", or "debug duplicate Ideogram events".
allowed-tools: Read,Glob,Grep,Write,Edit
argument-hint: "<receiver-route> <environment> <replay-window>"
version: 1.11.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
tags: [ saas, ideogram, webhooks ]
model: inherit
effort: high
compatibility: "Designed for Claude Code; receiver tests should use local signed fixtures"
title: ideogram-webhooks-events
canonical_url: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/ideogram-webhooks-events
last_updated: 2026-10-07T06:06:28.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [references/official-docs.md](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/ideogram-webhooks-events/references/official-docs.md).
>
> If the user asked to install this Skill, run `npx skilld install jeremylongshore/tons-of-skills-marketplace/ideogram-webhooks-events`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/ideogram-webhooks-events`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/jeremylongshore/tons-of-skills-marketplace/ideogram-webhooks-events) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/ideogram-webhooks-events`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/ideogram-webhooks-events --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/ideogram-webhooks-events --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Ideogram Webhook Verification and Reconciliation

## Overview

Accept Ideogram asynchronous completion only after cryptographic verification and idempotent reconciliation. Use the raw request body, bind all signed headers, acknowledge quickly, and retain polling as a recovery path because delivery is not guaranteed.

## Prerequisites

- A public HTTPS receiver, raw-body access, durable event store, queue, and clock.
- The submitted `generation_id`, destination object policy, and polling reconciler.
- Local Ed25519 fixtures for valid, invalid, stale, duplicate, and rotated-key deliveries.

## Current Contract

Async requests can include a webhook URL and return `generation_id`. Ideogram signs callbacks with Ed25519 and publishes keys at `https://api.ideogram.ai/v1/.well-known/jwks.json`. Signed headers identify generation, user, timestamp, key, and signature. Deliveries may duplicate, retries are limited, and polling remains necessary.

## Authentication

Webhook trust comes from signature verification, not a shared API key in the callback. Normal polling uses server-side `IDEOGRAM_API_KEY` in the `Api-Key` header; never expose it to the receiver request.

## Instructions

1. Capture the raw body bytes and required generation-ID, user-ID, timestamp, key-ID, and signature headers before JSON parsing.
2. Compute SHA-256 over the raw body and construct the signed message as generation ID, newline, user ID, newline, timestamp, newline, then the lowercase body hash.
3. Resolve the key ID from the JWKS cache and verify the lowercase-hex Ed25519 signature.
4. Enforce a bounded timestamp window and bind the callback to a known submitted generation and expected application tenant.
5. Persist a deduplication record keyed by generation and delivery evidence, return `2xx` quickly, and enqueue processing.
6. Validate safety, download approved output, persist it, and transition state idempotently.
7. On verification failure, refresh JWKS once; on missing delivery, append the returned generation ID to `GET /v1/generations/` and poll that resource.

## Tool Discipline

Use Read, Glob, and Grep for receiver, queue, state, and fixtures. Use Write and Edit for approved implementation and tests. Do not expose a receiver, submit paid async work, or replay production events by invocation alone.

## Approval Boundaries

Require approval for public routing, production keys, live submissions, replay-window changes, retained identifiers, and storage or publishing. Reject callbacks that cannot be tied to an authorized application operation.

## Error Handling

- Never verify reserialized JSON; whitespace changes break raw-body integrity.
- Refetch JWKS once on an unknown key or verification failure, then reject.
- Duplicate or late valid delivery is an idempotency case, not authority to create another asset.

## Output

Return receiver route class, signature and replay result, opaque generation ID, duplicate state, acknowledgment latency, downstream terminal and storage state, polling fallback, and cleanup. Exclude headers, bodies, URLs, prompts, and images.

## Examples

- Verify a fixture signed over exact raw bytes, acknowledge, then prove one durable state transition across two deliveries.
- Report `signature=pass; replay=fresh; duplicate=yes; transitions=1; poll_fallback=not-needed`.

## Validation

Test byte mutation, header mutation, stale timestamps, unknown and rotated keys, duplicates, out-of-order state, unsafe output, polling fallback, and object deletion. Confirm receiver logs contain no signed body or content.

## Resources

- [Current first-party evidence map](https://skilld.dev/api/skills-raw/jeremylongshore/tons-of-skills-marketplace/ideogram-webhooks-events/references/official-docs.md) — use the dated endpoint, webhook, billing, team, and training links as the contract index for this workflow.
- Recheck the endpoint-specific page and current OpenAPI description before relying on an enum, limit, beta feature, or lifecycle claim.
- Record live observations as environment-specific evidence, not as universal vendor guarantees.
