PixAI Platform
API v2 ドキュメント画像

画像生成タスクの作成

簡略化された v2 API を使って新しい画像の生成を開始します。 v2 API は `aspectRatio`(アスペクト比)、`mode`(品質モード)、名前付き `style` プリセットなど、ユーザーフレンドリーなパラメータを提供します。v1 の生ピクセル寸法や内部パラメータ名を置き換えます。

POST
/image/create

Authorization

bearerAuth
AuthorizationBearer <token>

認証が必要なすべてのリクエストでは、HTTP ヘッダーに次を追加してください

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://api.pixai.art/v2/image/create" \  -H "Content-Type: application/json" \  -d '{    "modelVersionId": "1983308862240288769",    "prompt": "1girl, green hair, solo, standing",    "aspectRatio": "9:16",    "mode": "standard"  }'
{
  "id": "string",
  "status": "waiting",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "startedAt": "2019-08-24T14:15:22Z",
  "endAt": "2019-08-24T14:15:22Z",
  "outputs": {
    "mediaIds": [
      "string"
    ],
    "mediaUrls": [
      "string"
    ]
  }
}
Empty
Empty