Skip to content

Goapi

Authentication

参考接入 BytePower

Goapi image

Method & Path

  • POST {domain}/bp/ai/async/goapi/image
  • POST {domain}/bp/ai/server/user/{user_id}/ai/async/goapi/image

Request

  • content-type: application/json
ParametersTypeRequiredDesc
strategystringtruestrategy
moduleenumtrue可选值见下方
datajsontrue官方的参数

module 可选值:

  • flux
  • suno
  • midjourney
  • common.image(通用图片,官方 output 返回内容包含 image 字段)

Request

  • HTTP 状态码:200
json
{
  "strategy": "goapi",
  "module": "flux",
  "data": {
    "model": "Qubico/flux1-schnell",
    "input": {
      "prompt": "white cloud"
    }
  }
}

Response

  • HTTP 状态码:200
json
{
  "asset": [
    {
      "last_recovery_time": "2024-09-02T00:00:00Z",
      "name": "ai_credit",
      "quantity": 50,
      "recoverable": true,
      "recovery_period": 1,
      "recovery_quantity": 50,
      "type": "consumable",
      "valid_seconds": 0
    }
  ],
  "current_count": 5,
  "current_total_count": 5,
  "id": "680969912616919040"
}

Goapi audio

Method & Path

  • POST {domain}/bp/ai/async/goapi/audio
  • POST {domain}/bp/ai/server/user/{user_id}/ai/async/goapi/audio

Request

  • content-type: application/json
ParametersTypeRequiredDesc
strategystringtruestrategy
moduleenumtrue可选值见下方
datajsontrue官方的参数

module 可选值:

  • suno.generation

Response

  • HTTP 状态码:200
json
{
  "strategy": "goapi-suno",
  "module": "suno.generation",
  "data": {
    "custom_mode": false,
    "mv": "chirp-v3-0",
    "input": {
      "gpt_description_prompt": "pop",
      "make_instrumental": false
    }
  }
}

Response

  • HTTP 状态码:200
json
{
  "asset": [
    {
      "last_recovery_time": "2024-09-02T00:00:00Z",
      "name": "ai_credit",
      "quantity": 50,
      "recoverable": true,
      "recovery_period": 1,
      "recovery_quantity": 50,
      "type": "consumable",
      "valid_seconds": 0
    }
  ],
  "current_count": 5,
  "current_total_count": 5,
  "id": "680969912616919040"
}

京ICP备19011570号-2