Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Quote a 3D job

Estimates the price and checks available supply for a 3D request. Creates no job and charges nothing.

POST/v1/3d/quotes
Authorization
AuthorizationBearer token (YIR_API_KEY) · headerrequired
Request body
requiredapplication/json
max_costany

Submit-only. A quote ignores any value and reports max_cost in parameter_notices.

webhook_urlany

Submit-only. A quote ignores any value and reports webhook_url in parameter_notices.

billing_modeActualBillingModedeprecated

Legacy compatibility field. Omit for new requests. When retrying an existing idempotency key, preserve its original request including this field. Explicit consent to the authoritative actual cost of every upstream-billed attempt of the Job, without a max_cost cap. Eligible channels must provide authoritative task-level charges. Automatic routing is supported; routing.only is optional and, when supplied, remains binding. Cannot be combined with max_cost. Insufficient wallet funds become Job debt repaid by future manual recharge; outstanding debt blocks new Jobs. Every attempt the upstream actually billed is charged to the user, including failed and non-winning ones; attempts the upstream did not bill, and Yir's own delivery failures or outcome timeouts, are not charged. Omit for the default contract: balance is not frozen, each attempt checks the live balance against its route estimate, each upstream-billed attempt is charged at the authoritative upstream amount after the managed discount, and an explicit max_cost caps the Job's total charge.

modelstringrequired

3D model ID or alias listed by GET /v1/models. An unknown or retired model returns 400 YIR_INVALID_REQUEST with retryable false.

min length 1
inputStandard3DTextInput | Standard3DImageInput | Standard3DMultiviewInputrequired
Show properties
One of:
Standard3DTextInput
typestringrequired
promptstringrequired

Description of the object to model. The per-model limit is in the model contract (1024 for Tripo, 600 for Meshy).

min length 1 · max length 1024 · matches \S
Standard3DImageInput
typestringrequired
referencesany[]required

Exactly one image with role reference_image; a plain background and one object filling most of the frame work best.

min items 1 · max items 1
Show properties
Array of any
rolestringrequired
file_idFileID
matches ^file_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
urlInputURL

Public HTTPS URL of a reference image, video or audio file. Yir downloads it once at submission (up to 100 MiB, 3 redirects, private and reserved addresses refused), detects the type from the file contents, and stores it as an input file so every attempt and fallback reads the same bytes. Data URLs are not accepted. A URL that cannot be imported returns YIR_INVALID_REQUEST naming the reference; retryable is true only for remote timeouts, connection failures, HTTP 429 and 5xx. Quote does not download URLs, so prices that depend on input media are only estimated; upload through the Files API for larger files or exact media-dependent quotes.

max length 2048 · matches ^https://
One of:
any
any
any
any
Standard3DMultiviewInput
typestringrequired
referencesany[]required

One front_view plus at least one of left_view, back_view and right_view, each at most once.

min items 2 · max items 4
Show properties
Array of any
rolestringrequired
Allowed:front_viewleft_viewback_viewright_view
file_idFileID
matches ^file_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
urlInputURL

Public HTTPS URL of a reference image, video or audio file. Yir downloads it once at submission (up to 100 MiB, 3 redirects, private and reserved addresses refused), detects the type from the file contents, and stores it as an input file so every attempt and fallback reads the same bytes. Data URLs are not accepted. A URL that cannot be imported returns YIR_INVALID_REQUEST naming the reference; retryable is true only for remote timeouts, connection failures, HTTP 429 and 5xx. Quote does not download URLs, so prices that depend on input media are only estimated; upload through the Files API for larger files or exact media-dependent quotes.

max length 2048 · matches ^https://
One of:
any
any
any
any
routingRoutingOverride

Request-scoped routing intent. only is an unordered Provider allowlist; selection and fallback stay within this set and within any channel restrictions on the API Key's routing profile. 'official' is accepted as an alias for the model's official provider channel in both only and variants (normalized before execution). A single item supports targeted testing. Custom order is not supported. preference and fallback remain optional.

Show properties
variantsobject

Provider-to-channel-variant selection. Providers omitted from this map consider all eligible variants; explicitly select standard to restrict a provider to its standard variant. Keys must belong to only when only is supplied ('official' alias is resolved before whitelist validation). Explicitly selected unknown or unavailable variants never fall back to another variant of the same provider.

preferencestring

Overrides the routing profile default for route ordering. cost (the default) orders routes by estimated price, lowest first. speed orders routes by observed upstream median latency for the same model and specification, fastest first; routes with fewer than 10 recent samples follow, ordered by estimated price. max_cost, only and fallback apply unchanged.

Allowed:costspeed
onlystring[]
min items 1 · max items 16
fallbackboolean
fidelitystring

Lowest acceptable fidelity of the delivered file, judged from the vendor's C2PA content signature. original: only routes verified as untouched vendor API output, plus the official channel. genuine (the default): excludes routes known to upscale or otherwise alter the output. any: no restriction, cheapest. Overrides the routing profile default. When every route is excluded the request fails with YIR_FIDELITY_EXCLUDED; quotes report the specification as unavailable.

Allowed:originalgenuineany
accelerateboolean

Route acceleration, on by default; overrides the routing profile default. When an image attempt stays unresolved upstream well past that channel's usual completion time (about twice its recent p99, at least 5 minutes) and another eligible route remains within only, max_cost and the three-attempt limit, Yir cuts the attempt off and retries on the next route. The cut-off attempt never supplies the result; if its upstream bills it anyway, that actual cost is charged like any other upstream-billed attempt and counts toward max_cost. Requires fallback. Only image jobs are accelerated; video jobs are not, because a cut-off video attempt can still be billed. Set false to always wait for the first channel.

parametersStandard3DParameters

Optional 3D parameters; omitted fields take the model defaults and a model accepts only the values its contract declares. Every Job delivers one glb file.

Show properties
texturestring

none returns an untextured mesh; standard and hd bake textures (hd is higher resolution where the model supports it).

Allowed:nonestandardhd
pbrboolean

Generate PBR maps (metallic, roughness, normal) in addition to base color. Requires a texture. Some models charge extra (see the quote).

face_limitinteger

Target face count. Range and default come from the model contract; omit it for the model default. Some models charge extra for a custom count.

min 1 · max 5000000
topologystring

Mesh face type; quad is a quad-dominant remesh where supported. The glb file stores triangles.

Allowed:trianglequad
ninteger

One model per Job.

Allowed:1
Responses
200

Current advisory quote

parameter_noticesParameterNotice[]

Expected primary-channel handling; actual handling is reported by the successful Job.

Show properties
Array of ParameterNotice
namestringrequired
min length 1
dispositionstringrequired

ignored: the parameter was not applied. exceeded: the delivered result exceeds the request (extra outputs trimmed to n, a higher resolution with the requested aspect ratio, or audio although generate_audio is false) and is charged no more than the quote.

Allowed:ignoredexceeded
reasonstringrequired
Allowed:channel_parameter_unsupportedquality_requires_official_channelparameter_fixed_by_modelduplicate_referencenot_used_by_quoteoutput_count_exceededresolution_exceededaudio_includedtexture_includedpbr_included
messagestringrequired
billing_modeActualBillingModedeprecated

Legacy compatibility field. Omit for new requests. When retrying an existing idempotency key, preserve its original request including this field. Explicit consent to the authoritative actual cost of every upstream-billed attempt of the Job, without a max_cost cap. Eligible channels must provide authoritative task-level charges. Automatic routing is supported; routing.only is optional and, when supplied, remains binding. Cannot be combined with max_cost. Insufficient wallet funds become Job debt repaid by future manual recharge; outstanding debt blocks new Jobs. Every attempt the upstream actually billed is charged to the user, including failed and non-winning ones; attempts the upstream did not bill, and Yir's own delivery failures or outcome timeouts, are not charged. Omit for the default contract: balance is not frozen, each attempt checks the live balance against its route estimate, each upstream-billed attempt is charged at the authoritative upstream amount after the managed discount, and an explicit max_cost caps the Job's total charge.

parameter_handling_may_varyboolean

Fallback may handle parameters differently.

supplyobjectrequired

Whether any route can currently serve this request. Available supply has an empty issues array. No matching supply returns available=false and no_matching_supply, with primary unavailable. Authentication, invalid requests, and infrastructure failures remain errors.

Show properties
availablebooleanrequired
issuesstring[]required
objectstringrequired
modelstringrequired

Canonical model ID, also when the request used an alias.

min length 1
operationstringrequired
Allowed:generate_imagegenerate_videogenerate_musicgenerate_sound_effectgenerate_speechgenerate_3d
input_modestringrequired
Allowed:textimagereferencemultiviewlayer_decomposition
parametersQuoteParametersrequired

The normalized parameters a request resolves to: every parameter the model contract declares for the operation, at its contract spelling, with omitted parameters at their published default. Parameters the model does not declare are absent, so an image echo carries no duration, a silent video model carries no generate_audio, a music echo carries instrumental and lyrics_optimizer (plus duration for length-priced models) but no resolution or aspect_ratio, a sound-effect echo carries n and duration, and a text-to-speech echo carries n and voice. Regular image and video echoes include resolution and aspect_ratio. Layer decomposition echoes resolution and max_images. Only the common parameters are documented here; model-specific parameters are echoed under their contract names.

Show properties
sizestring

Optional exact output pixels (WIDTHxHEIGHT), only for models and channels that explicitly support the requested size. Omitted resolution and aspect_ratio are resolved from the declared size; explicit conflicting values are rejected. No approximate resizing or tier substitution. Omit to preserve the existing model defaults.

matches ^[1-9][0-9]*x[1-9][0-9]*$
qualitystring

Image quality tier when the request constrains one; absent when omitted, which lets any channel run.

min length 1
fpsinteger

Optional native output frame rate. Only models and channels explicitly declaring this frame rate are eligible; unsupported values are rejected without interpolation or transcoding. Omit to preserve existing behavior.

min 1
durationinteger | string

Video output length in seconds, or auto for supported reference-video edits. Quote and Job preserve auto; measured seconds are only used internally for estimation.

Show properties
One of:
integer
integer
string
string
resolutionstring
min length 1
aspect_ratiostring
min length 1
generate_audioboolean

Present when the model declares generate_audio.

dynamic_rangestring

Present for HDR video requests. Omitted for SDR.

Allowed:hdr
instrumentalboolean

Music only: no vocals.

lyrics_optimizerboolean

Music only: lyrics written from the prompt.

voicestring

Text-to-speech only: the resolved preset voice ID.

min length 1
ninteger
min 1
max_imagesinteger
min 2 · max 100
One of:
any
any
any
any
currencystringrequired
expires_atinteger<int64>required
min 1
input_duration_sourcestring

declared when primary and expected_amount price url reference media from the duration_seconds you declared rather than a measured file. The Job is admitted and charged by the duration Yir measures after importing the URL, so a longer actual file costs more. Omitted when the quote uses measured files or no input media duration.

Allowed:declared
expected_amountstring

Estimated USD charge on the current preferred route, as used by admission: the live-balance check, the API Key monthly limit and max_cost compare against it. Unlike primary it includes known input charges (such as reference image tokens) and, for usage-billed routes with enough recent volume, recent actual charges. Omitted when no supply matches or the route has no reliable pre-generation estimate. It is a reference, not a charge ceiling; fallback routes may cost more.

matches ^[0-9]+(?:\.[0-9]+)?$
primaryOutputQuoteEstimate | objectrequired

Current preferred route's estimate: its catalog reference price for fixed-price routes, or an output-only estimate for usage-based routes; otherwise unavailable. The Job is charged the authoritative upstream amounts of its billed attempts after the managed discount, which can differ from this estimate. An output-only estimate excludes input charges; neither is a charge ceiling, and Submit rechecks current facts. The independent official reference is reported in official.

Show properties
One of:
OutputQuoteEstimate
kindanyrequired
amountDecimalrequired
matches ^(0|[0-9]+)(\.[0-9]+)?$
estimateanyrequired
Show properties
scopeanyrequired
output_tokensinteger
min 1 · max 1000000
output_megapixelsinteger

Billable whole output megapixels using the model's declared pixel unit; excludes input megapixels. Mutually exclusive with output_tokens.

min 1 · max 1000000
qualitystring

Reference quality used for the output estimate. Omitted quality uses the catalog's medium reference when available; this does not change generation parameters.

min length 1
aspect_ratiostring

Reference aspect ratio used for the output estimate. Automatic aspect ratio uses a declared square reference when available; explicitly selected unsupported ratios remain unavailable.

min length 1
One of:
any
any
any
any
object
kindanyrequired
amountDecimalrequired
matches ^(0|[0-9]+)(\.[0-9]+)?$
object
kindanyrequired
amountnullrequired
reasonstringrequired
min length 1
officialOutputQuoteEstimate | objectrequired
Show properties
One of:
OutputQuoteEstimate
kindanyrequired
amountDecimalrequired
matches ^(0|[0-9]+)(\.[0-9]+)?$
estimateanyrequired
Show properties
scopeanyrequired
output_tokensinteger
min 1 · max 1000000
output_megapixelsinteger

Billable whole output megapixels using the model's declared pixel unit; excludes input megapixels. Mutually exclusive with output_tokens.

min 1 · max 1000000
qualitystring

Reference quality used for the output estimate. Omitted quality uses the catalog's medium reference when available; this does not change generation parameters.

min length 1
aspect_ratiostring

Reference aspect ratio used for the output estimate. Automatic aspect ratio uses a declared square reference when available; explicitly selected unsupported ratios remain unavailable.

min length 1
One of:
any
any
any
any
object
kindanyrequired
amountDecimalrequired
matches ^(0|[0-9]+)(\.[0-9]+)?$
object
kindanyrequired
amountnullrequired
reasonstringrequired
min length 1
price_difference_percentobject

Optional comparison with the official reference. Negative values mean a lower Yir price. Complete fixed prices are compared only with complete fixed prices. Output-only estimates are compared only when both prices use identical output assumptions; that comparison excludes input and other charges.

Show properties
minnumberrequired
maxnumberrequired
reference_amount_microsinteger<int64>
min 0
400
401
422
429

Too many Jobs are in progress, or the API key exceeded its per-minute request rate (YIR_RATE_LIMITED).

errorErrorrequired
Show properties
codestringrequired
Allowed:YIR_INVALID_REQUESTYIR_UNAUTHORIZEDYIR_INVALID_ROUTING_OVERRIDEYIR_ROUTING_OVERRIDE_NOT_ALLOWEDYIR_INSUFFICIENT_BALANCEYIR_BUDGET_EXCEEDEDYIR_SPEND_LIMIT_EXCEEDEDYIR_JOB_NOT_FOUNDYIR_FILE_NOT_FOUNDYIR_FILE_NOT_READYYIR_FILE_EXPIREDYIR_MODEL_NOT_FOUNDYIR_IDEMPOTENCY_CONFLICTYIR_JOB_NOT_CANCELLABLEYIR_NO_EXECUTABLE_ROUTEYIR_RATE_LIMITEDYIR_TEMPORARILY_UNAVAILABLEYIR_EXECUTION_FAILEDYIR_INPUT_REJECTEDYIR_CONTENT_REJECTEDYIR_OUTCOME_TIMEOUTYIR_RESULT_DELIVERY_FAILEDYIR_JOB_TIMEOUTYIR_FIDELITY_EXCLUDEDYIR_ACCOUNT_RESTRICTED
messagestringrequired
min length 1
retryablebooleanrequired
actionstring
Allowed:fix_requestmodify_inputadd_fundsretry_latercontact_support
provider_errorobject

Present on a failed Job whenever the upstream gave a reason for the last failed attempt, except failures of Yir's own provider account. Sanitized diagnostic text: links and request echoes are removed, and wording is not stable; branch on code.

Show properties
providerstringrequired

Public provider code of the rejecting route.

min length 1
messagestringrequired
min length 1 · max length 500
detailsobject[]

Field-level causes of a YIR_INVALID_REQUEST error, for correcting the request without parsing message.

min items 1
Show properties
Array of object
fieldstringrequired

Request path, for example parameters.resolution or input.references.0.role.

min length 1
reasonstringrequired
Allowed:invalid_bodyunknown_fieldwrong_typerequiredunsupportednot_allowedinvalidretired
allowedstring[]

Contract values the field accepts; for a retired model, its replacement.

expectedstring

Expected type or condition.

request_idstringrequired
min length 1
503
Request
curl -X POST 'https://gateway.yir.ai/v1/3d/quotes' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "hitem3d/hi3d-v3.0",
  "input": {
    "type": "image",
    "references": [
      {
        "role": "reference_image",
        "url": "https://example.com/chair.png"
      }
    ]
  },
  "parameters": {
    "texture": "standard",
    "pbr": false
  }
}'
Response
{
  "parameter_notices": [
    {
      "name": "string",
      "disposition": "ignored",
      "reason": "channel_parameter_unsupported",
      "message": "string"
    }
  ],
  "billing_mode": "actual",
  "parameter_handling_may_vary": true,
  "supply": {
    "available": true,
    "issues": [
      "no_matching_supply"
    ]
  },
  "object": "quote",
  "model": "string",
  "operation": "generate_image",
  "input_mode": "text",
  "parameters": {
    "size": "string",
    "quality": "string",
    "fps": 1,
    "duration": 1,
    "resolution": "string",
    "aspect_ratio": "string",
    "generate_audio": true,
    "dynamic_range": "hdr",
    "instrumental": true,
    "lyrics_optimizer": true,
    "voice": "string",
    "n": 1,
    "max_images": 2
  },
  "currency": "USD",
  "expires_at": 1,
  "input_duration_source": "declared",
  "expected_amount": "string",
  "primary": {
    "kind": "estimate",
    "amount": "string",
    "estimate": {
      "scope": "output_only",
      "output_tokens": 1,
      "output_megapixels": 1,
      "quality": "string",
      "aspect_ratio": "string"
    }
  },
  "official": {
    "kind": "estimate",
    "amount": "string",
    "estimate": {
      "scope": "output_only",
      "output_tokens": 1,
      "output_megapixels": 1,
      "quality": "string",
      "aspect_ratio": "string"
    }
  },
  "price_difference_percent": {
    "min": 0,
    "max": 0,
    "reference_amount_micros": 0
  }
}