/firefly-services:firefly-services-rate-limitsfrom firefly-services
Production rate-limit strategy for Adobe Firefly Services — the commonly cited default of 4 RPM per credential (limits are org- and contract-specific — verify for your org), requesting increases, exponential backoff with jitter, token-bucket clients, SQS-fronted queueing for batch workloads, dead-letter queue handling, and per-endpoint quota planning. Use whenever the user mentions "429", "rate limited", "Too Many Requests", "Firefly is slow", "batch processing", "queueing", "high volume", "campaign at scale", or designs a system that will exceed 4 RPM. Encodes the production pattern that takes a generative pipeline from blocked at the default RPM ceiling to enterprise-scale campaign throughput.
Ships in firefly-services. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The production playbook for operating Firefly Services at scale. Default rate limits are conservative and can be raised per-customer on request; the architecture below is the pattern used in production for any deployment that exceeds a single-user workload — it scales a pipeline from blocked at the default ceiling to enterprise-grade campaign throughput.
Use this skill when:
Do NOT use this skill when:
firefly-services-troubleshoot §3Firefly Services rate limits are per-credential, per-endpoint, with both per-second and per-minute components. Documented defaults at the time of writing — actual provisioned limits are org- and contract-dependent, so verify for your org:
| Endpoint family | Default per credential | Notes |
|---|---|---|
| Generate Image (V3 async) | ~4 RPM | Most common limit; first thing to hit |
| Generate Similar | ~4 RPM | Shares quota family with Generate |
| Generate Expand / Fill | ~4 RPM | Shares quota family with Generate |
| Generate Video | Lower (~1 RPM) | Heavier compute |
| Custom Model training | 1 concurrent job per org | Throughput is training-time bound, not RPM |
| Photoshop API | ~10 RPM | Higher than Firefly |
| Lightroom API | ~10 RPM | Higher than Firefly |
| Token endpoint (IMS) | Not publicly documented — high in practice | Cache tokens aggressively; a token cache that re-auths on every call is a real failure mode (see firefly-services-auth) |
Numbers shift over time and can be raised per-customer via Adobe account management. Verify current limits in the Technical Usage Notes. Adobe officially documents only the 429 status with a Retry-After header for rate limiting; informational headers such as X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset may be present on some responses but are not reliably documented — do not depend on them. (Live check 2026-08-10 on a sandbox credential: an 8-call generate burst completed with zero 429s and no rate-limit headers on any response — enforcement is org-specific and invisible until it triggers, so treat documented defaults as planning numbers and build 429-reactive backoff rather than header-driven throttling.)
A real workload that exceeds 50 calls follows this four-layer pattern:
Customer-facing API
↓ (synchronous, low-latency response: "your job is queued")
Job intake → SQS / Pub/Sub / Service Bus
↓ (async worker pool, concurrency-bounded)
Token-bucket limiter (per-credential)
↓ (paces calls within the rate envelope)
Firefly Services
↓
Result persistence + customer notification (webhook or polling)
Each layer exists for a specific reason — skipping a layer is the most common cause of production pager incidents in these pipelines.
This is a non-technical step but it is the first one. Adobe will raise rate limits per-customer on request — you do not need to engineer around the default if the customer has volume to justify it.
| Action | Who |
|---|---|
| Open a support ticket with the customer's Adobe Enterprise account team | Customer's procurement / account owner |
| Provide projected volume: peak RPM, daily call count, business justification | Integration engineering team |
| Adobe responds with a proposed limit; agree and implement | Adobe + Customer |
Adobe raises limits per-customer through the enterprise account team. Provide the projected peak RPM and a clear business justification; the granted limit and the turnaround time are org- and contract-dependent, so budget the lead time into the project plan.
Even with a raised limit, build the architecture below — the limit exists, just at a higher number.
The lowest layer is a per-credential token-bucket that paces outbound requests to ~80% of the provisioned limit. The 20% headroom absorbs jitter from concurrent workers and Adobe-side response time variance.
Node implementation:
class TokenBucket {
constructor({ ratePerMin, burst = ratePerMin }) {
this.tokensPerMs = ratePerMin / 60_000;
this.maxTokens = burst;
this.tokens = burst;
this.lastRefill = Date.now();
}
async take() {
while (true) {
this.refill();
if (this.tokens >= 1) {
this.tokens -= 1;
return;
}
const msPerToken = 1 / this.tokensPerMs;
await sleep(msPerToken + Math.random() * 50); // jitter
}
}
refill() {
const now = Date.now();
this.tokens = Math.min(
this.maxTokens,
this.tokens + (now - this.lastRefill) * this.tokensPerMs,
);
this.lastRefill = now;
}
}
const sleep = (ms) => new Promise(r => setTimeout(r, ms));
Use ratePerMin = provisionedLimit * 0.8. Set burst to roughly 2 seconds of capacity — enough to absorb microbursts without queue starvation.
For multi-tenant services with per-customer credentials, hold one limiter per client_id. Do not share limiters across credentials.
When a 429 still slips through despite client-side limiting, retry with exponential backoff plus full jitter. Full jitter (random uniform [0, max]) is the right choice — equal jitter still produces thundering herds under heavy load.
async function callWithBackoff(fn, { maxAttempts = 5 } = {}) {
let attempt = 0;
while (true) {
attempt++;
try {
return await fn();
} catch (err) {
const status = err.response?.status ?? err.status;
if (status !== 429 && !(status >= 500 && status < 600)) throw err;
if (attempt >= maxAttempts) throw err;
const retryAfterSec = parseInt(err.response?.headers?.get('retry-after') ?? '0', 10);
const delayMs = retryAfterSec
// Retry-After is a minimum wait — sleep at least that long, plus small additive jitter
? retryAfterSec * 1000 + Math.random() * 1000
// No server hint: exponential backoff with full jitter
: Math.random() * Math.min(60_000, 1000 * 2 ** attempt);
await sleep(delayMs);
}
}
}
Honor Retry-After when present — Adobe knows the exact moment the quota refills. Treat it as a floor: sleep the full Retry-After duration and add jitter on top of it, never below it — a shorter sleep retries before the quota refills and burns an attempt. Full jitter belongs only on the exponential path, where there is no server hint.
Cap attempts at 5. Beyond that, surface the failure to the application — the request is going to dead-letter regardless.
For any workload above ~100 calls, place a durable queue in front of Firefly. This is non-negotiable. Without it, a transient Firefly slowdown becomes an application outage.
API Gateway / ALB (intake)
↓
Lambda: validate + enqueue (synchronous)
↓
SQS Standard queue (main work) (durable)
↓
Lambda: Firefly worker (concurrency-bounded) (paces calls)
│ - Pulls 1 message at a time
│ - Holds a per-credential TokenBucket
│ - Calls Firefly with backoff
│ - On success: writes result to S3 + DynamoDB
│ - On terminal failure: forwards to DLQ
↓
Result: S3 (images) + DynamoDB (job state) (persistence)
↓
EventBridge → customer webhook OR client polling (notification)
Dead-letter queue (DLQ) attached to main SQS with maxReceiveCount=3
↓
Alarm + manual replay path
Key configuration:
| Component | Setting | Why |
|---|---|---|
| SQS visibility timeout | 6 × max Firefly response time | Worker holds the message until call completes |
| Lambda reserved concurrency | max(1, floor(provisioned RPM / 60)) | Hard cap on concurrent calls — never 0 (reserved concurrency 0 throttles every invocation). At low provisioned RPM (e.g. the 4 RPM default) this is 1, and the token bucket in Step 2, not Lambda concurrency, does the pacing |
| Lambda batch size | 1 | Per-message error isolation |
| SQS maxReceiveCount | 3 | Move to DLQ after 3 failed attempts |
| DLQ retention | 14 days | Manual replay window |
Equivalent patterns on GCP: Pub/Sub + Cloud Functions, with Cloud Run for the worker if Firefly response times exceed Cloud Functions limits. On Azure: Service Bus + Functions, premium plan for sustained throughput.
| Use case | Estimated daily volume | Peak burst | Provisioned RPM | Architecture |
|---|---|---|---|---|
| Hero-asset generation | low thousands of calls/day | hundreds in a 5-minute window | raised limit (negotiated per customer) | SQS + Lambda worker, concurrency 1 |
| Template-driven compositing | low thousands of calls/day | hundreds in a 5-minute window | shares with above | Same queue, different topic |
| Full campaign batch | tens of thousands of calls across several hours | hundreds-to-thousands per hour | raised limit | Same architecture, multi-worker, runs over hours not seconds |
This architecture has been validated for high-volume template-driven campaign asset production at the scale of tens of thousands of calls in a single campaign run.
Every queue-fronted system has a DLQ. The patterns that matter:
| Failure type | Action |
|---|---|
| Adobe-side 5xx (transient) | Replay from DLQ after Adobe status page clears |
| Content-validation 422 (terminal) | Do not replay — the prompt or input was rejected; surface to customer |
| 403 (entitlement) | Do not replay — credentials are wrong; alert ops |
| Custom-model retired (404) | Do not replay — surface to customer; suggest re-training |
| Storage-reference expired (400312) | Replay only after regenerating fresh references |
The DLQ replay tool must classify the failure before replaying. Bulk-replay of a DLQ without classification will burn quota on requests that will never succeed.
For every Firefly call:
client_id (which credential)Retry-After header on any 429 (the one rate-limit signal Adobe documents). If informational X-RateLimit-* headers happen to be present, log them too — but treat them as best-effort, not guaranteedDashboards to build:
A 429 rate above 1% is the canary for an under-provisioned credential. A token cache hit ratio below 99% means refresh logic is broken.
Rate-limit architecture is production-ready when:
Retry-After honoringRetry-After header on every 429 (the documented signal); any X-RateLimit-* headers are logged opportunistically but not relied uponmax(1, floor(provisionedRPM / 60)).Retry-After header missing on 429: Some legacy endpoints don't return it. Fall back to exponential backoff with cap.firefly-services-auth — Token caching is half of the rate-limit storyfirefly-services-troubleshoot — 429 deep-divefirefly-generate-image-v3-async — The async pattern is the right shape for high-volumeWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub focus-gts/firefly-services-skills --plugin firefly-services19 skills in this plugin
/firefly-batch-pipelineThe end-to-end production reference architecture for high-volume generative campaign workloads on Adobe Firefly Services — SQS-fronted intake, Lambda worker pool with per-credential token-bucket pacing, Step Functions orchestration for multi-stage PSD composition, DynamoDB job state, S3 result persistence, DLQ replay, and webhook-driven customer notification. Use whenever the user mentions "batch pipeline", "campaign at scale", "thousands of images per day", "generative pipeline", "campaign assembler", "asset factory", "production-grade pipeline", or designs a system that combines Firefly generation with Photoshop composition at volume. Stitches `firefly-services-rate-limits` and `photoshop-api-composition` into a single deployable blueprint./firefly-brand-guardrailsEnforce brand compliance on generative output — custom-model lock-in, prompt and output content filtering, asset tagging for downstream policy, and the human-review queue pattern for regulated or brand-sensitive workloads. Use whenever the user mentions "brand compliance", "brand safety", "regulated industry", "review queue", "approval workflow", "content moderation", "brand guardrails", "legal review", "compliance hold", or generates assets for financial services, pharma, automotive, public sector, or any customer with a brand-review process. Encodes the production guardrail pattern that turns "Firefly generates whatever it wants" into "every asset that ships passes a documented compliance gate."Other plugins' skills for the same job