Generate Game Variant
INFO
Generate a game variant based on the given prompt Rate limits: up to 20 requests/day per user; up to 10,000 requests/day per merchant.
Request Method
| Item | Name | Sample |
|---|---|---|
| Path | Path | {Api_Address}/variant/generate |
| Request Method | POST |
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| Sign Params | Y | View details | |
| user_id | string | Y | User Unique Identifier |
| prompt | string | Y | Prompt |
| game_code | string | Y | The index of game data |
Return Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| code | int | Y | |
| msg | string | Y | Message for debug |
| data | object | Y | Variant Item |
Variant Item
| Name | Type | Required | Description |
|---|---|---|---|
| variant_id | int | Y | Variant Id |
| game_code | string | Y | The index of game data |
| name | string | N | Variant Name |
| cover_url | string | Y | Variant Cover Url |
| creator | string | Y | Creator |
| status | int | Y | Status |
| created_at | int | Y | Create Time |
Sample
Http Request
POST: Method
URL: /variant/generate?mid=1705374337&sign=ac304cdd3e4f3ad98bb08a52e8b1e40cc76303fcf9aa72558368ff1c8e35be52&ts=1713768205
Content-Type:application/json
{
"user_id": "10021",
"prompt": "red banana",
"game_code": "gp_lottery_87"
}
Http Response(success)
{
"code": 0,
"msg": "",
"data": {
"variant_id": 2,
"game_code": "gp_lottery_87",
"name": "",
"cover_url": "",
"creator": "10021",
"status": 0,
"created_at": 0
}
}