# 2026-10-04 — Plain SDK results for polling and webhooks (improvement · SDK · sdk 0.0.49 · BREAKING)

> SDK results are serializable objects with task cost, successful media, and failures; webhook callbacks receive the same result shape.

Completed SDK calls now return plain objects. You can pass them to client
components, server functions, and Convex mutations, or serialize them with
`JSON.stringify`.

Update result access when upgrading to `@mynthio/sdk@0.0.49`:

| Before                                      | Now                                                          |
| ------------------------------------------- | ------------------------------------------------------------ |
| `result.id`                                 | `result.taskId`                                              |
| `result.getImages()`                        | `result.images`                                              |
| `result.getVideos()`                        | `result.videos`                                              |
| `result.getMetadata()`                      | `result.metadata`                                            |
| `result.result.model`                       | `result.model`                                               |
| `result.result.magic_prompt`                | `result.magicPrompt`                                         |
| `result.getImages({ includeFailed: true })` | Read successful `images` and errors in `failures` separately |
| `image.mynth_url`                           | `image.mynthUrl`                                             |

Images from generation, upscaling, and background removal share `width`,
`height`, `format`, `mimeType`, and delivery fields. `url` stays `null` when
delivery fails, so choose `image.url ?? image.mynthUrl` when either URL works.
`raw.request` and `raw.result` keep the API fields before mapping.

Framework webhook helpers now pass the same results as polling. Replace
`payload.task.id` and `payload.result.images` with `result.taskId` and
`result.images`. Failed callbacks receive a plain object with `taskId` and
`errors`, plus request metadata when supported.

Result names such as `ImageGenerationResult` are type-only exports. Remove
constructor calls and `instanceof` checks. Pending `TaskAsync` handles still
use `id` and `wait()`.

See [generating media](/docs/sdks/typescript/generating-media) and
[webhooks](/docs/concepts/webhooks).

Permalink: https://mynth.io/changelog/2026-10-04-sdk-plain-results · Markdown: https://mynth.io/changelog/2026-10-04-sdk-plain-results.md
