LogoLogo
  • Moonveil Image Creation API
    • Create Images
    • Redraw Image
    • Expand Prompt
    • Image to Prompt
    • Get Image Generation Result
    • Retrieve Image History
    • Retrieve Image Costs
    • Retrieve Image Metrics
    • Retrieve Recharge History
    • Export Image as SVG
    • Retrieve Credit
  • GenAI Factory API
    • Create Task
    • Get Task Status
    • Upload Multiple Images
    • Create Asset
    • Get All User Assets
    • Get a Single Asset
    • Update Asset Description
    • Delete an Asset
  • Agent API
    • Start Conversation
    • Continue Conversation
    • Retrieve Conversation History
    • Retrieve All Sessions
    • Delete Conversation by Session ID
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Moonveil Image Creation API

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 5 months ago

Was this helpful?