Get Generation Result
Method
This API follows the REST methodology.
HTTP Method
GET: Read a completed generation's DesignSpec โ the document the plugin materializes into Figma.
Naming Convention
The response is proxied verbatim from the internal wf2des-api data plane, so its fields are snake_case โ unlike the camelCase used by the row endpoints. The shape is worker-owned.
Request and Response
Headers
Request Headers
AuthorizationAcceptAccept-language
Response Headers
Content-Type
Get Result
URI
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| organization_id | integer | Required | Organization ID |
| project_id | integer | Required | Project ID |
| wf2des_id | string | Required | wf2des ID |
Response
The response is JSON (HTTP status: 200 OK).
{
"wf2des_id": "wf2des-001",
"spec": {
"root": { "type": "frame", "children": [] },
"spec_nodes_flat": []
},
"confidence": {
"score": 0.82,
"flag_count": 3
},
"artifact_urls": {
"parse": "1/7/wf2des/wf2des-001/1-parse.json",
"result": "1/7/wf2des/wf2des-001/1-result.json",
"manifest": "1/7/wf2des/wf2des-001/1-manifest.json"
}
}
Response Fields
| Name | Type | Description |
|---|---|---|
| wf2des_id | string | The run this result belongs to. |
| spec | object | null | The DesignSpec the plugin materializes โ the assembled node tree with its component bindings. |
| confidence | object | null | The run's confidence block, including flag_count (how many nodes were flagged for review). |
| artifact_urls | object | Bare S3 keys for the run's immutable artifacts (parse, result, manifest, and spec when spilled). |
Large specs are transparent to the caller. A spec over roughly 1 MB is spilled to its own S3 object at generation time and stored out of the document; this endpoint reads it back inline and returns it in the same field. The caller always sees a populated spec, never a pointer to follow.
Authentication
Authentication is performed using JSON Web Tokens (JWT) issued by Amazon Cognito. The caller must additionally hold access to the project.
Error Handling
| Description | Status Code | Status Name |
|---|---|---|
| Missing authentication credentials | 401 | Unauthorized |
| Insufficient permissions | 403 | Forbidden |
Result not found โ unknown wf2des_id, or the run has not produced one yet |
404 | Not Found |
| Upstream read failure (wf2des-api or S3) | 500 | Internal Server Error |
A run that is still parsing or assembling returns 404 here โ the result document exists only once assemble has written its terminal blocks. Poll the row through GET โฆ/wf2des/{wf2des_id} to know when it is ready.
Processing Flow
- Extract organization ID, project ID and
wf2des_idfrom path parameters. - Verify the user has access to the project.
- Proxy the read to the internal wf2des-api data plane (
X-AI-Service-Token), scoped to the organization and project. - The data plane loads the
design_generation_resultdocument; whenspecis absent and a spilledartifact_urls.specis present, it reads that object inline. - Return the document verbatim.