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: "multipart/form-data"
ParametersTypeRequiredDesc
strategystringtruestrategy
modulestringtrueflux
datajsontrue官方的参数,比如 flux

Response

  • 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: "multipart/form-data"
ParametersTypeRequiredDesc
strategystringtruestrategy
modulestringtruesuno.generation
creditjsonfalse消耗的代币
datajsontrue官方的参数,比如 suno 的参数

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