Export Image as SVG

This API retrieves or generates an SVG version of the output image for a specific task ID. The response includes the SVG URL of the requested image.

API Endpoint

GET https://api.genaifactory.ai/v1/export_svg/<task_id>

Headers

Name
Type
Required
Description

formacloud-api-key

string

Yes

API key for authentication.

Query Parameters

Name
Type
Required
Description

seq

integer

No

Sequence number of the output image (default is 0).

Path Parameters

Name
Type
Required
Description

task_id

string

Yes

The unique ID of the task to export the SVG for.

Example Request

curl --location 'https://api.genaifactory.ai/v1/export_svg/12345' \
--header 'formacloud-api-key: abc123' \
--header 'Content-Type: application/json' \
--request GET \
--data-urlencode "seq=0"

Response

Returns a JSON object containing the SVG URL of the requested image.

Response Fields

Field
Type
Description

svg_url

string

URL of the exported SVG image.

Example Response

{
  "svg_url": "https://cdn.genaifactory.ai/gen_ai_factory/temp/image/2024/12/16/7439a85e8339405b9ae680dc454f75f2.svg"
}

Error Responses

HTTP Code
Error
Description

404

TaskNotFoundError

The specified task ID does not exist.

400

InvalidInputError

The input is invalid (e.g., seq out of range).

400

InvalidInputError

Task is not a valid POSTER type.

Last updated