GET /v1/images/{file_key}
Renders images from a file.
If no error occurs, "images" will be populated with a map from node IDs to URLs of the rendered images, and "status" will be omitted. The image assets will expire after 30 days. Images up to 32 megapixels can be exported. Any images that are larger will be scaled down.
Important: the image map may contain values that are null. This indicates that rendering of that specific node has failed. This may be due to the node id not existing, or other reasons such has the node having no renderable components. It is guaranteed that any node that was requested for rendering will be represented in this map whether or not the render succeeded.
To render multiple images from the same file, use the ids query parameter to specify multiple node ids.
GET /v1/images/:key?ids=1:2,1:3,1:4
Servers
- https://api.figma.com
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
file_key |
String | Yes |
File to export images from. This can be a file key or branch key. Use |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
svg_outline_text |
Boolean | No |
Whether text elements are rendered as outlines (vector paths) or as Rendering text elements as outlines guarantees that the text looks exactly the same in the SVG as it does in the browser/inside Figma. Exporting as Default value: true |
svg_include_id |
Boolean | No |
Whether to include id attributes for all SVG elements. Adds the layer name to the Default value: false |
format |
String | No |
A string enum for the image output format. Valid values:
Default value: "png" |
svg_simplify_stroke |
Boolean | No |
Whether to simplify inside/outside strokes and use stroke attribute if possible instead of Default value: true |
use_absolute_bounds |
Boolean | No |
Use the full dimensions of the node regardless of whether or not it is cropped or the space around it is empty. Use this to export text nodes without cropping. Default value: false |
version |
String | No |
A specific version ID to get. Omitting this will get the current version of the file. |
contents_only |
Boolean | No |
Whether content that overlaps the node should be excluded from rendering. Passing false (i.e., rendering overlaps) may increase processing time, since more of the document must be included in rendering. Default value: true |
ids |
String | Yes |
A comma separated list of node IDs to render. |
scale |
Number | No |
A number between 0.01 and 4, the image scaling factor. |
svg_include_node_id |
Boolean | No |
Whether to include node id attributes for all SVG elements. Adds the node id to a Default value: false |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.