Figma Coder
Figma Coder · GPT-Aktionen
Figma Image and OpenAI Description API
API to fetch images from Figma and get descriptions from OpenAI.
POST /get-figma-image/getFigmaImageFetches an image from a Figma file and gets its description using OpenAI.
Ursprüngliches API-Schema
{
"openapi": "3.1.0",
"info": {
"title": "Figma Image and OpenAI Description API",
"description": "API to fetch images from Figma and get descriptions from OpenAI.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://figma-coder-fydv74t32q-uc.a.run.app"
}
],
"paths": {
"/get-figma-image/": {
"post": {
"description": "Fetches an image from a Figma file and gets its description using OpenAI.",
"operationId": "getFigmaImage",
"requestBody": {
"description": "Figma data for fetching the image",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FigmaData"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FigmaImageResponse"
}
}
}
},
"400": {
"description": "Invalid Figma URL format"
},
"404": {
"description": "Node ID not found in the Figma file"
},
"default": {
"description": "Unexpected error"
}
},
"deprecated": false
}
}
},
"components": {
"schemas": {
"FigmaData": {
"type": "object",
"properties": {
"figma_url": {
"type": "string",
"description": "URL of the Figma file"
},
"figma_token": {
"type": "string",
"description": "Figma API token"
}
},
"required": [
"figma_url",
"figma_token"
],
"title": "FigmaData"
},
"FigmaImageResponse": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "OpenAI's description of the image"
},
"image_url": {
"type": "string",
"description": "URL of the image from Figma"
},
"error": {
"type": "string",
"description": "Error message, if any"
}
},
"title": "FigmaImageResponse"
}
}
}
}