Skip to main content
IMessageConversationInput is accepted by client.media.renderIMessageConversation(input) and by the native conversation mode of the Create DM workflow node. Use compileIMessageConversation(input) to validate authoring settings and inspect the generated timing plan locally. See Create iMessage videos for complete examples and the submit/poll/download flow. All time and duration fields ending in Ms use milliseconds. Input objects are strict: unsupported properties reject. Display strings must contain valid, printable Unicode; IDs use only letters, digits, _, and -.

Top-level input

The complete request must fit within 16 MiB. The compiled conversation cannot exceed 120,000 ms, 6,000 animated grapheme clusters, or 6,100 events. Image payloads have additional decoded-image limits below.

Contact and group

Contact

Direct chats use sender: 'user' for the local person and sender: 'recipient' for the contact. Reaction actors use the same IDs.

Group

Each participant has required id and name, plus optional avatarPngBase64. IDs are 1–80 characters using [A-Za-z0-9_-]; names are 1–80 characters after trimming. A message’s sender and each reaction’s actor must name a supplied participant. All avatar PNGs must be single-frame images no larger than 512 × 512, with at most 65,536 base64 characters. Native ContactsUI performs the avatar crop. These inputs do not save or modify a real contact.

Status bar

These options configure the rendered phone, not the host device’s actual clock, network, or battery settings. There is no carrier-name or network-type selector.

Messages

Message images must fit within 2048 × 2048 and 8 MiB of base64 characters. Across all message images, decoded area may not exceed 16,777,216 pixels. PNGs are decoded and validated by the worker; local compilation is not a complete image decoder. Animated PNGs, captions, and combined text/image bodies reject. The latest outgoing message owns the visible native delivery/read label. Earlier labels disappear when a newer outgoing message is sent. Receipt transitions can extend the compiled duration. Conversation timestamps remain separate from playback timing and statusBar.time.

Timing

All fields are optional. The same object shape is used for global timing and each message’s timing. Explicit zero values are preserved where allowed. The compiler reserves native transition time around sends, local replies, attachment insertion, and reaction menus. Requested pauses do not override those native transition requirements. When incoming typing is hidden, its calculated or explicit delay still applies.

Reactions

Local set opens the native menu and selects a classic reaction. Local remove reselects the actor’s current reaction through that menu; omit both reaction and emoji for removal. A second set replaces the same actor’s previous reaction. Remote updates appear without operating the local menu. Local picker opening is scheduled no earlier than delayMs, message/native transition completion, and any prior local interaction. Remote updates remain relative to their target’s arrival. Some reaction frames can differ at the pixel level between independent renders; seeded timing is not a full pixel-identity guarantee.

Expanded thread views

Each entry in threads contains: At most 10 views are allowed, with no overlap. The native expanded thread opens for reading, then closes back to the conversation. Typing/sending during these explicit views is unsupported. Local replyTo composition has its own automatic open/type/send/close flow and does not require a threads entry. The full output, including thread views and endHoldMs, must remain within 120 seconds.

Output

Choose one strict object shape:
  • Video is 60 fps H264 MP4 at 1126 × 2436. It contains one background-colored padding column for codec compatibility. Encoded video is deliberately lossy.
  • PNG is the original 1125 × 2436 native frame. atMs is an integer from 0 through the compiled durationMs; omit it for the final authored frame.
  • PNG output does not resize or extract a frame from MP4. It renders the same native scene at the chosen time.
  • Audio/music, custom resolution, alternative device profiles, and other video frame rates are not options in this contract.

Limits and validation

  • At most 30 messages, 6,000 animated grapheme clusters, 6,100 generated events, and 120,000 ms including native transition allowances and the final hold.
  • At most 20 reaction events per message and 10 expanded thread views.
  • The request must fit within 16 MiB. Avatar and message PNGs must meet the encoded-size, decoded-size, and single-frame rules above.
  • Initial history must precede animated messages. Reply targets must exist earlier in the array. All senders and reaction actors must belong to the chat.
  • Set sentAt on every message or none, in chronological order. A Read receipt requires readAt; other receipt states must omit it.
  • Animated local replies and emoji entry require the visible keyboard. Custom emoji reactions are accepted only for remote participants.
  • Unknown fields, nonfinite numbers, unsupported profile/frame-rate values, invalid Unicode, overlapping thread views, and out-of-range values reject.
  • Full-screen and bubble-send effects, image captions, custom fonts/coordinates, carrier/network-type controls, and low-level event scripts are unsupported.
Local compilation validates the authoring contract. The worker additionally validates decoded PNG data and native interaction availability. A successful compile is not a guarantee that later rendering or download will succeed.

Compiled timing plan

compileIMessageConversation(input) returns IMessageConversationPlan locally, without a network request. It resolves defaults and adds these timing fields: Other resolved fields include version: 1, profile, contact, optional group, appearance, output settings, and normalized message records. The plan is for timing inspection. Submit the authoring input, not the compiled plan; arbitrary low-level event scripts are not accepted by the public endpoint.

Job result

The SDK’s submission, status, and cancellation methods return ApiResponse<IMessageConversationJob>. On success, read response.data after checking response.ok. The normalized job contains: The compiler’s canonical sample count and a PNG job’s durationInFrames serve different purposes: a PNG job returns one image while durationMs still describes the conversation. Runtime failures can occur after local compilation, including invalid decoded images, unavailable native rendering, or unsupported native emoji interactions. Honor the returned error and retryability instead of assuming local validation guarantees a successful render. For raw HTTP envelopes, authentication, organization selection, response codes, and examples, use the endpoint reference.