Skip to Content
Generations

Create a rug (or another size of a rug kit) from a top-down photo; free

POST
/developer-api/rugs

Authorization

bearer
headerAuthorizationBearer <secret_api_key>

Use Authorization: Bearer <secret_api_key>.

Header Parameters

x-idempotency-key?string

Optional key for safe retries (kept 24 h): the same key and body return the first job. While the first call is still starting a retry gets 409 (code gate.ERROR_DEVELOPER_API_GENERATION_STARTING) for a few minutes at most. If a call with this key timed out after the job may have started, the key stays bound and a retry returns 409 — list generations before launching again with a new key.

Request Body

application/json
  1. body
image*

Top-down photo of the rug (background is removed automatically).

width_mm*integer

Real width of the rug in millimetres (160 cm = 1600).

Range0 < value <= 100000
length_mm*integer

Real length of the rug in millimetres (the depth axis; 230 cm = 2300).

Range0 < value <= 100000
name?string
Length1 <= length <= 200
kit_id?string

Existing kit to add the result to (mutually exclusive with kit_name).

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
kit_name?string

Rugs and flooring: name of the product to add the result to as a variant — the product with exactly this name, created as a draft when there is none (while kits are still kept in sync, a kit of this name). Other models: a new kit with this name. The field keeps its kit name for compatibility.

Length1 <= length <= 200

Response Body

Invalid request

application/json
  1. response
status*number
Value in100101102103200201202203204205206207208210300301302303304307308400401402403404405406407408409410411412413414415416417418421422423424428429456500501502503504505507508
code*string

Machine-readable error id (i18n dictionary key), e.g. shopify.ERROR_ID_TOKEN_INVALID; http_error.<STATUS> when there is no specific one.

error*array<string>
retryAfterSeconds?integer
Range0 <= value <= 9007199254740991
manageUrl?string

Where this account pays instead: the Vizbl app billing page in the Shopify admin (subscription.ERROR_PAYMENTS_THROUGH_SHOPIFY_APP).

Formaturi
manage_url?stringDeprecated

Deprecated: the same as manageUrl, kept for the clients that still read it.

Formaturi
stack?string
Example Request
curl -X POST 'https://api.vizbl.com/developer-api/rugs' \  -H 'Content-Type: application/json' \  -d '{  "image": {},  "width_mm": 1,  "length_mm": 1}'
Example Response
{  "status": 100,  "code": "string",  "error": [    "string"  ],  "retryAfterSeconds": 0,  "manageUrl": "http://example.com",  "manage_url": "http://example.com",  "stack": "string"}