Skip to content

It is impossible to call Midjourney via PiAPI #147

@konard

Description

@konard
2025-09-22T10:08:28.338353219Z INFO:httpx:HTTP Request: POST https://api.goapi.ai/mj/v2/imagine "HTTP/1.1 200 OK"
2025-09-22T10:09:08.888710555Z INFO:httpx:HTTP Request: POST https://api.goapi.ai/mj/v2/fetch "HTTP/1.1 200 OK"
2025-09-22T10:09:09.312252209Z ERROR:root:Failed to generate Midjourney image: 
{
  "task_id": "2fa53483-9668-4b91-9f0c-1123ccd077ee",
  "model": "midjourney",
  "task_type": "imagine",
  "status": "pending",
  "config": {
    "service_mode": "public",
    "webhook_config": {
      "endpoint": "",
      "secret": ""
    }
  },
  "input": null,
  "output": {
    "image_url": "",
    "image_urls": null,
    "temporary_image_urls": null,
    "discord_image_url": "",
    "actions": [],
    "progress": 0,
    "intermediate_image_urls": null
  },
  "meta": {
    "created_at": "2025-09-22T10:08:28Z",
    "started_at": "0001-01-01T00:00:00Z",
    "ended_at": "0001-01-01T00:00:00Z",
    "usage": {
      "type": "point",
      "frozen": 700000,
      "consume": 0
    },
    "is_using_private_pool": false,
    "model_version": "unknown",
    "process_mode": "turbo",
    "failover_triggered": false
  },
  "detail": null,
  "logs": [],
  "error": {
    "code": 0,
    "raw_message": "",
    "message": "",
    "detail": null
  }
}

Looks like it is over for piapi and midjourney: https://piapi.ai/docs/sunsetting-midjourney

So we need to migrate to https://legnext.ai, but to do it we first need to make an example on how to access their API and test it in GitHub Actions:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions