GlossiDocs
Open Glossi
API

Models from photos

Create a 3D model of a product from photos, review it, and add it to the library, through the REST API or an MCP agent.

Generate from photos turns product photos into a starting 3D model. The REST API and the MCP connector run the same generation as Add model → Generate in the app, and a generation started here appears there.

Access

REST requests use your workspace API key in X-API-Key. Paths below are relative to https://api.glossi.io/api/v1. MCP tools take the same arguments by name. Errors use the standard shape, { "error": { "code": "...", "message": "..." } }.

RESTMCP tool
GET /model-generations/offerget_model_generation_offer
POST /model-generationsgenerate_model_from_photos
GET /model-generationslist_model_generations
GET /model-generations/:idwait_for_model_generation
POST /model-generations/:id/approveapprove_generated_model
POST /model-generations/:id/declinedecline_generated_model

1. Read the offer

curl 'https://api.glossi.io/api/v1/model-generations/offer' \
  -H "X-API-Key: $GLOSSI_API_KEY"
{
  "available": true,
  "programId": "8f0c…",
  "mode": "USAGE",
  "payment": "Uses the workspace's usage when the generation starts. Adding the result to the library costs nothing more.",
  "price": null,
  "generationMinutesMax": 30,
  "typicalGenerationMinutes": 18,
  "reviewDays": 30,
  "discards": { "max": 2, "left": 2, "next": "FREE", "freesAt": null }
}

mode is how your workspace pays for generated models:

ModeWhat it means
USAGEUses your plan's usage when the generation starts. Approving costs nothing more.
FREEIncluded for your workspace.
CARDprice is charged to the workspace's saved card when an owner or admin approves the result.
INVOICEprice goes on your organization's monthly invoice when someone with purchase access approves it.

A failed generation is never charged. Declining a result keeps the usage it spent, and on CARD and INVOICE workspaces each decline uses one of the free discards in discards.

2. Start a generation

Send 1 to 6 photos of the product, front first. Use public links in referenceImageUrls, or upload local files with POST /materials/generate/reference-upload and pass the returned keys in referenceKeys. PNG, JPEG, and WEBP work; large photos are scaled down to fit.

curl -X POST 'https://api.glossi.io/api/v1/model-generations' \
  -H "X-API-Key: $GLOSSI_API_KEY" -H 'Content-Type: application/json' \
  -d '{
    "programId": "8f0c…",
    "name": "Water bottle",
    "referenceImageUrls": ["https://example.com/bottle-front.jpg", "https://example.com/bottle-side.jpg"],
    "units": "mm",
    "notes": "210 mm tall, the cap unscrews"
  }'

The response is 202 with a generationId and an idempotencyKey. Send the same idempotencyKey to retry safely; it never starts twice. A programId from an older offer is refused, so read the offer again if the price changed.

3. Review the result

Poll GET /model-generations/:id until status leaves GENERATING:

StatusNext step
GENERATINGPoll again. progress shows the current phase.
FAILEDerror says why. Nothing was charged.
READY_FOR_REVIEWpreview.views has short-lived images of the model; approval has the terms. Approve or decline.
DECLINED, EXPIREDNothing more to do. A result not reviewed within reviewDays expires.
NEEDS_PAYMENT_ACTION, PROCESSING_PAYMENTCard result approved but not paid yet; the bank may need the user to confirm in Glossi. Nothing is added until it is paid.
ADDING_TO_LIBRARYApproved; the model is being converted.
IN_LIBRARYmodelId is ready to use in a project.

4. Approve or decline

curl -X POST 'https://api.glossi.io/api/v1/model-generations/GENERATION_ID/approve' \
  -H "X-API-Key: $GLOSSI_API_KEY" -H 'Content-Type: application/json' -d '{}'

When approval.price is set, send { "confirmTotalMinor": <approval.price.totalMinor> } to agree to that exact price. If the card needs your bank's confirmation, payment.status is REQUIRES_ACTION; finish it in Add model in Glossi. Then poll until IN_LIBRARY.

POST /model-generations/:id/decline throws a result away.

On this page