---
title: "POST robots.job.generate_contextual_text.cancelled"
method: POST
path: "robots.job.generate_contextual_text.cancelled"
---

# POST robots.job.generate_contextual_text.cancelled

`POST robots.job.generate_contextual_text.cancelled` (webhook)

## Payload

- object
  - `type` 'robots.job.generate_contextual_text.cancelled', required: Type for the webhook event
  - `id` string, required: Unique identifier for the event
  - `created_at` string, date-time, required: Time the event was created
  - `object` object, required
    - `type` string, required
    - `id` string, required
  - `environment` object, required
    - `name` string, required: Name for the environment
    - `id` string, required: Unique identifier for the environment
  - `attempts` object[], required: Attempts for sending out the webhook event
    - `webhook_id` integer: Unique identifier for the webhook
    - `response_status_code` integer: HTTP response status code for the webhook attempt
    - `response_headers` object: HTTP response headers for the webhook attempt
    - `response_body` string, nullable: HTTP response body for the webhook attempt
    - `max_attempts` integer: Max attempts number for the webhook attempt
    - `id` string: Unique identifier for the webhook attempt
    - `created_at` string, date-time: Time the webhook request was attempted
    - `address` string: URL address for the webhook attempt
  - `data` object, required: Job object delivered in the Mux webhook event's data field. The event type identifies the workflow and transition.
    - `id` string, required: Unique job identifier.
    - `passthrough` string: Arbitrary string supplied at creation, returned as-is.
    - `units_consumed` integer, required: Number of Mux AI units consumed by this job.
    - `directive` object: The directive run that dispatched this job. Absent for jobs created via direct API POST.
      - `id` string, required: ID of the directive that dispatched this job.
      - `run_id` string, required: ID of the specific directive run that dispatched this job.
    - `created_at` integer, required: Unix timestamp (seconds) when the job was created.
    - `updated_at` integer, required: Unix timestamp (seconds) of the job's last state transition (e.g. when it started processing or reached a terminal state).
    - `workflow` 'generate-contextual-text', required
    - `parameters` object, required
      - `asset_id` string, required: The Mux asset ID whose transcript grounds the generated text.
      - `use_shots` boolean: When true for a video asset, generate or reuse Mux shots and attach a bounded sample of shot frames as additional visual evidence. Video assets always include a storyboard; the transcript remains authoritative. Not supported for audio-only assets.
      - `output_steering` object: Curated controls that apply to every generated artifact in every variant. Scope bounds execution; the other fields are best-effort writing guidance. To vary voice or audience between variants, use variant instructions.
        - `scope` object: Optional execution window in seconds on the original asset timeline. Text is grounded only in transcript cues and visual context that overlap this window.
          - `start_time` number: Start of the execution window in seconds from the beginning of the media. When omitted, the window starts at the beginning.
          - `end_time` number: End of the execution window in seconds from the beginning of the media. When omitted, the window extends to the end.
        - `audience` string: The intended reader, used as best-effort guidance for framing, vocabulary, and assumed context.
        - `voice` 'conversational' | 'editorial' | 'playful' | 'professional': Best-effort writing voice for every generated artifact in every variant. To give variants different voices, describe the voice in each variant's instructions instead.
        - `call_to_action` 'none' | 'soft' | 'direct': Best-effort guidance for whether and how the text should invite the reader to engage further.
        - `brand_terms` string[]: Preferred brand or domain terms to use exactly when the source supports them.
      - `variants` object[], required: Named versions of the complete artifact set. Every variant produces every artifact. Supports 1-5 variants with unique keys.
        - `key` string, required: Customer-chosen lowercase snake_case identifier used to correlate requested and returned content.
        - `instructions` string: Optional bounded guidance that gives this variant a deliberate angle, such as a voice, audience, or focus (for example, "Playful voice for a Gen Z audience"). Applies to every artifact in the variant. Omit it to request another independent take on the same brief.
      - `artifacts` object[], required: The deliverables to create. Every variant produces each artifact. Supports 1-5 artifacts with unique keys.
        - `key` string, required: Customer-chosen lowercase snake_case identifier used to correlate requested and returned content.
        - `instructions` string: Optional guidance specific to this artifact, such as the deliverable to write. Applies in every variant.
        - `channel` 'generic' | 'x' | 'linkedin' | 'facebook' | 'instagram' | 'tiktok' | 'youtube': Publishing channel whose conventions guide the result and set its default length: 300 words for generic and linkedin, 250 words for facebook and youtube, 100 words for tiktok, 1,500 characters for instagram, and 280 characters for x. generic has no platform conventions; its style follows the length cap, and a max_length above 600 words produces article-style writing such as a blog post or newsletter entry.
        - `max_length` union: Hard output cap in characters or words. Defaults to the channel's cap. Text aims for about 90% of the cap regardless of the source's length, so set the length you want rather than relying on the default. x is always capped at 280 characters, even with a word cap.
          - object
            - `unit` 'characters', required
            - `value` integer, required
          - object
            - `unit` 'words', required
            - `value` integer, required
        - `format` 'plain' | 'markdown': Whether the text may use Markdown syntax. plain contains no Markdown.
      - `language_code` string: BCP 47 language code of the caption track to analyze. When omitted, the first ready text track is used.
      - `output_language_code` string: BCP 47 language code for generated text. Defaults to the selected transcript track's language when available.
    - `status` 'pending' | 'processing' | 'completed' | 'errored' | 'cancelled', required: Current job status.
    - `errors` object[]: Error details. Present when status is 'errored'.
      - `type` string, required: Stable public error category identifier.
      - `message` string, required: Human-readable public error message.
      - `retryable` boolean: Whether retrying this job may resolve the error.
    - `resources` object: Related Mux resources linked to this job.
      - `assets` object[], required: Mux assets associated with this job.
        - `id` string, required: Mux asset ID.
        - `meta` object: Mux asset metadata, if available.
          - `title` string: Asset title from Mux metadata.
          - `creator_id` string: Creator identifier from Mux metadata.
          - `external_id` string: External identifier from Mux metadata.
        - `passthrough` string: Passthrough string from the Mux asset.
        - `_links` object, required: Hypermedia links for the asset.
          - `self` object, required
            - `href` string, required: URL to the Mux asset resource.
    - `outputs` object: Workflow results. Present when status is 'completed'.
      - `variants` object[], required
        - `key` string, required: Customer-chosen lowercase snake_case identifier used to correlate requested and returned content.
        - `artifacts` object[], required
          - `key` string, required: Customer-chosen lowercase snake_case identifier used to correlate requested and returned content.
          - `content` string, required

## Acknowledgement `200`

Return a 200 to indicate that the data was received successfully

---

[API](https://skmtc.dev/muxinc/apis/mux-api.md) - [All operations](https://skmtc.dev/muxinc/apis/mux-api/llms.txt) - [OpenAPI document](https://skmtc.dev/muxinc/apis/mux-api/revisions/75b4251a1d96?raw)
