openapi: "3.0.2" info: title: Midjourney REST API by useapi.net description: Simple, reliable and affordable way to use Midjourney via standard REST API version: "1.0" servers: - url: https://api.useapi.net/v1 components: securitySchemes: apiToken: type: http scheme: bearer description: API Token schemas: imagineResponse: type: object properties: jobid: description: Use returned jobid value to retrieve job status and results type: string verb: type: string enum: - imagine status: type: string enum: - started created: type: string updated: type: string prompt: type: string channel: type: string server: type: string maxJobs: type: integer messageId: type: string content: description: Contains message generated by Midjourney reflecting current generation parameters and progress type: string timestamp: type: string code: type: integer enum: - 200 additionalProperties: false required: - jobid - verb - status - created - updated - prompt - channel - server - maxJobs - messageId - content - timestamp - code responseError: type: object properties: error: type: string code: type: integer enum: - 400 - 401 - 404 - 412 - 413 additionalProperties: false required: - error - code imagineResponseModerated: type: object properties: error: type: string jobid: type: string status: type: string enum: - moderated code: type: integer enum: - 422 additionalProperties: false required: - error - jobid - status - code responseMaxJobs: type: object properties: error: type: string executingJobs: type: array items: type: string code: type: integer enum: - 429 additionalProperties: false required: - error - executingJobs - code buttonResponseErrorUpscaled: type: object properties: error: type: string button: type: string enum: - U1 - U2 - U3 - U4 jobid: type: string code: type: integer enum: - 409 additionalProperties: false required: - error - button - jobid - code buttonResponse: type: object properties: jobid: description: Use returned jobid value to retrieve job status and results type: string verb: type: string enum: - button status: type: string enum: - started - completed created: type: string updated: type: string button: type: string enum: - U1 - U2 - U3 - U4 - V1 - V2 - V3 - V4 - ⬅️ - ➡️ - ⬆️ - ⬇️ - 🔄 - Vary (Strong) - Vary (Subtle) - Zoom Out 1.5x - Zoom Out 2x - Upscale (2x) - Upscale (4x) - Redo Upscale (2x) - Redo Upscale (4x) - Make Square - Make Variations - Remaster parentJobId: type: string channel: type: string server: type: string maxJobs: type: integer code: type: integer enum: - 200 additionalProperties: false required: - jobid - verb - status - created - updated - button - parentJobId - channel - server - maxJobs - code jobResponse: type: object properties: jobid: type: string parentJobId: type: string verb: type: string enum: - imagine - button - blend - describe status: description: If value is created, started or progress wait in a loop for at least 10..30 seconds and retry again type: string enum: - created - started - moderated - progress - completed - failed - cancelled created: type: string updated: type: string prompt: type: string blendUrls: type: array items: type: string blendDimensions: type: string enum: - Portrait - Square - Landscape describeUrl: type: string button: type: string enum: - U1 - U2 - U3 - U4 - V1 - V2 - V3 - V4 - ⬅️ - ➡️ - ⬆️ - ⬇️ - 🔄 - Vary (Strong) - Vary (Subtle) - Zoom Out 1.5x - Zoom Out 2x - Upscale (2x) - Upscale (4x) - Redo Upscale (2x) - Redo Upscale (4x) - Make Square - Make Variations - Remaster children: type: array items: type: object properties: button: type: string enum: - U1 - U2 - U3 - U4 - V1 - V2 - V3 - V4 - ⬅️ - ➡️ - ⬆️ - ⬇️ - 🔄 - Vary (Strong) - Vary (Subtle) - Zoom Out 1.5x - Zoom Out 2x - Upscale (2x) - Upscale (4x) - Redo Upscale (2x) - Redo Upscale (4x) - Make Square - Make Variations - Remaster jobid: type: string messageId: type: string required: - messageId - button - jobid buttons: type: array items: type: string enum: - U1 - U2 - U3 - U4 - V1 - V2 - V3 - V4 - ⬅️ - ➡️ - ⬆️ - ⬇️ - 🔄 - Vary (Strong) - Vary (Subtle) - Zoom Out 1.5x - Zoom Out 2x - Upscale (2x) - Upscale (4x) - Redo Upscale (2x) - Redo Upscale (4x) - Make Square - Make Variations - Remaster channel: type: string server: type: string maxJobs: type: integer messageId: type: string content: type: string description: Message generated by Midjourney reflecting current generation parameters and progress timestamp: type: string attachments: type: array items: type: object properties: proxy_url: type: string size: type: integer url: type: string width: type: integer content_type: type: string filename: type: string height: type: integer id: type: string embeds: description: Contains additional information type: array items: type: object properties: type: type: string description: type: string image: type: object properties: url: type: string proxy_url: type: string width: type: number height: type: number code: type: integer enum: - 200 additionalProperties: false required: - jobid - verb - status - created - channel - server - maxJobs - code jobCancelResponse: type: object properties: jobid: type: string status: type: string enum: - created - started - moderated - progress - completed - failed - cancelled code: type: integer enum: - 200 additionalProperties: false required: - jobid - status - code jobsResponse: type: array items: type: string accountResponse: type: object properties: email: type: string created: type: string name: type: string verified: type: string sub: type: string additionalProperties: false required: - email - created - name - verified - sub blendResponse: type: object properties: jobid: description: Use returned jobid value to retrieve job status and results type: string verb: type: string enum: - blend status: type: string enum: - started created: type: string updated: type: string blendUrls: type: array items: type: string blendDimensions: type: string enum: - Portrait - Square - Landscape channel: type: string server: type: string maxJobs: type: integer messageId: type: string content: description: Contains message generated by Midjourney reflecting current generation parameters and progress type: string timestamp: type: string code: type: integer enum: - 200 additionalProperties: false required: - jobid - verb - status - created - updated - blendUrls - channel - server - maxJobs - messageId - content - timestamp - code describeResponse: type: object properties: jobid: description: Use returned jobid value to retrieve job status and results type: string verb: type: string enum: - describe status: type: string enum: - started - completed created: type: string updated: type: string describeUrl: type: string channel: type: string server: type: string maxJobs: type: integer messageId: type: string content: description: Contains message generated by Midjourney reflecting current generation parameters and progress type: string embeds: description: Contains additional information type: array items: type: object properties: type: type: string description: type: string image: type: object properties: url: type: string proxy_url: type: string width: type: number height: type: number timestamp: type: string code: type: integer enum: - 200 additionalProperties: false required: - jobid - verb - status - created - updated - describeUrl - channel - server - maxJobs - messageId - content - timestamp - code security: - apiToken: [] paths: /jobs/imagine: post: description: Submit the Midjourney /imagine command requestBody: required: true content: application/json: schema: type: object properties: prompt: description: Midjourney prompt type: string maxLength: 1024 discord: description: Discord token type: string server: description: Discord server id type: string channel: description: Discord channel id type: string maxJobs: description: Optional Maximum Concurrent Jobs for current Midjourney subscription type: integer minimum: 1 maximum: 15 replyUrl: description: Optional callback URL, API will call the provided replyUrl once generation completed type: string replyRef: description: Optional reference id which will be stored and returned along with this job response / result type: string required: - prompt - discord - server - channel responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/imagineResponse" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/responseError" "412": description: prompt, discord, server or channel value is missing content: application/json: schema: $ref: "#/components/schemas/responseError" "413": description: prompt, replyRef or replyUrl is too long content: application/json: schema: $ref: "#/components/schemas/responseError" "422": description: Unable to find posted message, likely moderated or invalid prompt content: application/json: schema: $ref: "#/components/schemas/imagineResponseModerated" "429": description: API query is full and can not accept new jobs/imagine requests content: application/json: schema: $ref: "#/components/schemas/responseMaxJobs" /jobs/button: post: description: Midjourney upscale or create variations and enhance or modify buttons requestBody: required: true content: application/json: schema: type: object properties: jobid: description: jobid of successfully completed (status set to completed) jobs/imagine, jobs/blend, jobs/describe or jobs/button job type: string button: description: button from buttons array of job referenced via jobid type: string enum: - U1 - U2 - U3 - U4 - V1 - V2 - V3 - V4 - ⬅️ - ➡️ - ⬆️ - ⬇️ - 🔄 - Vary (Strong) - Vary (Subtle) - Zoom Out 1.5x - Zoom Out 2x - Upscale (2x) - Upscale (4x) - Redo Upscale (2x) - Redo Upscale (4x) - Make Square - Make Variations - Remaster discord: description: Optional Discord token, if provided will override discord value of referenced jobid type: string maxJobs: description: Optional Maximum Concurrent Jobs for current Midjourney subscription type: integer minimum: 1 maximum: 15 replyUrl: description: Optional callback URL, API will call the provided replyUrl once generation completed type: string replyRef: description: Optional reference id which will be stored and returned along with this job response / result type: string required: - jobid - button responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/buttonResponse" "400": description: Button not supported or not found in jobid buttons array content: application/json: schema: $ref: "#/components/schemas/responseError" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/responseError" "404": description: Unable to locate jobid content: application/json: schema: $ref: "#/components/schemas/responseError" "409": description: Upscale button already executed by jobid content: application/json: schema: $ref: "#/components/schemas/buttonResponseErrorUpscaled" "412": description: jobid or button value is missing content: application/json: schema: $ref: "#/components/schemas/responseError" "413": description: replyRef or replyUrl is too long content: application/json: schema: $ref: "#/components/schemas/responseError" "429": description: API query is full and can not accept new jobs/button requests content: application/json: schema: $ref: "#/components/schemas/responseMaxJobs" /jobs/blend: post: description: Submit the Midjourney /blend command requestBody: required: true content: application/json: schema: type: object properties: blendUrls: description: Must contain at least 2 valid URL image links, up to 5 URL image links supported type: array minItems: 2 maxItems: 5 items: type: string blendDimensions: type: string enum: - Portrait - Square - Landscape discord: description: Discord token type: string server: description: Discord server id type: string channel: description: Discord channel id type: string maxJobs: description: Optional Maximum Concurrent Jobs for current Midjourney subscription type: integer minimum: 1 maximum: 15 replyUrl: description: Optional callback URL, API will call the provided replyUrl once generation completed type: string replyRef: description: Optional reference id which will be stored and returned along with this job response / result type: string required: - blendUrls - discord - server - channel responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/blendResponse" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/responseError" "412": description: blendUrls, discord, server or channel value is missing, one of blendUrls values not a valid URL or URL which can not be retrieved content: application/json: schema: $ref: "#/components/schemas/responseError" "413": description: replyRef or replyUrl is too long content: application/json: schema: $ref: "#/components/schemas/responseError" "422": description: Unable to find posted message, likely moderated or invalid url content: application/json: schema: $ref: "#/components/schemas/imagineResponseModerated" "429": description: API query is full and can not accept new jobs/blend requests content: application/json: schema: $ref: "#/components/schemas/responseMaxJobs" /jobs/describe: post: description: Submit the Midjourney /describe command requestBody: required: true content: application/json: schema: type: object properties: describeUrl: description: Must contain valid URL image link type: string discord: description: Discord token type: string server: description: Discord server id type: string channel: description: Discord channel id type: string maxJobs: description: Optional Maximum Concurrent Jobs for current Midjourney subscription type: integer minimum: 1 maximum: 15 replyUrl: description: Optional callback URL, API will call the provided replyUrl once generation completed type: string replyRef: description: Optional reference id which will be stored and returned along with this job response / result type: string required: - describeUrl - discord - server - channel responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/describeResponse" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/responseError" "412": description: describeUrl, discord, server or channel value is missing, describeUrl value not a valid URL or URL which can not be retrieved content: application/json: schema: $ref: "#/components/schemas/responseError" "413": description: replyRef or replyUrl is too long content: application/json: schema: $ref: "#/components/schemas/responseError" "422": description: Unable to find posted message, likely moderated or invalid url content: application/json: schema: $ref: "#/components/schemas/imagineResponseModerated" "429": description: API query is full and can not accept new jobs/blend requests content: application/json: schema: $ref: "#/components/schemas/responseMaxJobs" /jobs/: get: description: Retrieve status and results of jobs/imagine, jobs/button, jobs/blend or jobs/describe parameters: - in: query name: jobid schema: type: string required: true description: jobid value returned by jobs/imagine, jobs/button, jobs/blend or jobs/describe responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/jobResponse" "400": description: Query param jobid not provided content: application/json: schema: $ref: "#/components/schemas/responseError" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/responseError" "404": description: Unable to locate jobid content: application/json: schema: $ref: "#/components/schemas/responseError" /jobs/cancel/: get: description: Cancel execution of job created by jobs/imagine, jobs/button, jobs/blend or jobs/describe parameters: - in: query name: jobid schema: type: string required: true description: jobid value returned by jobs/imagine, jobs/button, jobs/blend or jobs/describe responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/jobCancelResponse" "400": description: Query param jobid not provided content: application/json: schema: $ref: "#/components/schemas/responseError" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/responseError" "404": description: Unable to locate jobid content: application/json: schema: $ref: "#/components/schemas/responseError" /jobs: get: description: Get list of currently executing jobs responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/jobsResponse" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/responseError" /account: get: description: Retrieve account information responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/accountResponse" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/responseError"