Start a non-destructive image edit
Start a non-destructive image edit.
curl --request POST \
--url https://api.mint.gg/v1/images/{imageId}:edit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"editInstruction": "<string>",
"name": "<string>",
"generationPreset": "standard"
}
'import requests
url = "https://api.mint.gg/v1/images/{imageId}:edit"
payload = {
"editInstruction": "<string>",
"name": "<string>",
"generationPreset": "standard"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({editInstruction: '<string>', name: '<string>', generationPreset: 'standard'})
};
fetch('https://api.mint.gg/v1/images/{imageId}:edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mint.gg/v1/images/{imageId}:edit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'editInstruction' => '<string>',
'name' => '<string>',
'generationPreset' => 'standard'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mint.gg/v1/images/{imageId}:edit"
payload := strings.NewReader("{\n \"editInstruction\": \"<string>\",\n \"name\": \"<string>\",\n \"generationPreset\": \"standard\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mint.gg/v1/images/{imageId}:edit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"editInstruction\": \"<string>\",\n \"name\": \"<string>\",\n \"generationPreset\": \"standard\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mint.gg/v1/images/{imageId}:edit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"editInstruction\": \"<string>\",\n \"name\": \"<string>\",\n \"generationPreset\": \"standard\"\n}"
response = http.request(request)
puts response.read_body{
"object": "operation",
"id": "op_01JEXAMPLE",
"type": "image_edit",
"generationMode": "auto",
"status": "running",
"resource": {
"type": "image",
"id": "image_01JEXAMPLE"
},
"createdAt": "2026-07-21T20:00:00.000Z",
"updatedAt": "2026-07-21T20:00:01.000Z"
}{
"object": "operation",
"id": "op_01JEXAMPLE",
"type": "image_edit",
"generationMode": "auto",
"status": "running",
"resource": {
"type": "image",
"id": "image_01JEXAMPLE"
},
"createdAt": "2026-07-21T20:00:00.000Z",
"updatedAt": "2026-07-21T20:00:01.000Z"
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}Authorizations
Mint API key sent as a Bearer token.
Headers
Optional stable key for safely retrying an uncertain mutating request. Mint creates an internal key when this header is omitted. Reusing a supplied key with different parameters returns 409.
1 - 255Path Parameters
Body
Instructions for creating a non-destructive Image edit.
Describe the change Mint should apply to the source Image.
1 - 8000Optional title for the new edited Image.
1 - 120Quality, speed, and cost tier for the Image edit.
fast, standard, production Response
An earlier request with the same retry key returned this operation.
A long-running operation acting on one Mint image.
Stable object discriminator.
"operation"Mint operation ID used for polling.
The work this operation performs.
image_edit Workflow mode for this operation.
auto, review Current operation lifecycle status.
queued, running, preview_ready, billing_required, succeeded, partially_succeeded, failed, canceled The Mint image affected by this operation.
Show child attributes
Show child attributes
When the operation was created.
When the operation last changed.
The billing action required before this operation can continue.
Show child attributes
Show child attributes
Credit estimate, active reservation, finalized charge, and post-reservation balance for this operation.
Show child attributes
Show child attributes
Terminal failure details when the operation failed.
Show child attributes
Show child attributes
When the operation completed.
When the operation was canceled.
curl --request POST \
--url https://api.mint.gg/v1/images/{imageId}:edit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"editInstruction": "<string>",
"name": "<string>",
"generationPreset": "standard"
}
'import requests
url = "https://api.mint.gg/v1/images/{imageId}:edit"
payload = {
"editInstruction": "<string>",
"name": "<string>",
"generationPreset": "standard"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({editInstruction: '<string>', name: '<string>', generationPreset: 'standard'})
};
fetch('https://api.mint.gg/v1/images/{imageId}:edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mint.gg/v1/images/{imageId}:edit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'editInstruction' => '<string>',
'name' => '<string>',
'generationPreset' => 'standard'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mint.gg/v1/images/{imageId}:edit"
payload := strings.NewReader("{\n \"editInstruction\": \"<string>\",\n \"name\": \"<string>\",\n \"generationPreset\": \"standard\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mint.gg/v1/images/{imageId}:edit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"editInstruction\": \"<string>\",\n \"name\": \"<string>\",\n \"generationPreset\": \"standard\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mint.gg/v1/images/{imageId}:edit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"editInstruction\": \"<string>\",\n \"name\": \"<string>\",\n \"generationPreset\": \"standard\"\n}"
response = http.request(request)
puts response.read_body{
"object": "operation",
"id": "op_01JEXAMPLE",
"type": "image_edit",
"generationMode": "auto",
"status": "running",
"resource": {
"type": "image",
"id": "image_01JEXAMPLE"
},
"createdAt": "2026-07-21T20:00:00.000Z",
"updatedAt": "2026-07-21T20:00:01.000Z"
}{
"object": "operation",
"id": "op_01JEXAMPLE",
"type": "image_edit",
"generationMode": "auto",
"status": "running",
"resource": {
"type": "image",
"id": "image_01JEXAMPLE"
},
"createdAt": "2026-07-21T20:00:00.000Z",
"updatedAt": "2026-07-21T20:00:01.000Z"
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}{
"type": "https://api.mint.gg/problems/animation-actions-not-in-set",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"code": "custom",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"reason": "subscription_required",
"resource": "preview",
"stage": "preview",
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1,
"ctaKind": "view_plans"
}
}