Estimate Credits without starting work
Returns conservative planned Credit reservations for a normalized request. The estimate is advisory, creates no operation or reservation, and does not mutate Credit balances. The subsequent operation is authoritative and finalized spend may be lower.
curl --request POST \
--url https://api.mint.gg/v1/pricing:estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"operation": "<string>",
"generationPreset": "standard",
"generationMode": "auto"
}
'import requests
url = "https://api.mint.gg/v1/pricing:estimate"
payload = {
"operation": "<string>",
"generationPreset": "standard",
"generationMode": "auto"
}
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({operation: '<string>', generationPreset: 'standard', generationMode: 'auto'})
};
fetch('https://api.mint.gg/v1/pricing:estimate', 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/pricing:estimate",
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([
'operation' => '<string>',
'generationPreset' => 'standard',
'generationMode' => 'auto'
]),
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/pricing:estimate"
payload := strings.NewReader("{\n \"operation\": \"<string>\",\n \"generationPreset\": \"standard\",\n \"generationMode\": \"auto\"\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/pricing:estimate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"operation\": \"<string>\",\n \"generationPreset\": \"standard\",\n \"generationMode\": \"auto\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mint.gg/v1/pricing:estimate")
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 \"operation\": \"<string>\",\n \"generationPreset\": \"standard\",\n \"generationMode\": \"auto\"\n}"
response = http.request(request)
puts response.read_body{
"object": "pricing_estimate",
"operation": "model_generation",
"credits": {
"requiredToStart": 173,
"estimatedTotal": 798
},
"stages": [
{
"stage": "preview",
"credits": 173,
"conditional": false
},
{
"stage": "final",
"credits": 625,
"conditional": false
}
],
"pricingFactors": {
"generationPreset": "standard",
"generationMode": "auto"
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1
}
}Authorizations
Mint API key sent as a Bearer token.
Body
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
- Option 20
- Option 21
- Option 22
Strict operation-discriminated pricing input. Each operation accepts only factors that can affect its planned Credit reservations.
"world_generation"Public generation quality and speed preset.
fast, standard, production In review mode, Mint pauses before the conditional final stage.
auto, review Response
Advisory Credit estimate.
Advisory conservative Credit reservations for one normalized public API request.
Stable object discriminator.
"pricing_estimate"Public operation discriminator copied from the request.
Credits needed to start and the conservative planned total.
Show child attributes
Show child attributes
Planned reservation stages in execution order.
1Show child attributes
Show child attributes
Normalized public inputs used by pricing, including defaults and resolved resource configuration.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.mint.gg/v1/pricing:estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"operation": "<string>",
"generationPreset": "standard",
"generationMode": "auto"
}
'import requests
url = "https://api.mint.gg/v1/pricing:estimate"
payload = {
"operation": "<string>",
"generationPreset": "standard",
"generationMode": "auto"
}
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({operation: '<string>', generationPreset: 'standard', generationMode: 'auto'})
};
fetch('https://api.mint.gg/v1/pricing:estimate', 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/pricing:estimate",
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([
'operation' => '<string>',
'generationPreset' => 'standard',
'generationMode' => 'auto'
]),
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/pricing:estimate"
payload := strings.NewReader("{\n \"operation\": \"<string>\",\n \"generationPreset\": \"standard\",\n \"generationMode\": \"auto\"\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/pricing:estimate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"operation\": \"<string>\",\n \"generationPreset\": \"standard\",\n \"generationMode\": \"auto\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mint.gg/v1/pricing:estimate")
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 \"operation\": \"<string>\",\n \"generationPreset\": \"standard\",\n \"generationMode\": \"auto\"\n}"
response = http.request(request)
puts response.read_body{
"object": "pricing_estimate",
"operation": "model_generation",
"credits": {
"requiredToStart": 173,
"estimatedTotal": 798
},
"stages": [
{
"stage": "preview",
"credits": 173,
"conditional": false
},
{
"stage": "final",
"credits": 625,
"conditional": false
}
],
"pricingFactors": {
"generationPreset": "standard",
"generationMode": "auto"
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
],
"operationId": "<string>",
"billing": {
"requiredCredits": 1,
"actionUrl": "<string>",
"availableCredits": 1,
"committedCredits": 1,
"stageCredits": 1,
"completionCredits": 1
}
}