{"openapi":"3.0.3","info":{"title":"Vietls Public API","version":"v1","description":"Filtered public API skeleton for agent-ready Vietls workflow automation. Discovery is public; quote, job, and paid operations remain controlled beta."},"servers":[{"url":"https://www.vietls.com","description":"Canonical Vietls production origin"}],"externalDocs":{"description":"Vietls developer hub","url":"https://www.vietls.com/developers"},"tags":[{"name":"Discovery","description":"Public, read-only capability discovery."},{"name":"Workflow Quotes","description":"Controlled beta quote boundary before spending credits."},{"name":"Workflow Jobs","description":"Controlled beta job creation and status boundary."},{"name":"Workflow Artifacts","description":"Controlled beta artifact listing and download handoff boundary."},{"name":"Usage","description":"Controlled beta usage summary boundary."},{"name":"Billing Safety","description":"Controlled beta no-spend billing lifecycle simulation boundary."},{"name":"Commerce","description":"Controlled beta checkout handoff boundary."}],"paths":{"/api/public/v1/capabilities":{"get":{"tags":["Discovery"],"operationId":"listPublicCapabilities","summary":"List public API capabilities and workflow statuses.","security":[],"responses":{"200":{"description":"Capability catalog for public and controlled-beta operations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiCapabilitiesEnvelope"}}}}}}},"/api/public/v1/quotes":{"post":{"tags":["Workflow Quotes"],"operationId":"quoteWorkflow","summary":"Quote a workflow before spending credits.","description":"Validates the public quote request shape and beta token, then returns a preview-only non-spending quote.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteWorkflowRequest"}}}},"responses":{"200":{"description":"Preview-only quote response. This does not reserve credits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiQuotePreviewEnvelope"}}}},"403":{"description":"Controlled beta access is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}},"422":{"description":"The request shape is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}}}}},"/api/public/v1/jobs":{"post":{"tags":["Workflow Jobs"],"operationId":"createWorkflowJob","summary":"Create a no-spend dry-run workflow job after quote acceptance.","description":"Validates quote id, idempotency, confirmation fields, and beta token, then returns a deterministic no-spend dry-run job. Live provider execution remains disabled until reserve/commit billing smoke tests are green.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowJobRequest"}}}},"responses":{"202":{"description":"No-spend dry-run job accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiJobEnvelope"}}}},"403":{"description":"Controlled beta access is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}},"422":{"description":"The request shape is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}}}}},"/api/public/v1/jobs/{jobId}":{"get":{"tags":["Workflow Jobs"],"operationId":"getWorkflowJobStatus","summary":"Read workflow dry-run job status.","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]{8,128}$"}}],"responses":{"200":{"description":"Dry-run job status for a job_preview id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiJobEnvelope"}}}},"403":{"description":"Controlled beta access is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}},"404":{"description":"No public workflow job was found for the beta token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}},"422":{"description":"The job id is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}}}}},"/api/public/v1/jobs/{jobId}/artifacts":{"get":{"tags":["Workflow Artifacts"],"operationId":"listWorkflowJobArtifacts","summary":"List artifacts for a workflow dry-run job.","description":"Returns an empty artifacts array for job_preview ids so clients can validate artifact-empty handling before live downloadable artifacts are enabled.","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]{8,128}$"}}],"responses":{"200":{"description":"Dry-run artifact list for a job_preview id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiArtifactListEnvelope"}}}},"403":{"description":"Controlled beta access is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}},"404":{"description":"No public workflow job was found for the beta token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}},"422":{"description":"The job id is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}}}}},"/api/public/v1/jobs/{jobId}/artifacts/{artifactId}/download-url":{"get":{"tags":["Workflow Artifacts"],"operationId":"getWorkflowArtifactDownloadUrl","summary":"Create a short-lived artifact download URL.","description":"Dry-run job_preview ids have no downloadable artifacts and return PUBLIC_API_ARTIFACT_NOT_FOUND. The success schema documents the future live-artifact handoff shape.","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]{8,128}$"}},{"name":"artifactId","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":160,"pattern":"^[A-Za-z0-9._:-]{3,160}$"}}],"responses":{"200":{"description":"Short-lived artifact download URL for a live completed job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiArtifactDownloadUrlEnvelope"}}}},"403":{"description":"Controlled beta access is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}},"404":{"description":"No public workflow job or artifact was found for the beta token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}},"422":{"description":"The job id or artifact id is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}}}}},"/api/public/v1/usage":{"get":{"tags":["Usage"],"operationId":"getUsageSummary","summary":"Read no-spend public API usage summary.","description":"Returns a controlled beta dry-run usage summary for beta-token clients. Preview calls are not metered and never reserve or spend credits.","responses":{"200":{"description":"No-spend dry-run usage summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiUsageSummaryEnvelope"}}}},"403":{"description":"Controlled beta access is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}}}}},"/api/public/v1/billing/simulations":{"post":{"tags":["Billing Safety"],"operationId":"simulateBillingLifecycle","summary":"Simulate the public billing reserve/commit/release lifecycle.","description":"Validates beta access, quote acceptance, idempotency, and explicit user confirmation, then returns a deterministic no-spend billing lifecycle simulation. This route never reserves credits, mutates ledgers, executes providers, or creates artifacts.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulateBillingLifecycleRequest"}}}},"responses":{"200":{"description":"No-spend billing lifecycle simulation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiBillingSimulationEnvelope"}}}},"403":{"description":"Controlled beta access is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}},"422":{"description":"The request shape is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}}}}},"/api/public/v1/checkout/handoffs":{"post":{"tags":["Commerce"],"operationId":"createCheckoutHandoff","summary":"Create a preview-only hosted checkout handoff.","description":"Validates beta access, paid plan selection, billing cycle, idempotency, and explicit user confirmation, then returns a deterministic no-spend handoff preview. This route never creates a provider checkout session, collects card details, creates a subscription, or mutates billing ledgers.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutHandoffRequest"}}}},"responses":{"200":{"description":"Preview-only checkout handoff. No provider checkout URL is created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiCheckoutHandoffEnvelope"}}}},"403":{"description":"Controlled beta access is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}},"422":{"description":"The request shape is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}}}}}}},"components":{"securitySchemes":{"VietlsApiKey":{"type":"http","scheme":"bearer","description":"Use a controlled beta token from Vietls. The server also accepts X-Vietls-API-Key for clients that cannot set Authorization."}},"schemas":{"PublicApiMeta":{"type":"object","required":["apiVersion","status","requestId","timestamp","docsPath","openApiPath"],"properties":{"apiVersion":{"type":"string","enum":["v1"]},"status":{"type":"string","enum":["controlled_beta"]},"requestId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"docsPath":{"type":"string","example":"/developers"},"openApiPath":{"type":"string","example":"/developers/api/openapi.json"}}},"PublicApiCapabilitiesEnvelope":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/PublicApiCapabilities"},"meta":{"$ref":"#/components/schemas/PublicApiMeta"}}},"PublicApiQuotePreviewEnvelope":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/PublicApiQuotePreview"},"meta":{"$ref":"#/components/schemas/PublicApiMeta"}}},"PublicApiQuotePreview":{"type":"object","required":["quote","safety","nextStep"],"properties":{"quote":{"type":"object","required":["id","status","workflowId","units","currency","spendMode","finalQuoteRequired"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["preview_only"]},"workflowId":{"type":"string","enum":["prproj.subtitle.extract","prproj.xml.inspect","subtitle.translate","tts.standard.generate","youtube.transcript.fetch"]},"workflowTitle":{"type":"string"},"units":{"type":"number","minimum":0},"currency":{"type":"string","enum":["vietls_credit"]},"estimatedCredits":{"type":"number","nullable":true},"expiresAt":{"type":"string","format":"date-time"},"spendMode":{"type":"string","enum":["none"]},"finalQuoteRequired":{"type":"boolean","enum":[true]},"betaTokenId":{"type":"string"}}},"safety":{"type":"object","required":["spendsCredits","reservesCredits","createsJob","userConfirmationRequiredBeforeJob"],"properties":{"spendsCredits":{"type":"boolean","enum":[false]},"reservesCredits":{"type":"boolean","enum":[false]},"createsJob":{"type":"boolean","enum":[false]},"userConfirmationRequiredBeforeJob":{"type":"boolean","enum":[true]},"note":{"type":"string"}}},"nextStep":{"type":"string"}}},"PublicApiJobEnvelope":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/PublicApiJobResult"},"meta":{"$ref":"#/components/schemas/PublicApiMeta"}}},"PublicApiJobResult":{"type":"object","required":["job","safety","nextStep"],"properties":{"job":{"type":"object","required":["id","status","mode","requestId","betaTokenId","createdAt","updatedAt","statusPath","artifacts","usage"],"properties":{"id":{"type":"string","pattern":"^job_preview_[a-f0-9]{8}$"},"status":{"type":"string","enum":["accepted_preview","completed_preview"]},"mode":{"type":"string","enum":["dry_run"]},"workflowId":{"type":"string","enum":["prproj.subtitle.extract","prproj.xml.inspect","subtitle.translate","tts.standard.generate","youtube.transcript.fetch"],"nullable":true},"workflowTitle":{"type":"string","nullable":true},"quoteId":{"type":"string","nullable":true},"idempotencyKeyHash":{"type":"string","nullable":true},"requestId":{"type":"string"},"betaTokenId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"statusPath":{"type":"string"},"artifacts":{"type":"array","items":{"type":"object","additionalProperties":true}},"usage":{"type":"object","required":["creditsReserved","creditsSpent"],"properties":{"creditsReserved":{"type":"number","enum":[0]},"creditsSpent":{"type":"number","enum":[0]}}}}},"safety":{"type":"object","required":["spendsCredits","reservesCredits","executesProviderWork","persistent"],"properties":{"spendsCredits":{"type":"boolean","enum":[false]},"reservesCredits":{"type":"boolean","enum":[false]},"executesProviderWork":{"type":"boolean","enum":[false]},"persistent":{"type":"boolean","enum":[false]},"note":{"type":"string"}}},"nextStep":{"type":"string"}}},"PublicApiArtifactListEnvelope":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/PublicApiArtifactList"},"meta":{"$ref":"#/components/schemas/PublicApiMeta"}}},"PublicApiArtifactList":{"type":"object","required":["job","artifacts","artifactPolicy","usage","safety","nextStep"],"properties":{"job":{"type":"object","required":["id","status","mode","requestId","betaTokenId","updatedAt","statusPath","artifactsPath"],"properties":{"id":{"type":"string","pattern":"^job_preview_[a-f0-9]{8}$"},"status":{"type":"string","enum":["completed_preview"]},"mode":{"type":"string","enum":["dry_run"]},"requestId":{"type":"string"},"betaTokenId":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"statusPath":{"type":"string"},"artifactsPath":{"type":"string"}}},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiArtifact"}},"artifactPolicy":{"type":"object","required":["mode","downloadUrlMode","retention"],"properties":{"mode":{"type":"string","enum":["dry_run_empty"]},"downloadUrlMode":{"type":"string","enum":["not_available_until_live_artifacts"]},"retention":{"type":"string","enum":["none_for_dry_run"]}}},"usage":{"type":"object","required":["creditsReserved","creditsSpent"],"properties":{"creditsReserved":{"type":"number","enum":[0]},"creditsSpent":{"type":"number","enum":[0]}}},"safety":{"type":"object","required":["spendsCredits","reservesCredits","executesProviderWork","exposesUserFiles"],"properties":{"spendsCredits":{"type":"boolean","enum":[false]},"reservesCredits":{"type":"boolean","enum":[false]},"executesProviderWork":{"type":"boolean","enum":[false]},"exposesUserFiles":{"type":"boolean","enum":[false]},"note":{"type":"string"}}},"nextStep":{"type":"string"}}},"PublicApiArtifact":{"type":"object","required":["id","kind","contentType","sizeBytes","downloadUrlPath"],"properties":{"id":{"type":"string"},"kind":{"type":"string"},"contentType":{"type":"string"},"sizeBytes":{"type":"number","nullable":true},"downloadUrlPath":{"type":"string","nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true}}},"PublicApiArtifactDownloadUrlEnvelope":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/PublicApiArtifactDownloadUrl"},"meta":{"$ref":"#/components/schemas/PublicApiMeta"}}},"PublicApiArtifactDownloadUrl":{"type":"object","required":["artifact","download","safety"],"properties":{"artifact":{"$ref":"#/components/schemas/PublicApiArtifact"},"download":{"type":"object","required":["url","expiresAt"],"properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"}}},"safety":{"type":"object","required":["spendsCredits","shortLivedUrl"],"properties":{"spendsCredits":{"type":"boolean","enum":[false]},"shortLivedUrl":{"type":"boolean","enum":[true]}}}}},"PublicApiUsageSummaryEnvelope":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/PublicApiUsageSummary"},"meta":{"$ref":"#/components/schemas/PublicApiMeta"}}},"PublicApiUsageSummary":{"type":"object","required":["usage","safety","nextStep"],"properties":{"usage":{"type":"object","required":["mode","billingMode","betaTokenId","requestId","period","creditsReserved","creditsSpent","jobs","artifacts","generatedAt"],"properties":{"mode":{"type":"string","enum":["dry_run_summary"]},"billingMode":{"type":"string","enum":["not_metered_for_preview"]},"betaTokenId":{"type":"string"},"requestId":{"type":"string"},"period":{"type":"object","required":["start","end","timezone"],"properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"timezone":{"type":"string","enum":["UTC"]}}},"creditsReserved":{"type":"number","enum":[0]},"creditsSpent":{"type":"number","enum":[0]},"jobs":{"type":"object","required":["acceptedPreview","completedPreview","live"],"properties":{"acceptedPreview":{"type":"number","enum":[0]},"completedPreview":{"type":"number","enum":[0]},"live":{"type":"number","enum":[0]}}},"artifacts":{"type":"object","required":["available","downloadable"],"properties":{"available":{"type":"number","enum":[0]},"downloadable":{"type":"number","enum":[0]}}},"generatedAt":{"type":"string","format":"date-time"}}},"safety":{"type":"object","required":["spendsCredits","reservesCredits","meteredBillingEnabled"],"properties":{"spendsCredits":{"type":"boolean","enum":[false]},"reservesCredits":{"type":"boolean","enum":[false]},"meteredBillingEnabled":{"type":"boolean","enum":[false]},"note":{"type":"string"}}},"nextStep":{"type":"string"}}},"PublicApiBillingSimulationEnvelope":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/PublicApiBillingSimulation"},"meta":{"$ref":"#/components/schemas/PublicApiMeta"}}},"PublicApiBillingSimulation":{"type":"object","required":["simulation","safety","nextStep"],"properties":{"simulation":{"type":"object","required":["id","mode","scenario","workflowId","workflowTitle","quoteId","idempotencyKeyHash","requestId","betaTokenId","createdAt","billingSimulationPath","events","outcome"],"properties":{"id":{"type":"string","pattern":"^billing_sim_preview_[a-f0-9]{8}$"},"mode":{"type":"string","enum":["dry_run_billing_simulation"]},"scenario":{"type":"string","enum":["success","provider_failure","user_cancelled"]},"workflowId":{"type":"string","enum":["prproj.subtitle.extract","prproj.xml.inspect","subtitle.translate","tts.standard.generate","youtube.transcript.fetch"]},"workflowTitle":{"type":"string"},"quoteId":{"type":"string"},"idempotencyKeyHash":{"type":"string"},"requestId":{"type":"string"},"betaTokenId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"billingSimulationPath":{"type":"string","enum":["/api/public/v1/billing/simulations"]},"events":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiBillingSimulationEvent"}},"outcome":{"type":"object","required":["finalState","creditsReserved","creditsSpent","creditsReleased","ledgerMutation"],"properties":{"finalState":{"type":"string","enum":["completed_without_charge","released_after_provider_failure_preview","released_after_user_cancelled_preview"]},"creditsReserved":{"type":"number","enum":[0]},"creditsSpent":{"type":"number","enum":[0]},"creditsReleased":{"type":"number","enum":[0]},"ledgerMutation":{"type":"boolean","enum":[false]}}}}},"safety":{"type":"object","required":["spendsCredits","reservesCredits","executesProviderWork","mutatesBillingLedger","persistent","requiresUserConfirmation"],"properties":{"spendsCredits":{"type":"boolean","enum":[false]},"reservesCredits":{"type":"boolean","enum":[false]},"executesProviderWork":{"type":"boolean","enum":[false]},"mutatesBillingLedger":{"type":"boolean","enum":[false]},"persistent":{"type":"boolean","enum":[false]},"requiresUserConfirmation":{"type":"boolean","enum":[true]},"note":{"type":"string"}}},"nextStep":{"type":"string"}}},"PublicApiBillingSimulationEvent":{"type":"object","required":["step","status","invariant"],"properties":{"step":{"type":"string","enum":["quote_validate","reserve","execute","commit","release"]},"status":{"type":"string","enum":["simulated","simulated_noop","simulated_not_run","skipped_preview"]},"creditsReserved":{"type":"number","enum":[0]},"creditsSpent":{"type":"number","enum":[0]},"creditsReleased":{"type":"number","enum":[0]},"providerWorkExecuted":{"type":"boolean","enum":[false]},"invariant":{"type":"string"}}},"PublicApiCheckoutHandoffEnvelope":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/PublicApiCheckoutHandoff"},"meta":{"$ref":"#/components/schemas/PublicApiMeta"}}},"PublicApiCheckoutHandoff":{"type":"object","required":["checkoutHandoff","handoffPolicy","safety","nextStep"],"properties":{"checkoutHandoff":{"type":"object","required":["id","status","mode","planId","planDisplayName","billingCycle","currency","pricePreview","checkoutUrl","returnUrl","pricingUrl","checkoutHandoffPath","requestId","betaTokenId","idempotencyKeyHash","createdAt","expiresAt"],"properties":{"id":{"type":"string","pattern":"^checkout_handoff_preview_[a-f0-9]{8}$"},"status":{"type":"string","enum":["preview_only"]},"mode":{"type":"string","enum":["hosted_checkout_handoff_preview"]},"planId":{"type":"string","enum":["basic","pro","business"]},"planDisplayName":{"type":"string"},"billingCycle":{"type":"string","enum":["monthly","yearly"]},"currency":{"type":"string","enum":["USD"]},"pricePreview":{"type":"object","required":["monthlyPriceUsd","yearlyMonthlyEquivalentPriceUsd","monthlyEquivalentPriceUsd","billingCycleChargeUsd"],"properties":{"monthlyPriceUsd":{"type":"number"},"yearlyMonthlyEquivalentPriceUsd":{"type":"number"},"monthlyEquivalentPriceUsd":{"type":"number"},"billingCycleChargeUsd":{"type":"number"}}},"checkoutUrl":{"type":"string","format":"uri","nullable":true,"description":"Always null for dry-run checkout handoff previews."},"returnUrl":{"type":"string","format":"uri"},"pricingUrl":{"type":"string","format":"uri"},"checkoutHandoffPath":{"type":"string","enum":["/api/public/v1/checkout/handoffs"]},"requestId":{"type":"string"},"betaTokenId":{"type":"string"},"idempotencyKeyHash":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}}},"handoffPolicy":{"type":"object","required":["providerCheckoutRequired","agentMayOpenHostedCheckout","userCompletesPayment","agentMustNotCollectPaymentDetails","liveProviderSessionCreated","liveReturnUrlAllowlistRequired"],"properties":{"providerCheckoutRequired":{"type":"boolean","enum":[true]},"agentMayOpenHostedCheckout":{"type":"boolean","enum":[false]},"userCompletesPayment":{"type":"boolean","enum":[true]},"agentMustNotCollectPaymentDetails":{"type":"boolean","enum":[true]},"liveProviderSessionCreated":{"type":"boolean","enum":[false]},"liveReturnUrlAllowlistRequired":{"type":"boolean","enum":[true]}}},"safety":{"type":"object","required":["chargesCustomer","createsSubscription","collectsCardDetails","mutatesBillingLedger","persistent","requiresUserConfirmation"],"properties":{"chargesCustomer":{"type":"boolean","enum":[false]},"createsSubscription":{"type":"boolean","enum":[false]},"collectsCardDetails":{"type":"boolean","enum":[false]},"mutatesBillingLedger":{"type":"boolean","enum":[false]},"persistent":{"type":"boolean","enum":[false]},"requiresUserConfirmation":{"type":"boolean","enum":[true]},"note":{"type":"string"}}},"nextStep":{"type":"string"}}},"PublicApiCapabilities":{"type":"object","required":["version","status","basePath","operations","workflows"],"properties":{"version":{"type":"string","enum":["v1"]},"status":{"type":"string","enum":["controlled_beta"]},"availability":{"type":"string"},"openApiPath":{"type":"string"},"docsPath":{"type":"string"},"basePath":{"type":"string","enum":["/api/public/v1"]},"operations":{"type":"array","items":{"$ref":"#/components/schemas/PublicApiOperation"}},"workflows":{"type":"array","items":{"$ref":"#/components/schemas/PublicWorkflowCapability"}}}},"PublicApiOperation":{"type":"object","required":["id","method","path","availability","spendsCredits"],"properties":{"id":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"},"availability":{"type":"string"},"spendsCredits":{"type":"boolean"},"requiresConfirmation":{"type":"boolean"},"liveExecutionStatus":{"type":"string","enum":["not_enabled"]}}},"PublicWorkflowCapability":{"type":"object","required":["id","title","status","userPath","agentUse","publicApi"],"properties":{"id":{"type":"string","enum":["prproj.subtitle.extract","prproj.xml.inspect","subtitle.translate","tts.standard.generate","youtube.transcript.fetch"]},"title":{"type":"string"},"status":{"type":"string"},"userPath":{"type":"string"},"agentUse":{"type":"string"},"publicApi":{"type":"object","required":["quotePath","jobCreatePath","jobStatusPathTemplate","jobArtifactsPathTemplate","artifactDownloadUrlPathTemplate","billingSimulationPath","checkoutHandoffPath"],"properties":{"quotePath":{"type":"string","enum":["/api/public/v1/quotes"]},"jobCreatePath":{"type":"string","enum":["/api/public/v1/jobs"]},"jobStatusPathTemplate":{"type":"string","enum":["/api/public/v1/jobs/{jobId}"]},"jobArtifactsPathTemplate":{"type":"string","enum":["/api/public/v1/jobs/{jobId}/artifacts"]},"artifactDownloadUrlPathTemplate":{"type":"string","enum":["/api/public/v1/jobs/{jobId}/artifacts/{artifactId}/download-url"]},"billingSimulationPath":{"type":"string","enum":["/api/public/v1/billing/simulations"]},"checkoutHandoffPath":{"type":"string","enum":["/api/public/v1/checkout/handoffs"]}}}}},"QuoteWorkflowRequest":{"type":"object","required":["workflowId"],"additionalProperties":false,"properties":{"workflowId":{"type":"string","enum":["prproj.subtitle.extract","prproj.xml.inspect","subtitle.translate","tts.standard.generate","youtube.transcript.fetch"]},"units":{"type":"number","minimum":0},"input":{"type":"object","additionalProperties":true}}},"CreateWorkflowJobRequest":{"type":"object","required":["workflowId","quoteId","idempotencyKey","confirmation"],"additionalProperties":false,"properties":{"workflowId":{"type":"string","enum":["prproj.subtitle.extract","prproj.xml.inspect","subtitle.translate","tts.standard.generate","youtube.transcript.fetch"]},"quoteId":{"type":"string","minLength":8,"maxLength":160,"pattern":"^(?:quote_preview_[a-f0-9]{8}|[A-Za-z0-9._:-]{8,160})$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]{8,128}$"},"input":{"type":"object","additionalProperties":true},"confirmation":{"type":"object","required":["quoteAccepted","userConfirmed"],"properties":{"quoteAccepted":{"type":"boolean","enum":[true]},"userConfirmed":{"type":"boolean","enum":[true]}}}}},"SimulateBillingLifecycleRequest":{"type":"object","required":["workflowId","quoteId","idempotencyKey","confirmation"],"additionalProperties":false,"properties":{"workflowId":{"type":"string","enum":["prproj.subtitle.extract","prproj.xml.inspect","subtitle.translate","tts.standard.generate","youtube.transcript.fetch"]},"quoteId":{"type":"string","minLength":8,"maxLength":160,"pattern":"^(?:quote_preview_[a-f0-9]{8}|[A-Za-z0-9._:-]{8,160})$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]{8,128}$"},"scenario":{"type":"string","enum":["success","provider_failure","user_cancelled"],"default":"success"},"confirmation":{"type":"object","required":["quoteAccepted","userConfirmed","billingSimulationAccepted"],"properties":{"quoteAccepted":{"type":"boolean","enum":[true]},"userConfirmed":{"type":"boolean","enum":[true]},"billingSimulationAccepted":{"type":"boolean","enum":[true]}}}}},"CreateCheckoutHandoffRequest":{"type":"object","required":["planId","idempotencyKey","confirmation"],"additionalProperties":false,"properties":{"planId":{"type":"string","enum":["basic","pro","business"]},"billingCycle":{"type":"string","enum":["monthly","yearly"],"default":"monthly"},"returnUrl":{"type":"string","format":"uri","maxLength":2048,"description":"Optional client return URL. Live checkout will require allowlisting before provider sessions are enabled."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]{8,128}$"},"confirmation":{"type":"object","required":["planReviewed","userConfirmed","hostedCheckoutAccepted"],"properties":{"planReviewed":{"type":"boolean","enum":[true]},"userConfirmed":{"type":"boolean","enum":[true]},"hostedCheckoutAccepted":{"type":"boolean","enum":[true]}}}}},"PublicApiErrorEnvelope":{"type":"object","required":["success","error","meta"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_JSON","REQUEST_BODY_TOO_LARGE","VALIDATION_ERROR","INVALID_JOB_ID","INVALID_ARTIFACT_ID","PUBLIC_API_BETA_ACCESS_REQUIRED","PUBLIC_API_JOB_NOT_FOUND","PUBLIC_API_ARTIFACT_NOT_FOUND"]},"message":{"type":"string"},"details":{"type":"object","nullable":true,"additionalProperties":true}}},"meta":{"$ref":"#/components/schemas/PublicApiMeta"}}}}},"security":[{"VietlsApiKey":[]}]}