Skip to navigation

Cancel an image generation

Cancels an AI Studio image generation.

The cancel itself takes no Idempotency-Key, as for the creator: cancelling twice is one act. Your application still sends one, because action approval requires it. Where the call uses AI, it spends the creator’s AI allowance, exactly as the creator’s own request does.

Agency policy

Your application’s call goes through action approval. It runs automatically within the daily count the agency’s own rule sets, or once an authorised person approves it. With no rule, you receive 202 with an ApprovalRequired body and nothing is done. After approval, send the same request again with Partner-Approval-Id.

Required scopes: write:ai.

Approval: this operation runs through action approval for applications.

Authentication

AuthorizationBearer

OAuth 2.0 client credentials. Request an access token at POST /partner/v1/oauth/token (grant_type=client_credentials) with the application’s client secret or a private_key_jwt assertion, then send it as Authorization: Bearer evpa_live_… (or evpa_test_… for a sandbox application). Tokens are opaque and short lived (see expires_in); there is no refresh token. Each operation lists the scopes it requires.

Required scopes:write:ai

Path parameters

creatorIdstringRequired>=1 character

The creator profile id — the ONLY source of the creator a request acts for.

generationRefstringRequiredformat: "^[A-Za-z0-9_-]{1,64}$"

A generation reference; a malformed one, or another creator’s, answers 404.

Headers

X-Creator-IdstringOptional

Optional echo of the path creatorId; any other value is refused with 403 CREATOR_CONTEXT_MISMATCH.

Idempotency-KeystringRequiredformat: "^[A-Za-z0-9_-]+$"1-128 characters

Your key for this request, required because the operation may need approval. Action approval claims an approval, or reserves the agency’s automatic budget, under this key; without it the request is 400 IDEMPOTENCY_KEY_REQUIRED before anything is asked, reserved or done.

  • The same request re-sent with the same key, with its Partner-Approval-Id or after an automatic pass, is that request again. It never has a second effect, also when copies arrive at the same time.
  • Where the operation stores its result under the key, you get that result again. Otherwise the answer is 409 with details.replay: true: APPROVAL_CONSUMED after an approval, IDEMPOTENCY_KEY_REUSED after an automatic pass. Read the resource to see the result.
  • The same key for a different action is 409 IDEMPOTENCY_KEY_REUSED, without details.replay.
  • An approval already spent under another key is 409 APPROVAL_CONSUMED.

The key is scoped to your application. See action approval.

Partner-Approval-IdstringOptionalformat: "^apr_[A-Za-z0-9]{24}$"

The approvalId a previous 202 APPROVAL_REQUIRED returned, for an operation your application may run only with approval. Re-send it with the same payload once a person has approved. A blank value is no approval.

The approval is spent once, for exactly that agency, application, creator, operation and payload digest, the same amount and currency, and at most the units it was given for. It is claimed for the request’s Idempotency-Key (required) and becomes final when the operation succeeds:

  • A refusal before the effect, a 4xx or 429, hands it back for your next attempt.
  • A 5xx, 503 included, keeps it claimed for this key, because the effect may have happened. It is handed back only when EVVA knows nothing was done.
  • The same key re-sent replays the request and never has a second effect. You get the stored result where the operation keeps one, otherwise 409 APPROVAL_CONSUMED with details.replay: true: read the resource to see the result.
  • Another key is 409 APPROVAL_CONSUMED.

When the approval cannot be used, the request is refused with 403 (APPROVAL_INVALID, APPROVAL_MISMATCH or APPROVAL_DECLINED) or 409 (APPROVAL_PENDING, APPROVAL_EXPIRED or APPROVAL_CONSUMED). See action approval.

Response

The outcome: CANCELLED when the work will not happen, or CANCELLATION_REQUESTED when a provider already has it.

outcomeenum
Allowed values:
generationobjectOptional
A studio image. No provider, model or routing evidence is ever included.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error