Skip to main content
POST
/
v1
/
models:generate
Start a model generation operation
curl --request POST \
  --url https://api.mint.gg/v1/models:generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "prompt": "<string>",
  "derivedPrompt": "<string>",
  "generationMode": "auto",
  "generationPreset": "standard",
  "displayName": "<string>",
  "imageUrl": "<string>",
  "sourceImages": [
    "<string>"
  ],
  "sourceUrl": "<string>"
}
'
import requests

url = "https://api.mint.gg/v1/models:generate"

payload = {
"prompt": "<string>",
"derivedPrompt": "<string>",
"generationMode": "auto",
"generationPreset": "standard",
"displayName": "<string>",
"imageUrl": "<string>",
"sourceImages": ["<string>"],
"sourceUrl": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
prompt: '<string>',
derivedPrompt: '<string>',
generationMode: 'auto',
generationPreset: 'standard',
displayName: '<string>',
imageUrl: '<string>',
sourceImages: ['<string>'],
sourceUrl: '<string>'
})
};

fetch('https://api.mint.gg/v1/models:generate', 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/models:generate",
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([
'prompt' => '<string>',
'derivedPrompt' => '<string>',
'generationMode' => 'auto',
'generationPreset' => 'standard',
'displayName' => '<string>',
'imageUrl' => '<string>',
'sourceImages' => [
'<string>'
],
'sourceUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);

$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/models:generate"

payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"derivedPrompt\": \"<string>\",\n \"generationMode\": \"auto\",\n \"generationPreset\": \"standard\",\n \"displayName\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"sourceImages\": [\n \"<string>\"\n ],\n \"sourceUrl\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Idempotency-Key", "<idempotency-key>")
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/models:generate")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"derivedPrompt\": \"<string>\",\n \"generationMode\": \"auto\",\n \"generationPreset\": \"standard\",\n \"displayName\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"sourceImages\": [\n \"<string>\"\n ],\n \"sourceUrl\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.mint.gg/v1/models:generate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"derivedPrompt\": \"<string>\",\n \"generationMode\": \"auto\",\n \"generationPreset\": \"standard\",\n \"displayName\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"sourceImages\": [\n \"<string>\"\n ],\n \"sourceUrl\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "object": "<unknown>",
  "id": "<string>",
  "prompt": "<string>",
  "generationModel": "<string>",
  "resource": {
    "id": "<string>"
  },
  "mintUrl": "<string>",
  "assets": {
    "caption": "<string>",
    "colliderMeshUrl": "<string>",
    "panoUrl": "<string>",
    "previewImageUrl": "<string>",
    "radUrl": "<string>",
    "spzUrls": {},
    "thumbnailUrl": "<string>"
  },
  "conversion": {
    "id": "<string>",
    "assets": {
      "glbUrl": "<string>",
      "objUrl": "<string>",
      "stlUrl": "<string>",
      "usdzUrl": "<string>",
      "fbxUrl": "<string>",
      "artifacts": {
        "glb": {
          "url": "<string>",
          "filename": "<string>",
          "contentType": "<string>",
          "extension": "<string>",
          "byteSize": 1,
          "artifactVersion": 2,
          "primaryPath": "<string>"
        },
        "obj": {
          "url": "<string>",
          "filename": "<string>",
          "contentType": "<string>",
          "extension": "<string>",
          "byteSize": 1,
          "artifactVersion": 2,
          "primaryPath": "<string>"
        },
        "stl": {
          "url": "<string>",
          "filename": "<string>",
          "contentType": "<string>",
          "extension": "<string>",
          "byteSize": 1,
          "artifactVersion": 2,
          "primaryPath": "<string>"
        },
        "usdz": {
          "url": "<string>",
          "filename": "<string>",
          "contentType": "<string>",
          "extension": "<string>",
          "byteSize": 1,
          "artifactVersion": 2,
          "primaryPath": "<string>"
        },
        "fbx": {
          "url": "<string>",
          "filename": "<string>",
          "contentType": "<string>",
          "extension": "<string>",
          "byteSize": 1,
          "artifactVersion": 2,
          "primaryPath": "<string>"
        }
      }
    }
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "error": {
    "code": "<string>",
    "message": "<string>"
  },
  "completedAt": "2023-11-07T05:31:56Z",
  "canceledAt": "2023-11-07T05:31:56Z"
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}

Authorizations

Authorization
string
header
required

Mint API key sent as a Bearer token.

Headers

Idempotency-Key
string
required

Unique key for safely retrying a mutating API request. Reusing a key with different parameters returns 409.

Required string length: 1 - 255

Body

application/json
prompt
string
required

Developer-visible generation prompt.

Required string length: 1 - 4000
derivedPrompt
string

Optional Mint-ready prompt when the developer has already transformed user intent.

Required string length: 1 - 4000
generationMode
enum<string>
default:auto

auto continues the workflow without a manual approval pause when policy allows it; review preserves preview approval.

Available options:
auto,
review
generationPreset
enum<string>
default:standard

Mint generation tier. fast favors speed/cost, standard is the default balance, and production favors highest quality.

Available options:
fast,
standard,
production
displayName
string
Required string length: 1 - 120
imageUrl
string<uri>

Optional source image URL for image-guided world or model generation.

sourceImages
string<uri>[]

Optional multi-image source set for world generation. Model generation uses imageUrl.

Maximum array length: 8
sourceUrl
string<uri>

Optional source URL for remix or import context.

Response

Long-running operation accepted. Poll the Location URL for status.

object
any
required
id
string
required
type
enum<string>
required
Available options:
world_generation,
model_generation,
model_optimization,
model_conversion
generationMode
enum<string>
required
Available options:
auto,
review
status
enum<string>
required
Available options:
queued,
running,
preview_ready,
succeeded,
failed,
canceled
prompt
string | null
required

Original developer-visible prompt submitted with the generation request. Null for conversion operations.

generationPreset
enum<string> | null
required

Mint generation tier selected for this operation. Null for conversion operations.

Available options:
fast,
standard,
production,
null
generationModel
string | null
required

Resolved final generation model selected by the generationPreset. Null for conversion operations.

optimizationLevel
enum<string> | null
required

Optimization intensity for model_optimization operations.

Available options:
light,
moderate,
aggressive,
null
resource
object | null
required
mintUrl
string<uri> | null
required

Mint app URL for the generated world or model when the operation has a resource.

assets
object
required
conversion
object | null
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
error
object | null
completedAt
string<date-time> | null
canceledAt
string<date-time> | null