{"openapi":"3.1.0","info":{"title":"Veyra Commercial Sandbox API","version":"1.6.1","description":"Local opt-in sandbox: demo cookies or configured RFC9068 Bearer tokens plus authoritative tenant membership. No token issuer, OIDC browser login, OAuth2 client issuance, downloads or webhooks. Not a Production Engine contract."},"servers":[{"url":"/api/v1"}],"security":[{"sandboxSession":[]},{"sandboxBearer":[]}],"paths":{"/services":{"get":{"operationId":"listServices","responses":{"200":{"description":"Sandbox response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Services"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body deadline exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Authenticated request rate limit reached. No body/domain operation is performed. Retry explicitly with the same quote/key after the indicated delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"required":true,"description":"Positive delay in seconds for the exhausted fixed windows.","schema":{"type":"string","pattern":"^[1-9][0-9]*$"}}}},"503":{"description":"Sandbox, identity or request admission unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-bearer-permission":"catalog:read"},"parameters":[{"name":"X-Veyra-Tenant","in":"header","required":false,"description":"Required with sandbox Bearer authentication; ignored for demo cookies. Membership must authorize the selected tenant.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[-A-Za-z0-9_]+$"}}]},"/quotes":{"post":{"operationId":"createQuote","responses":{"201":{"description":"Sandbox response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body deadline exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Authenticated request rate limit reached. No body/domain operation is performed. Retry explicitly with the same quote/key after the indicated delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"required":true,"description":"Positive delay in seconds for the exhausted fixed windows.","schema":{"type":"string","pattern":"^[1-9][0-9]*$"}}}},"503":{"description":"Sandbox, identity or request admission unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"description":"Authenticated request bodies are limited to16000 UTF8 bytes and a5000ms total read deadline. Overflow returns413; an incomplete body past the deadline returns408 before domain writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteInput"}}}},"x-required-bearer-permission":"quotes:write"},"parameters":[{"name":"X-Veyra-Tenant","in":"header","required":false,"description":"Required with sandbox Bearer authentication; ignored for demo cookies. Membership must authorize the selected tenant.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[-A-Za-z0-9_]+$"}}]},"/jobs":{"get":{"operationId":"listJobs","responses":{"200":{"description":"Sandbox response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jobs"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body deadline exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Authenticated request rate limit reached. No body/domain operation is performed. Retry explicitly with the same quote/key after the indicated delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"required":true,"description":"Positive delay in seconds for the exhausted fixed windows.","schema":{"type":"string","pattern":"^[1-9][0-9]*$"}}}},"503":{"description":"Sandbox, identity or request admission unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Legacy bare array of the newest20 jobs only, ordered by createdAt DESC,id DESC. Use /jobs/page to traverse history.","x-required-bearer-permission":"jobs:read"},"post":{"operationId":"submitJob","responses":{"202":{"description":"Sandbox response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body deadline exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Authenticated request rate limit reached. No body/domain operation is performed. Retry explicitly with the same quote/key after the indicated delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"required":true,"description":"Positive delay in seconds for the exhausted fixed windows.","schema":{"type":"string","pattern":"^[1-9][0-9]*$"}}}},"503":{"description":"Sandbox, identity or request admission unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"description":"Authenticated request bodies are limited to16000 UTF8 bytes and a5000ms total read deadline. Overflow returns413; an incomplete body past the deadline returns408 before domain writes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitInput"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,128}$"}}],"x-required-bearer-permission":"jobs:write"},"parameters":[{"name":"X-Veyra-Tenant","in":"header","required":false,"description":"Required with sandbox Bearer authentication; ignored for demo cookies. Membership must authorize the selected tenant.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[-A-Za-z0-9_]+$"}}]},"/jobs/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Veyra-Tenant","in":"header","required":false,"description":"Required with sandbox Bearer authentication; ignored for demo cookies. Membership must authorize the selected tenant.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[-A-Za-z0-9_]+$"}}],"get":{"operationId":"getJob","responses":{"200":{"description":"Sandbox response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body deadline exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Authenticated request rate limit reached. No body/domain operation is performed. Retry explicitly with the same quote/key after the indicated delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"required":true,"description":"Positive delay in seconds for the exhausted fixed windows.","schema":{"type":"string","pattern":"^[1-9][0-9]*$"}}}},"503":{"description":"Sandbox, identity or request admission unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-bearer-permission":"jobs:read"}},"/jobs/{id}/cancel":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Veyra-Tenant","in":"header","required":false,"description":"Required with sandbox Bearer authentication; ignored for demo cookies. Membership must authorize the selected tenant.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[-A-Za-z0-9_]+$"}}],"post":{"operationId":"cancelJob","responses":{"200":{"description":"Sandbox response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body deadline exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Authenticated request rate limit reached. No body/domain operation is performed. Retry explicitly with the same quote/key after the indicated delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"required":true,"description":"Positive delay in seconds for the exhausted fixed windows.","schema":{"type":"string","pattern":"^[1-9][0-9]*$"}}}},"503":{"description":"Sandbox, identity or request admission unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-bearer-permission":"jobs:write"}},"/usage":{"get":{"operationId":"getUsage","responses":{"200":{"description":"Sandbox response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body deadline exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Authenticated request rate limit reached. No body/domain operation is performed. Retry explicitly with the same quote/key after the indicated delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"required":true,"description":"Positive delay in seconds for the exhausted fixed windows.","schema":{"type":"string","pattern":"^[1-9][0-9]*$"}}}},"503":{"description":"Sandbox, identity or request admission unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-bearer-permission":"credits:read"},"parameters":[{"name":"X-Veyra-Tenant","in":"header","required":false,"description":"Required with sandbox Bearer authentication; ignored for demo cookies. Membership must authorize the selected tenant.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[-A-Za-z0-9_]+$"}}]},"/assets":{"get":{"operationId":"listAssets","responses":{"200":{"description":"Sandbox response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assets"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body deadline exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Authenticated request rate limit reached. No body/domain operation is performed. Retry explicitly with the same quote/key after the indicated delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"required":true,"description":"Positive delay in seconds for the exhausted fixed windows.","schema":{"type":"string","pattern":"^[1-9][0-9]*$"}}}},"503":{"description":"Sandbox, identity or request admission unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-bearer-permission":"jobs:read"},"parameters":[{"name":"X-Veyra-Tenant","in":"header","required":false,"description":"Required with sandbox Bearer authentication; ignored for demo cookies. Membership must authorize the selected tenant.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[-A-Za-z0-9_]+$"}}]},"/jobs/page":{"get":{"operationId":"listJobPage","responses":{"200":{"description":"Sandbox response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobPage"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body deadline exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Authenticated request rate limit reached. No body/domain operation is performed. Retry explicitly with the same quote/key after the indicated delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"required":true,"description":"Positive delay in seconds for the exhausted fixed windows.","schema":{"type":"string","pattern":"^[1-9][0-9]*$"}}}},"503":{"description":"Sandbox, identity or request admission unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Tenant-private history, newest createdAt then UUID first. Cursor is the last returned job UUID; missing/foreign cursors return404. Concurrent inserts do not shift the older-page boundary; this is not a frozen snapshot. Unknown or repeated query parameters return400.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"description":"Canonical positive decimal1–50; no signs, leading zeros, decimals or empty value."},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"An existing job UUID owned by the authenticated tenant."}],"x-required-bearer-permission":"jobs:read"},"parameters":[{"name":"X-Veyra-Tenant","in":"header","required":false,"description":"Required with sandbox Bearer authentication; ignored for demo cookies. Membership must authorize the selected tenant.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[-A-Za-z0-9_]+$"}}]},"/credit-entries/page":{"get":{"operationId":"listCreditEntryPage","responses":{"200":{"description":"Sandbox response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditPage"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body deadline exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Authenticated request rate limit reached. No body/domain operation is performed. Retry explicitly with the same quote/key after the indicated delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"required":true,"description":"Positive delay in seconds for the exhausted fixed windows.","schema":{"type":"string","pattern":"^[1-9][0-9]*$"}}}},"503":{"description":"Sandbox, identity or request admission unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Tenant-private demo credit movements, newest append first even if timestamps regress. Cursor identifies an owned movement by kind/job UUID, never a global storage sequence. Missing/foreign cursors return404; malformed/unknown/repeated query fields return400.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"description":"Canonical positive decimal1–50; no signs, leading zeros, decimals or empty value."},{"name":"before","in":"query","required":false,"schema":{"allOf":[{"type":"string","maxLength":44},{"anyOf":[{"type":"string","const":"grant"},{"type":"string","pattern":"^(reserve|release)_([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)$"}]}]},"description":"Reuse nextCursor: grant, reserve_<uuid> or release_<uuid>. Always resolved in the authenticated tenant."}],"x-required-bearer-permission":"credits:read"},"parameters":[{"name":"X-Veyra-Tenant","in":"header","required":false,"description":"Required with sandbox Bearer authentication; ignored for demo cookies. Membership must authorize the selected tenant.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[-A-Za-z0-9_]+$"}}]},"/limits":{"get":{"operationId":"getJobLimits","responses":{"200":{"description":"Sandbox response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobLimits"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body deadline exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Authenticated request rate limit reached. No body/domain operation is performed. Retry explicitly with the same quote/key after the indicated delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"required":true,"description":"Positive delay in seconds for the exhausted fixed windows.","schema":{"type":"string","pattern":"^[1-9][0-9]*$"}}}},"503":{"description":"Sandbox, identity or request admission unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-bearer-permission":"jobs:read"},"parameters":[{"name":"X-Veyra-Tenant","in":"header","required":false,"description":"Required with sandbox Bearer authentication; ignored for demo cookies. Membership must authorize the selected tenant.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[-A-Za-z0-9_]+$"}}]},"/jobs/{id}/production":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Veyra-Tenant","in":"header","required":false,"description":"Required with sandbox Bearer authentication; ignored for demo cookies. Membership must authorize the selected tenant.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[-A-Za-z0-9_]+$"}}],"get":{"operationId":"getProductionStatus","responses":{"200":{"description":"Sandbox response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionStatus"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body deadline exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Authenticated request rate limit reached. No body/domain operation is performed. Retry explicitly with the same quote/key after the indicated delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"required":true,"description":"Positive delay in seconds for the exhausted fixed windows.","schema":{"type":"string","pattern":"^[1-9][0-9]*$"}}}},"503":{"description":"Sandbox, identity or request admission unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-bearer-permission":"jobs:read"}}},"components":{"securitySchemes":{"sandboxBearer":{"type":"http","scheme":"bearer","bearerFormat":"RFC9068 RS256 JWT","description":"Optional server-configured public JWKS; requires X-Veyra-Tenant and authoritative membership plus per-operation scope. Not an OAuth2 credential issuer or production OIDC flow."},"sandboxSession":{"type":"apiKey","in":"cookie","name":"veyra_session","description":"Local demo session. Not production authentication."}},"schemas":{"QuoteInput":{"type":"object","properties":{"serviceId":{"type":"string","minLength":1,"maxLength":80},"sector":{"type":"string","enum":["e-commerce","real-estate","restaurants","music","agencies","creators"]},"brief":{"type":"string","minLength":10,"maxLength":4000},"maxCredits":{"type":"integer","exclusiveMinimum":0,"maximum":10000},"preferences":{"type":"object","properties":{"tone":{"type":"string","enum":["professional","warm","bold"]},"language":{"type":"string","enum":["pt-PT","en-GB","es-ES"]},"style":{"type":"string","minLength":1,"maxLength":160}},"additionalProperties":false}},"required":["serviceId","sector","brief","maxCredits"],"additionalProperties":false},"SubmitInput":{"type":"object","properties":{"quoteId":{"type":"string","format":"uuid","pattern":"^([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)$"}},"required":["quoteId"],"additionalProperties":false},"JobPageInput":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":50},"before":{"type":"string","format":"uuid","pattern":"^([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)$"}},"additionalProperties":false},"LedgerPageInput":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":50},"before":{"allOf":[{"type":"string","maxLength":44},{"anyOf":[{"type":"string","const":"grant"},{"type":"string","pattern":"^(reserve|release)_([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)$"}]}]}},"additionalProperties":false},"CreditEntry":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"GRANT"},"jobId":{"type":"string","const":""},"credits":{"type":"number","const":100},"createdAt":{"type":"integer","minimum":-8640000000000000,"maximum":8640000000000000}},"required":["kind","jobId","credits","createdAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["RESERVE","RELEASE"]},"jobId":{"type":"string","format":"uuid","pattern":"^([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)$"},"credits":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"integer","minimum":-8640000000000000,"maximum":8640000000000000}},"required":["kind","jobId","credits","createdAt"],"additionalProperties":false}]},"CreditCursor":{"allOf":[{"type":"string","maxLength":44},{"anyOf":[{"type":"string","const":"grant"},{"type":"string","pattern":"^(reserve|release)_([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)$"}]}]},"CreditPage":{"type":"object","additionalProperties":false,"required":["items","nextCursor"],"properties":{"items":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/CreditEntry"}},"nextCursor":{"anyOf":[{"allOf":[{"type":"string","maxLength":44},{"anyOf":[{"type":"string","const":"grant"},{"type":"string","pattern":"^(reserve|release)_([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)$"}]}]},{"type":"null"}]}}},"PromptProfileSnapshot":{"type":"object","properties":{"versions":{"type":"object","properties":{"compiler":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"},"global":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"},"sector":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"},"service":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"},"adapter":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]*$"}},"required":["compiler","global","sector","service","adapter"],"additionalProperties":false},"service":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"type":{"type":"string","enum":["VIDEO","MUSIC","AUDIO","IMAGE","DOCUMENT","TEXT","AGENT"]}},"required":["id","type"],"additionalProperties":false},"sector":{"type":"string","enum":["e-commerce","real-estate","restaurants","music","agencies","creators"]},"availability":{"type":"string","const":"SANDBOX_ONLY"},"policies":{"type":"object","properties":{"global":{"type":"object","properties":{"tenantIsolation":{"type":"string","const":"required"},"rightsVerification":{"type":"string","const":"required"},"financialAuthorization":{"type":"string","const":"external-deterministic-gate"}},"required":["tenantIsolation","rightsVerification","financialAuthorization"],"additionalProperties":false},"sector":{"type":"object","properties":{"rules":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":1000}}},"required":["rules"],"additionalProperties":false},"service":{"type":"object","properties":{"format":{"type":"string","minLength":1,"maxLength":16},"rules":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":1000}}},"required":["format","rules"],"additionalProperties":false}},"required":["global","sector","service"],"additionalProperties":false},"preferences":{"type":"object","properties":{"tone":{"type":"string","enum":["professional","warm","bold"]},"language":{"type":"string","enum":["pt-PT","en-GB","es-ES"]},"style":{"type":"string","minLength":1,"maxLength":160}},"required":["tone","language","style"],"additionalProperties":false},"provenance":{"type":"object","properties":{"tone":{"type":"string","enum":["brand","tenant","order","model","defaults"]},"language":{"type":"string","enum":["brand","tenant","order","model","defaults"]},"style":{"type":"string","enum":["brand","tenant","order","model","defaults"]}},"required":["tone","language","style"],"additionalProperties":false},"brief":{"type":"object","properties":{"trust":{"type":"string","const":"UNTRUSTED_USER_CONTENT"},"text":{"type":"string","minLength":10,"maxLength":4000}},"required":["trust","text"],"additionalProperties":false},"digest":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["versions","service","sector","availability","policies","preferences","provenance","brief","digest"],"additionalProperties":false},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"Service":{"type":"object","required":["id","name","type","availability","configVersion","credits","family","description"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"enum":["VIDEO","MUSIC","AUDIO","IMAGE","DOCUMENT","TEXT","AGENT"]},"family":{"enum":["Creative","Business AI"]},"configVersion":{"type":"string"},"credits":{"type":"integer","minimum":1},"availability":{"const":"SANDBOX_ONLY"}}},"Services":{"type":"array","items":{"$ref":"#/components/schemas/Service"}},"Quote":{"type":"object","required":["id","tenantId","input","credits","configVersion","expiresAt","profileSnapshot"],"properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string"},"input":{"$ref":"#/components/schemas/QuoteInput"},"credits":{"type":"integer"},"configVersion":{"type":"string"},"expiresAt":{"type":"integer"},"profileSnapshot":{"$ref":"#/components/schemas/PromptProfileSnapshot"}}},"Job":{"type":"object","required":["id","tenantId","quoteId","serviceId","sector","brief","configVersion","credits","status","createdAt","mode"],"properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string"},"quoteId":{"type":"string","format":"uuid"},"serviceId":{"type":"string"},"sector":{"type":"string"},"brief":{"type":"string"},"configVersion":{"type":"string"},"credits":{"type":"integer"},"status":{"enum":["QUEUED","CANCELLED"]},"createdAt":{"type":"integer"},"mode":{"const":"sandbox"},"profileSnapshot":{"$ref":"#/components/schemas/PromptProfileSnapshot","description":"Exact quote-time profile. Omitted only for pre-1.1 historical jobs, including their idempotent retries."}}},"ProductionStatus":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid","pattern":"^([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)$"},"linked":{"type":"boolean"},"engineJobId":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{32}$(?![\\s\\S])"},{"type":"null"}]},"observation":{"anyOf":[{"type":"object","properties":{"eventId":{"type":"string","pattern":"^[a-f0-9]{32}$(?![\\s\\S])"},"generation":{"type":"string","pattern":"^(0|[1-9][0-9]{0,18})$(?![\\s\\S])"},"state":{"type":"string","enum":["QUEUED","ADMISSION_PENDING","WAITING_FOR_CAPACITY","INITIALIZING_HOST","STARTING_CONTAINER","ORCHESTRATING","OBSERVATION_UNAVAILABLE","SUBMITTING","SUBMISSION_RECONCILING","SUBMISSION_UNKNOWN","CANCELLING","RUNNING","SUCCEEDED","READY","FAILED","CANCELLED","EXPIRED"]},"occurredAt":{"type":"number","minimum":0,"maximum":9007199254740992,"multipleOf":1}},"required":["eventId","generation","state","occurredAt"],"additionalProperties":false},{"type":"null"}]},"deliveryAuthorized":{"type":"boolean","const":false},"accountingReconciled":{"type":"boolean","const":false}},"required":["jobId","linked","engineJobId","observation","deliveryAuthorized","accountingReconciled"],"additionalProperties":false},"Jobs":{"type":"array","items":{"$ref":"#/components/schemas/Job"}},"JobPage":{"type":"object","additionalProperties":false,"required":["items","nextCursor"],"properties":{"items":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/Job"}},"nextCursor":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([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)$"},{"type":"null"}]}}},"Usage":{"type":"object","required":["total","reserved","available"],"properties":{"total":{"type":"integer"},"reserved":{"type":"integer"},"available":{"type":"integer"}}},"JobLimits":{"type":"object","additionalProperties":false,"required":["maxQueuedJobs","queuedJobs","availableJobSlots","services"],"properties":{"maxQueuedJobs":{"type":"integer","minimum":1},"queuedJobs":{"type":"integer","minimum":0},"availableJobSlots":{"type":"integer","minimum":0,"description":"Queue slots remaining, clamped to zero. Service availability also respects the tenant-wide cap; credits and authorization remain separate admission requirements."},"services":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["serviceId","maxQueuedJobs","queuedJobs","availableJobSlots"],"properties":{"serviceId":{"type":"string"},"maxQueuedJobs":{"type":"integer","minimum":1},"queuedJobs":{"type":"integer","minimum":0},"availableJobSlots":{"type":"integer","minimum":0,"description":"Queue slots remaining, clamped to zero. Service availability also respects the tenant-wide cap; credits and authorization remain separate admission requirements."}}}}},"description":"Local sandbox queued-job limits for the authenticated tenant. Cancelled jobs free slots; exact idempotent retries do not consume new slots. New submissions return409 TENANT_JOB_LIMIT_REACHED or SERVICE_JOB_LIMIT_REACHED when full. This is not a distributed rate limiter or a paid plan entitlement."},"Assets":{"type":"array","maxItems":0,"items":{"type":"object"},"description":"No output is fabricated. Sandbox jobs do not render assets."}}}}