Mojo AI

Mojo AI · GPT 작업

Image Generation API.

This endpoint triggers a job based on the provided text prompt and return image url.

  • POST /generateImage Generation API base on user prompt input.

    This endpoint triggers a job based on the provided text prompt and return image url.

원본 API 스키마
{
  "openapi": "3.0.0",
  "info": {
    "title": "Image Generation API.",
    "description": "This endpoint triggers a job based on the provided text prompt and return image url.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.mojo.vn/service/api/art_fast",
      "description": "Image Generation API."
    }
  ],
  "paths": {
    "/generate": {
      "post": {
        "operationId": "generate",
        "summary": "Image Generation API base on user prompt input.",
        "description": "This endpoint triggers a job based on the provided text prompt and return image url.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string"
                  },
                  "ar": {
                    "type": "string",
                    "default": "1:1",
                    "enum": [
                      "1:1",
                      "16:9",
                      "9:16",
                      "4:3",
                      "3:4",
                      "3:2",
                      "2:3"
                    ]
                  },
                  "style": {
                    "type": "string",
                    "default": "Cinematic",
                    "enum": [
                      "Cinematic",
                      "Fantasy Art",
                      "Digital Art",
                      "Anime",
                      "Comic Book",
                      "Sticker",
                      "Cute Tiny"
                    ]
                  },
                  "device": {
                    "type": "string",
                    "default": "chat_gpt"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Image generation successfully completed and result returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "photo_url": {
                      "type": "string"
                    },
                    "sucess": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "components": {
          "securitySchemes": {
            "bearerAuth": {
              "type": "http",
              "scheme": "bearer",
              "bearerFormat": "JWT"
            }
          }
        }
      }
    }
  }
}