## Basic model info - Model name: midjourney/midjourney v8.2 - Model description: Generate and edit images with Midjourney v8.2. - Endpoint name: action ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/midjourney/v8.2/latest.json) ### Model input schema The model input schema is: ```json { "properties": { "custom_id": { "description": "The custom ID of the action to be performed on the image", "maxLength": 1024, "pattern": "^(?![\\s\\S]*(?:-[­͏؀-؅؜۝܏࢐-࢑࣢᠎​-‏‪-‮⁠-⁤⁦--𑂽𑃍𓐰-𓐿𛲠-𛲣𝅳-𝅺󠀁󠀠-󠁿]*-[­͏؀-؅؜۝܏࢐-࢑࣢᠎​-‏‪-‮⁠-⁤⁦--𑂽𑃍𓐰-𓐿𛲠-𛲣𝅳-𝅺󠀁󠀠-󠁿]*[A-Za-z]|(? { console.log(`Status Update: ${update.status}, Request ID: ${update.request_id}`); }, }); console.log(result.data); console.log(result.requestId); ``` ### Python ```python import sunra_client result = sunra_client.subscribe( "midjourney/v8.2/action", arguments={ "task_id": "", "custom_id": "" }, with_logs=True, on_enqueue=print, on_queue_update=print, ) print(result) ``` ### Java ```java import ai.sunra.client.*; import java.util.Map; import com.google.gson.JsonObject; var client = SunraClient.withEnvCredentials(); var response = client.subscribe( "midjourney/v8.2/action", SubscribeOptions.builder() .input(Map.of( "task_id", "", "custom_id", "")) .resultType(JsonObject.class) .onQueueUpdate(update -> System.out.printf( "\nStatus Update: %s, Request ID: %s%n", update.getStatus(), update.getRequestId() )) .logs(true) .build() ); System.out.println("Completed!"); System.out.println(response.getData()); ``` ### Kotlin ```kotlin import ai.sunra.client.kt.* import com.google.gson.JsonObject val client = createSunraClient() val response = client.subscribe( endpointId = "midjourney/v8.2/action", input = mapOf( "task_id" to "", "custom_id" to ""), options = ai.sunra.client.kt.SubscribeOptions(logs = true), onUpdate = { update -> println("\nStatus Update: ${update.status}, Request ID: ${update.requestId}") } ) println("Completed!") println(response.data) ``` ### Curl ```bash curl --request POST \ --url https://api.sunra.ai/v1/queue/midjourney/v8.2/action \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"task_id":"","custom_id":""}' ``` ## Model readme >