PhoenixGenAI

Good to know: All GenAI interfaces require token as a request header parameter.

Query a Task

Calling the genAI interface will return a task id, which is the unique identifier for each call. You can use the task id to query the results of the task.

Polling

GET https://www.phoenix.global/sdk/computation/genAI/queryTask

Headers

Name
Type
Description

token*

string

The token generated in the previous step

Query Parameters

Name
Type
Description

task_id*

string

Task id

Response

{
    "code": 200,
    "msg": "Success",
    "task_id": "40a5a249-xxxx-xxxx-9ede-0618df6e77e0",
    "result_url": "https://xxxxxx.jpg"
}

CURL and Golang SDK

Websocket Streaming

Good to know: Generating motion may take a long time. It is recommended to use WSS to obtain task results.

WSS wss://www.phoenix.global/sdk/ws/watch/all

Headers

Name
Type
Description

token*

string

The token generated in the previous step

Response

Golang Demo

Demo of using Go language to connect to WSS and read messages.

Base GenAI

Generating an image by base mode.

POST https://www.phoenix.global/sdk/computation/genAI/genImg

Headers

Name
Type
Description

token*

string

The token generated in the previous step

Request Body

Name
Type
Description

prompt*

string

Prompt

negative_prompt

string

Negative prompt

Response

CURL and Golang SDK

SDXL GenAI

Generating an image by SDXL mode.

POST https://www.phoenix.global/sdk/computation/genAI/genImgSDXL

Headers

Name
Type
Description

token*

string

The token generated in the previous step

Request Body

Name
Type
Description

prompt*

string

Prompt

negative_prompt

string

Negative prompt

Response

CURL and Golang SDK

Flux GenAI

Generating an image by Flux mode.

POST https://www.phoenix.global/sdk/computation/genAI/genImgFlux

Headers

Name
Type
Description

token*

string

The token generated in the previous step

Request Body

Name
Type
Description

prompt*

string

Prompt

Response

CURL and Golang SDK

Text to Motion

Generating a gif from prompts.

Good to know: Generating motion may take a long time. It is recommended to use WSS to obtain task results.

POST https://www.phoenix.global/sdk/computation/genAI/txt2Motion

Headers

Name
Type
Description

token*

string

The token generated in the previous step

Request Body

Name
Type
Description

prompt*

string

Prompt

negative_prompt

string

Negative prompt

Response

CURL and Golang SDK

Image to Motion

Generating a gif from an image

POST https://genapi.phoenix.global/sdk/computation/genAI/img2Motion

Headers

Name
Type
Description

Token*

string

The token generated in the previous step

Request Body

Name
Type
Description

image_path*

string

Image URL

prompt*

string

Prompt

Response

CURL and Golang SDK

CogVideo

Generating a gif by CogVideo mode

POST https://genapi.phoenix.global/sdk/computation/genAI/cogVideo

Headers

Name
Type
Description

Token*

string

The token generated in the previous step

Request Body

Name
Type
Description

prompt*

string

Prompt

Response

CURL and Golang SDK

Pyramid

Generating a gif by Pyramid mode

POST https://genapi.phoenix.global/sdk/computation/genAI/pyramid

Headers

Name
Type
Description

Token*

string

The token generated in the previous step

Request Body

Name
Type
Description

prompt*

string

Prompt

Response

CURL and Golang SDK

Last updated