Skip to content

Cancel a queued generation

DELETE
/v1/generations/{generationId}
curl --request DELETE \
--url https://api-v1.tailwind.ai/v1/generations/example \
--header 'Authorization: Bearer <token>'

Cancel a Pin generation that is still queued, before Tailwind has started generating it. A cancelled generation is never charged, and it reads back as status failed with failureCode generation-cancelled. Once generation has started, its credits are committed and the cancel is refused with a 409; poll GET /v1/generations/{generationId} until it finishes instead. Most generations start within seconds, so a cancel usually only succeeds right after the generation was created. A 404 within ~10 seconds of creating the generation is a transient index-lag artifact, not a missing generation: retry the cancel.

generationId
required
string

Generation ID returned by POST /v1/accounts/{accountId}/generations

Generation cancelled

Media typeapplication/json
object
data
object
generation
object
id

Generation ID

string
status
string
Allowed values: processing success failed
siteUrl

Source URL the generation ran against

string
createdAt
string format: date-time
completedAt

Present once status is success or failed.

string format: date-time
nullable
failureCode

Stable failure code, present only when status is “failed”. Known values include scrape-failed, no-images-on-page, not-enough-credits, smartpin-content-flagged, smartpin-lapsed-user, smartpin-no-account, smartpin-account-not-connected, failed-to-upload-source-images, generation-request-timed-out, generation-cancelled; “unknown” when no code was recorded.

string
nullable
failureDetail

Why a scrape-failed generation failed; present only when failureCode is scrape-failed and the cause is known. blocked: the site’s firewall refuses Tailwind’s scraper; retrying won’t help until the site allows it. no-content: the page had no readable text, often because it was just published; retry once after a minute or two, and stop if it fails again. fetch-failed: the page couldn’t be loaded; retry later.

string
Allowed values: blocked no-content fetch-failed
meta
object
requestId

Unique request ID for debugging

string
Example
{
"data": {
"generation": {
"status": "processing",
"failureDetail": "blocked"
}
}
}

Authentication required or invalid bearer credentials

Media typeapplication/json
object
error
object
code

Error code

string
message

Error message

string
reason

Machine-readable reason. On PAYMENT_REQUIRED errors it is the denial reason: insufficient_credits, trial_exhausted, no_access, account_not_connected, legacy_post_limit_exceeded. Other errors may carry an operation-specific reason, such as pinterest_reconnect_required, pinterest_rate_limited, pinterest_timeout, pinterest_request_failed or list_boards_upstream_failed; each operation’s documented error responses show the values it returns. Branch on reason rather than parsing message.

string
resolve_url

Present on PAYMENT_REQUIRED errors: where the denial can be resolved. Reason-specific, because buying credits does not clear a trial, access or connection denial. Requests sent with X-Request-Source: mcp receive an informational plans page instead, so agent surfaces never present a purchase link.

string
meta
object
requestId

Unique request ID for debugging

string
Example
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key"
},
"meta": {
"requestId": "abc123"
}
}

Resource not found

Media typeapplication/json
object
error
object
code

Error code

string
message

Error message

string
reason

Machine-readable reason. On PAYMENT_REQUIRED errors it is the denial reason: insufficient_credits, trial_exhausted, no_access, account_not_connected, legacy_post_limit_exceeded. Other errors may carry an operation-specific reason, such as pinterest_reconnect_required, pinterest_rate_limited, pinterest_timeout, pinterest_request_failed or list_boards_upstream_failed; each operation’s documented error responses show the values it returns. Branch on reason rather than parsing message.

string
resolve_url

Present on PAYMENT_REQUIRED errors: where the denial can be resolved. Reason-specific, because buying credits does not clear a trial, access or connection denial. Requests sent with X-Request-Source: mcp receive an informational plans page instead, so agent surfaces never present a purchase link.

string
meta
object
requestId

Unique request ID for debugging

string
Example
{
"error": {
"code": "NOT_FOUND",
"message": "Account not found"
},
"meta": {
"requestId": "abc123"
}
}

The generation has already started, so its credits are committed, or it has already finished. Nothing was changed.

Media typeapplication/json
object
error
object
code

Error code

string
message

Error message

string
reason

Machine-readable reason. On PAYMENT_REQUIRED errors it is the denial reason: insufficient_credits, trial_exhausted, no_access, account_not_connected, legacy_post_limit_exceeded. Other errors may carry an operation-specific reason, such as pinterest_reconnect_required, pinterest_rate_limited, pinterest_timeout, pinterest_request_failed or list_boards_upstream_failed; each operation’s documented error responses show the values it returns. Branch on reason rather than parsing message.

string
resolve_url

Present on PAYMENT_REQUIRED errors: where the denial can be resolved. Reason-specific, because buying credits does not clear a trial, access or connection denial. Requests sent with X-Request-Source: mcp receive an informational plans page instead, so agent surfaces never present a purchase link.

string
meta
object
requestId

Unique request ID for debugging

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"reason": "example",
"resolve_url": "example"
},
"meta": {
"requestId": "example"
}
}

Rate limit exceeded

Media typeapplication/json
object
error
object
code

Error code

string
message

Error message

string
reason

Machine-readable reason. On PAYMENT_REQUIRED errors it is the denial reason: insufficient_credits, trial_exhausted, no_access, account_not_connected, legacy_post_limit_exceeded. Other errors may carry an operation-specific reason, such as pinterest_reconnect_required, pinterest_rate_limited, pinterest_timeout, pinterest_request_failed or list_boards_upstream_failed; each operation’s documented error responses show the values it returns. Branch on reason rather than parsing message.

string
resolve_url

Present on PAYMENT_REQUIRED errors: where the denial can be resolved. Reason-specific, because buying credits does not clear a trial, access or connection denial. Requests sent with X-Request-Source: mcp receive an informational plans page instead, so agent surfaces never present a purchase link.

string
meta
object
requestId

Unique request ID for debugging

string
Example
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Daily rate limit of 10000 requests for this organization exceeded. Resets at midnight UTC."
},
"meta": {
"requestId": "abc123"
}
}
Retry-After
integer

Seconds until the daily limit resets at midnight UTC.