
Test your Imagild client against versioned request and response fixtures before making paid model calls. Cover submission acceptance, task states and media retrieval separately. A fixture can show whether your client follows the contract; it cannot establish that a real model generated the requested scene or that the service meets an availability target.
Key Takeaways
- Label fixtures as synthetic or sanitized observations rather than presenting them as live results.
- Test HTTP status and task status independently.
- Keep production transport unavailable during local contract tests.
Capture the contract you intend to support
Use the Imagild API guide for the Base URL, allowed fields and asynchronous lifecycle. Store the date and client version associated with each fixture set.
You can create synthetic examples from the documented shape, or sanitize responses from an already authorized integration run. Remove keys, private prompts, filenames and account-specific media references. Replacing an identifier must not accidentally make its format invalid for the particular parser you are testing.
Do not call a hand-written fixture “a recorded successful generation.” Its provenance matters when someone later interprets a test report.
Represent acceptance without inventing media
This is a synthetic test fixture, not an API request or a retrieved task:
{
"fixtureSource": "synthetic-contract-example",
"httpStatus": 202,
"body": {
"data": {
"id": "11111111-1111-4111-8111-111111111111",
"status": "queued",
"poll_after_seconds": 5,
"usage": { "points": 10, "state": "reserved" },
"output_url": null
}
}
}
The UUID is illustrative and cannot be used to fetch a real result. Other task metadata can be added when your parser requires it. The important acceptance assertion is that the client saves the task ID and displays pending work, not a completed image.
Keep a separate fixture for succeeded with an authenticated content path. Do not imply that the submission response itself contains a public image.
Exercise failure states at their own layer
Include a successful HTTP task read whose data.status is failed, plus an unknown outcome requiring reconciliation. The client should inspect task errors and usage.state instead of treating every HTTP 200 as generation success.
At the request boundary, test unsupported fields such as image n, size and aspect_ratio, as well as two simultaneous reference selectors. These local cases test your adapter's behavior; they do not independently prove server-side authorization or validation.
Use the failed-job guide to align displayed recovery actions with the condition being simulated.
Give downloads their own fixtures
Return a valid small media fixture for the positive case, then simulate JSON or HTML arriving where your client expected an image. Check response status, content type and decoding. A string named “image.png” is not a valid image fixture merely because of its name.
The download troubleshooting guide describes that distinction. Keep private-output authentication in the test contract rather than silently replacing it with an unrestricted public URL.
The Node test runner documentation provides test and mocking mechanisms for JavaScript applications. Your fixture transport and clock remain application components, not an Imagild SDK.
Report precisely what passed
State which request shapes, state transitions and download cases passed for the tested client version. Keep fixture tests independent from live credentials and fail immediately if an unexpected request attempts to use production transport.
Pass this layer when acceptance remains pending, failed task reads do not look successful, unknown outcomes preserve identity and nonmedia bytes cannot reach publishing. A separate, explicitly bounded real-model check is needed to assess actual content and playback; passing these fixtures alone does not establish those results.
Related tasks
- What Should You Check Before Retrying a Failed Image or Video Job?
- Why Does My Downloaded Image Open as a Web Page?
Sources and scope
- Imagild API console: Actual request and task envelopes, strict parameters, references, membership, points usage and authenticated result retrieval.
- Node.js test runner: Application-side testing and mocking facilities; not proof of live model performance.
Product instructions were checked against the current Imagild API contract and the public model catalog. Code, budgets and acceptance checks are illustrative; this article does not claim a new paid generation test, an uptime measurement, a search-volume study or a ranking of AI citations.
Prepared by Imagild Editorial, the company editorial team responsible for these guides. AI assisted research and drafting. This is documentation-based guidance with proposed examples, not a claim of hands-on testing or an independent product review. Report a correction.
Cover: Original Imagild product screenshot captured on 28 October 2026; model availability and prices may change. This image is not an API response or a performance benchmark.