Figma icon

Figma

Use the Figma API

Figma File → Get Image

AI-generated

Summary

Retrieve rendered images from a specific Figma file by specifying the file key and additional optional query parameters to control the image export.

Inputs

  • Key (required) — The unique key identifying the Figma file to retrieve images from.
  • Query Parameters — Optional parameters to customize the image retrieval, such as node IDs, image format, scale, version, and others supported by the Figma API's image endpoint.

Output shape

a JSON object containing image URLs corresponding to requested nodes in the file, including metadata based on the query parameters provided

The output follows Figma API's image export response format and includes URLs for images rendered from nodes specified. Query parameters control aspects like image version, scale, format, and specific node IDs. The 'Key' parameter is mandatory; missing it results in an error.

Examples

Example 1: Retrieve PNG images for specific nodes in a Figma file.

Set the 'Key' to the target file's key and provide node IDs in the 'ids' query parameter to get image URLs for those nodes.

Discussion