{"openapi":"3.1.0","info":{"title":"VideoLab API","version":"0.7.0","description":"Shared image/video catalog, schema-specific parameters, fixed or usage-based estimates, durable generation and private media. Local owner tests use provider balance with billingMode=LOCAL_PROVIDER_TEST; this exemption is disabled in production. Public catalog metadata is distinct from account estimate evidence or completed generation. Standalone voice is not integrated. Auth.js endpoints use /api/auth."},"components":{"securitySchemes":{"webSession":{"type":"apiKey","in":"cookie","name":"authjs.session-token","description":"Revocable Auth.js database session. HTTPS uses __Secure-authjs.session-token. Cookie-authenticated writes require same-origin Origin."}}},"paths":{"/api/v1/social/{kind}/{id}":{"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["template","creation"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"getMediaSocial","security":[],"description":"Public like/comment counts and the current session's like/save state. Only enabled templates and opted-in completed creations from active authors. Save lists and user identities are not exposed.","responses":{"200":{"description":"Social summary","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"likes":{"type":"integer","minimum":0,"maximum":9007199254740991},"comments":{"type":"integer","minimum":0,"maximum":9007199254740991},"liked":{"type":"boolean"},"saved":{"type":"boolean"},"signedIn":{"type":"boolean"}},"required":["likes","comments","liked","saved","signedIn"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"404":{"description":"Target unavailable","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}},"patch":{"operationId":"setMediaReaction","security":[{"webSession":[]}],"description":"Set LIKE or SAVE explicitly on/off. Idempotent, session-owned, same-origin; 60/minute/user.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["LIKE","SAVE"]},"active":{"type":"boolean"}},"required":["kind","active"],"additionalProperties":false}}}},"responses":{"200":{"description":"Reaction saved","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"likes":{"type":"integer","minimum":0,"maximum":9007199254740991},"comments":{"type":"integer","minimum":0,"maximum":9007199254740991},"liked":{"type":"boolean"},"saved":{"type":"boolean"},"signedIn":{"type":"boolean"}},"required":["likes","comments","liked","saved","signedIn"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid fields","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Active session required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Origin rejected","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"404":{"description":"Target unavailable or action not owned","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limited","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/social/{kind}/{id}/comments":{"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["template","creation"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"listMediaComments","security":[],"description":"20 comments per page, newest first; optional UUID cursor. Deleted comments and suspended authors excluded. Returns only public author fields, no email or private generation data.","responses":{"200":{"description":"Comments","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"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)$"},"body":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"author":{"type":"object","properties":{"id":{"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)$"},"name":{"type":["string","null"]},"username":{"type":["string","null"]},"image":{"type":["string","null"]}},"required":["id","name","username","image"],"additionalProperties":false},"canDelete":{"type":"boolean"}},"required":["id","body","createdAt","author","canDelete"],"additionalProperties":false}},"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"}]}},"required":["items","nextCursor"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"404":{"description":"Target or cursor unavailable","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}},"post":{"operationId":"addMediaComment","security":[{"webSession":[]}],"description":"Plain text, 1-1000 trimmed characters; 10/minute/user. Client UUID makes identical retries idempotent. Reusing an ID with different text/author/target or after deletion returns 409. Same-origin session required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"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)$"},"body":{"type":"string","minLength":1,"maxLength":1000}},"required":["id","body"],"additionalProperties":false}}}},"responses":{"200":{"description":"Comment saved","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"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)$"},"body":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"author":{"type":"object","properties":{"id":{"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)$"},"name":{"type":["string","null"]},"username":{"type":["string","null"]},"image":{"type":["string","null"]}},"required":["id","name","username","image"],"additionalProperties":false},"canDelete":{"type":"boolean"}},"required":["id","body","createdAt","author","canDelete"],"additionalProperties":false},"summary":{"type":"object","properties":{"likes":{"type":"integer","minimum":0,"maximum":9007199254740991},"comments":{"type":"integer","minimum":0,"maximum":9007199254740991},"liked":{"type":"boolean"},"saved":{"type":"boolean"},"signedIn":{"type":"boolean"}},"required":["likes","comments","liked","saved","signedIn"],"additionalProperties":false}},"required":["comment","summary"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid fields","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Active session required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Origin rejected","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"404":{"description":"Target unavailable or action not owned","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"409":{"description":"Comment identity conflict","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limited","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/social/{kind}/{id}/comments/{commentId}":{"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["template","creation"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"delete":{"operationId":"deleteMediaComment","security":[{"webSession":[]}],"description":"Author or active staff may remove a comment, 30/minute/user, same-origin. Tombstone prevents retries from restoring deleted comments.","responses":{"200":{"description":"Comment removed","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"likes":{"type":"integer","minimum":0,"maximum":9007199254740991},"comments":{"type":"integer","minimum":0,"maximum":9007199254740991},"liked":{"type":"boolean"},"saved":{"type":"boolean"},"signedIn":{"type":"boolean"}},"required":["likes","comments","liked","saved","signedIn"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid fields","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Active session required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Origin rejected","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"404":{"description":"Target unavailable or action not owned","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limited","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/me/activity":{"get":{"operationId":"listMyMediaActivity","security":[{"webSession":[]}],"description":"Current session's saved or liked work only; tab=saved|liked, optional opaque keyset cursor, 20/page. Disabled templates, unpublished/private creations and inactive authors are excluded on every read.","parameters":[{"name":"tab","in":"query","schema":{"type":"string","enum":["saved","liked"],"default":"saved"}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Owned activity","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"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)$"},"kind":{"type":"string","enum":["template","creation"]},"targetId":{"type":"string"},"title":{"type":"string"},"href":{"type":"string","format":"starts_with","pattern":"^\\/.*"},"modality":{"type":"string","enum":["image","video"]},"mediaUrl":{"type":"string","format":"starts_with","pattern":"^\\/.*"},"posterUrl":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^\\/.*"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","targetId","title","href","modality","mediaUrl","posterUrl","createdAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid tab or cursor","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/users/{userId}/follow":{"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getFollowSummary","security":[],"description":"Active-account follower/following counts and the current session's relationship. No personal details or private creations. Suspended accounts are excluded from counts.","responses":{"200":{"description":"Follow summary","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"followers":{"type":"integer","minimum":0,"maximum":9007199254740991},"following":{"type":"integer","minimum":0,"maximum":9007199254740991},"isFollowing":{"type":"boolean"},"isSelf":{"type":"boolean"}},"required":["followers","following","isFollowing","isSelf"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"404":{"description":"Account not found","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}},"put":{"operationId":"followUser","security":[{"webSession":[]}],"description":"Follow another active account. Same-origin required; 60 changes/minute/user. Idempotent, no self-follow, caller identity always comes from the session.","responses":{"200":{"description":"Following","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"followers":{"type":"integer","minimum":0,"maximum":9007199254740991},"following":{"type":"integer","minimum":0,"maximum":9007199254740991},"isFollowing":{"type":"boolean"},"isSelf":{"type":"boolean"}},"required":["followers","following","isFollowing","isSelf"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Self-follow rejected","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Origin rejected","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"404":{"description":"Account not found","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limited","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}},"delete":{"operationId":"unfollowUser","security":[{"webSession":[]}],"description":"Unfollow another active account. Same-origin and rate limit as follow. Repeating an unfollow succeeds without changing another user's relationships.","responses":{"200":{"description":"Not following","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"followers":{"type":"integer","minimum":0,"maximum":9007199254740991},"following":{"type":"integer","minimum":0,"maximum":9007199254740991},"isFollowing":{"type":"boolean"},"isSelf":{"type":"boolean"}},"required":["followers","following","isFollowing","isSelf"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Self-follow rejected","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Origin rejected","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"404":{"description":"Account not found","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limited","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/generations/{id}/visibility":{"patch":{"operationId":"setGenerationVisibility","security":[{"webSession":[]}],"description":"Active owner and same-origin only, 30 changes/minute. Opt in or out per completed image/video. Private by default. Publishing exposes the output and creator's public name, username and photo, without prompt, input uploads, email or billing. Repeating the same value preserves publication ordering.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"isPublic":{"type":"boolean"}},"required":["isPublic"],"additionalProperties":false}}}},"responses":{"200":{"description":"Visibility saved","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"isPublic":{"type":"boolean"},"publicUrl":{"type":["string","null"]}},"required":["isPublic","publicUrl"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid input or output not ready","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Origin rejected","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"404":{"description":"Not found or not owned","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limited","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/publications":{"get":{"operationId":"listPublicCreations","security":[],"description":"Newest opted-in completed images/videos from active accounts, 40 per page. Private outputs are excluded. Optional author filter uses a public creator UUID.","parameters":[{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"author","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Public creation feed","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"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)$"},"modality":{"type":"string","enum":["image","video"]},"modelName":{"type":"string"},"mediaUrl":{"type":"string","format":"starts_with","pattern":"^\\/api\\/v1\\/publications\\/.*"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"durationSeconds":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"publishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"author":{"type":"object","properties":{"id":{"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)$"},"name":{"type":["string","null"]},"username":{"type":["string","null"]},"image":{"type":["string","null"]}},"required":["id","name","username","image"],"additionalProperties":false}},"required":["id","modality","modelName","mediaUrl","width","height","durationSeconds","publishedAt","author"],"additionalProperties":false}},"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"}]}},"required":["items","nextCursor"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"404":{"description":"Invalid filter","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/publications/{id}":{"get":{"operationId":"getPublicCreation","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Public output metadata and author","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"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)$"},"modality":{"type":"string","enum":["image","video"]},"modelName":{"type":"string"},"mediaUrl":{"type":"string","format":"starts_with","pattern":"^\\/api\\/v1\\/publications\\/.*"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"durationSeconds":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"publishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"author":{"type":"object","properties":{"id":{"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)$"},"name":{"type":["string","null"]},"username":{"type":["string","null"]},"image":{"type":["string","null"]}},"required":["id","name","username","image"],"additionalProperties":false}},"required":["id","modality","modelName","mediaUrl","width","height","durationSeconds","publishedAt","author"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"404":{"description":"Not public or unavailable","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/publications/{id}/media":{"get":{"operationId":"readPublicCreationMedia","security":[],"description":"Rechecks opt-in and active author on every request. Streams only the stored generation output, with no-store caching and single byte ranges for video. preview=1 returns a bounded 640x960 WebP image preview with visibility checked on every request. Does not reveal a storage key or reusable signed private URL. Unpublished or unavailable media returns 404.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"preview","in":"query","schema":{"type":"string","enum":["1"]},"description":"Return a small WebP preview for a published image."},{"name":"Range","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Public image or video bytes"},"206":{"description":"Requested byte range"},"404":{"description":"Not public or unavailable","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"416":{"description":"Unsatisfiable range"}}}},"/api/v1/me/photo":{"put":{"operationId":"uploadProfilePhoto","security":[{"webSession":[]}],"description":"Active owner and same-origin only; 10 changes/minute. Raw JPG, PNG or WebP, up to 5 MiB. Decoded with a pixel bound, metadata stripped and cropped to 512×512 WebP. Saved independently of generation inputs and outputs. Replaces only the caller's public profile photo.","requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Public avatar URL saved","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"image":{"type":["string","null"]}},"required":["image"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid image","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Origin rejected","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"409":{"description":"Concurrent profile change","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limited","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"503":{"description":"Storage unavailable","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}},"delete":{"operationId":"removeProfilePhoto","security":[{"webSession":[]}],"description":"Active owner and same-origin only. Clears the caller's profile photo; previous public URLs stop resolving. Does not delete generation media.","responses":{"200":{"description":"Avatar removed","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"image":{"type":["string","null"]}},"required":["image"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Origin rejected","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"409":{"description":"Concurrent profile change","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/users/{userId}/photo/{version}":{"get":{"operationId":"readPublicProfilePhoto","security":[],"description":"Public read of the active user's current normalized avatar only. Validated versioned URL; replaced, removed, suspended or invalid profiles return 404. No arbitrary storage keys or external URL fetching.","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Normalized 512×512 avatar","content":{"image/webp":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Photo unavailable","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/me/onboarding":{"get":{"operationId":"getOnboarding","security":[{"webSession":[]}],"description":"Owned first-registration guide progress. Existing accounts and staff start with DONE.","responses":{"200":{"description":"Owned guide progress","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"userId":{"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)$"},"step":{"type":"string","enum":["WELCOME","SELECT_VIDEO","RECREATE","UPLOAD_IMAGE","EDIT_PROMPT","CHECK_PRICE","FINISH","DONE"]},"templateId":{"anyOf":[{"type":"string","pattern":"^[a-z0-9-]{3,80}$"},{"type":"null"}]}},"required":["userId","step","templateId"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}},"post":{"operationId":"updateOnboarding","security":[{"webSession":[]}],"description":"Same-origin active USER only. Advance with expectedStep, recover a lost image selection, dismiss, or restart. Duplicate advances are serialized. Changes tutorial metadata only; never submits generation or reserves funds.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"advance"},"expectedStep":{"type":"string","enum":["WELCOME","SELECT_VIDEO","RECREATE","UPLOAD_IMAGE","EDIT_PROMPT","CHECK_PRICE","FINISH","DONE"]},"templateId":{"type":"string","pattern":"^[a-z0-9-]{3,80}$"}},"required":["action","expectedStep"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"image_required"},"expectedStep":{"type":"string","enum":["WELCOME","SELECT_VIDEO","RECREATE","UPLOAD_IMAGE","EDIT_PROMPT","CHECK_PRICE","FINISH","DONE"]}},"required":["action","expectedStep"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"dismiss"}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"restart"}},"required":["action"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Saved guide progress","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"userId":{"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)$"},"step":{"type":"string","enum":["WELCOME","SELECT_VIDEO","RECREATE","UPLOAD_IMAGE","EDIT_PROMPT","CHECK_PRICE","FINISH","DONE"]},"templateId":{"anyOf":[{"type":"string","pattern":"^[a-z0-9-]{3,80}$"},{"type":"null"}]}},"required":["userId","step","templateId"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid command","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Role or origin rejected","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"404":{"description":"Sample unavailable","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limited","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/exchange-rates/usd-uzs":{"get":{"operationId":"getUsdUzsRate","summary":"Official CBU USD-to-UZS display conversion rate and effective date","security":[],"responses":{"200":{"description":"Validated official rate; cached upstream for one hour","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"base":{"type":"string","const":"USD"},"currency":{"type":"string","const":"UZS"},"rate":{"type":"string","maxLength":32,"pattern":"^\\d+(?:\\.\\d+)?$"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"source":{"type":"string","const":"CBU"}},"required":["base","currency","rate","date","source"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"503":{"description":"A current official exchange rate could not be loaded","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/auth/password/login":{"post":{"operationId":"passwordLogin","security":[],"description":"Same-origin username/password login with global/IP/username limits and bounded hashing. Three incorrect attempts block IP and signed browser-device cookie for 300 seconds, including correct passwords. Parallel guesses serialize in PostgreSQL. 429 LOGIN_LOCKED includes Retry-After and error.retryAfterSeconds; blocked requests do not extend the deadline. AUTH_CLIENT_IP_HEADER requires an ingress-overwritten single IP; unset/unverified IPs share a safe bucket. Issues the normal revocable HttpOnly Auth.js session cookie. Unknown, wrong and suspended accounts return the same safe error. No password/hash/token in JSON.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"username":{"type":"string","pattern":"^[a-z][a-z0-9_]{2,31}$"},"password":{"type":"string","minLength":1,"maxLength":128}},"required":["username","password"],"additionalProperties":false}}}},"responses":{"200":{"description":"Signed in; role-specific destination","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"destination":{"type":"string","enum":["/","/admin","/account"]}},"required":["destination"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid fields","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Invalid credentials","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Origin rejected","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limited","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"503":{"description":"Authentication disabled or busy","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/auth/password/register":{"post":{"operationId":"passwordRegister","security":[],"description":"Same-origin username/password registration. Always USER, no email required and no automatic account merges. Username lowercased, 3–32 ASCII characters; password 8–128 characters, preserved exactly. Creates a revocable database session.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"username":{"type":"string","pattern":"^[a-z][a-z0-9_]{2,31}$"},"name":{"type":"string","minLength":1,"maxLength":100},"password":{"type":"string","minLength":8,"maxLength":128}},"required":["username","password"],"additionalProperties":false}}}},"responses":{"200":{"description":"Account created and signed in","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"destination":{"type":"string","enum":["/","/admin","/account"]}},"required":["destination"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid fields or privilege injection","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Origin rejected","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"409":{"description":"Username unavailable","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limited","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"503":{"description":"Authentication disabled or busy","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/me/password":{"post":{"operationId":"updatePassword","security":[{"webSession":[]}],"description":"Same-origin active account only. Add username/password access or update it. Existing credentials require currentPassword. Adding first password access requires a session authenticated within the past 10 minutes; legacy/stale sessions receive 403 REAUTHENTICATION_REQUIRED. Locks and rechecks user/credential, revokes all sessions, sets a fresh session cookie and records a credential-free audit entry.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"username":{"type":"string","pattern":"^[a-z][a-z0-9_]{2,31}$"},"password":{"type":"string","minLength":8,"maxLength":128},"currentPassword":{"type":"string","maxLength":128}},"required":["username","password"],"additionalProperties":false}}}},"responses":{"200":{"description":"Credentials saved, current browser signed in","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"destination":{"type":"string","enum":["/","/admin","/account"]}},"required":["destination"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid fields","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Session or current password invalid","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Origin rejected","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"409":{"description":"Username unavailable","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limited","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/admin":{"get":{"operationId":"getAdminData","security":[{"webSession":[]}],"description":"Active ADMIN or SUBADMIN; live database role checked. Response includes allowed sections/actions. Subadmins can read overview, users, generations, models and templates, with finance redacted. Credits/system/audit and overview finance require ADMIN. Finance shows dated manual API billing observations, commitments, receipts and earned profit; unknown values remain null. Optional page (20 records), search (100 characters), status and role (ALL/USER/SUBADMIN/ADMIN). No password hashes, session tokens or provider credentials returned.","responses":{"200":{"description":"Role-scoped administration data","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"access":{"type":"object","properties":{"role":{"type":"string","enum":["ADMIN","SUBADMIN"]},"sections":{"type":"array","items":{"type":"string","enum":["overview","users","generations","credits","models","templates","system","audit"]}},"actions":{"type":"array","items":{"type":"string","enum":["user.role","user.status","user.sessions","credits.adjust","balance.adjust","finance.snapshot","model.enabled","generation.enabled","template.update","generation.resume"]}}},"required":["role","sections","actions"],"additionalProperties":false},"monetary":{"type":"boolean"},"finance":{"type":"object","properties":{"snapshot":{"anyOf":[{"type":"object","properties":{"id":{"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)$"},"providerBalanceUsd":{"type":"string"},"totalTiyin":{"type":"string","pattern":"^-?\\d{1,16}$"},"confirmedTotalTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"trackedSpendTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"usdUzsRate":{"type":"string"},"rateDate":{"type":"string"},"observedAt":{"type":"string"},"reference":{"type":"string"},"apiCostTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"operatingCostTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"earnedTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"netProfitTiyin":{"type":"string","pattern":"^-?\\d{1,16}$"},"source":{"type":"string","const":"MANUAL_BILLING"}},"required":["id","providerBalanceUsd","totalTiyin","confirmedTotalTiyin","trackedSpendTiyin","usdUzsRate","rateDate","observedAt","reference","apiCostTiyin","operatingCostTiyin","earnedTiyin","netProfitTiyin","source"],"additionalProperties":false},{"type":"null"}]},"usersAvailableTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"usersReservedTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"allocatedTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"unallocatedTiyin":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,16}$"},{"type":"null"}]},"paymentsReceivedTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"earnedTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"apiCostTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"netProfitTiyin":{"type":"string","pattern":"^-?\\d{1,16}$"},"needsReconciliation":{"type":"boolean"}},"required":["snapshot","usersAvailableTiyin","usersReservedTiyin","allocatedTiyin","unallocatedTiyin","paymentsReceivedTiyin","earnedTiyin","apiCostTiyin","netProfitTiyin","needsReconciliation"],"additionalProperties":false},"walletTransactions":{"type":"array","items":{"type":"object","properties":{"id":{"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)$"},"user":{"type":"object","properties":{"id":{"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)$"},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id","name","email"],"additionalProperties":false},"amountTiyin":{"type":"string","pattern":"^-?\\d{1,16}$"},"kind":{"type":"string"},"paymentReference":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","user","amountTiyin","kind","paymentReference","createdAt"],"additionalProperties":false}},"section":{"type":"string","enum":["overview","users","generations","credits","models","templates","system","audit"]},"pagination":{"type":"object","properties":{"page":{"type":"number"},"total":{"type":"number"},"pageSize":{"type":"number"}},"required":["page","total","pageSize"],"additionalProperties":false},"overview":{"type":"object","properties":{"users":{"type":"number"},"activeUsers":{"type":"number"},"suspendedUsers":{"type":"number"},"newUsers":{"type":"number"},"generations":{"type":"number"},"queued":{"type":"number"},"processing":{"type":"number"},"succeeded":{"type":"number"},"failed":{"type":"number"},"held":{"type":"number"},"walletBalanceTiyin":{"anyOf":[{"type":"string","pattern":"^\\d{1,16}$"},{"type":"null"}]},"spentTiyin":{"anyOf":[{"type":"string","pattern":"^\\d{1,16}$"},{"type":"null"}]},"walletCredits":{"type":["number","null"]},"spentCredits":{"type":["number","null"]},"assets":{"type":"number"},"storageBytes":{"type":"number"},"daily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"users":{"type":"number"},"generations":{"type":"number"},"succeeded":{"type":"number"},"failed":{"type":"number"}},"required":["date","users","generations","succeeded","failed"],"additionalProperties":false}},"topModels":{"type":"array","items":{"type":"object","properties":{"modelId":{"type":"string"},"count":{"type":"number"}},"required":["modelId","count"],"additionalProperties":false}}},"required":["users","activeUsers","suspendedUsers","newUsers","generations","queued","processing","succeeded","failed","held","walletCredits","spentCredits","assets","storageBytes","daily","topModels"],"additionalProperties":false},"users":{"type":"array","items":{"type":"object","properties":{"id":{"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)$"},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"username":{"type":["string","null"]},"role":{"type":"string"},"status":{"type":"string"},"balanceTiyin":{"anyOf":[{"type":"string","pattern":"^\\d{1,16}$"},{"type":"null"}]},"balance":{"type":["number","null"]},"generations":{"type":"number"},"assets":{"type":"number"},"sessions":{"type":"number"},"providers":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"}},"required":["id","name","email","username","role","status","balance","generations","assets","sessions","providers","createdAt"],"additionalProperties":false}},"generations":{"type":"array","items":{"type":"object","properties":{"id":{"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)$"},"assetId":{"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"}]},"user":{"type":"object","properties":{"id":{"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)$"},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id","name","email"],"additionalProperties":false},"modelId":{"type":"string"},"modality":{"type":"string"},"status":{"type":"string"},"prompt":{"type":"string"},"reservedTiyin":{"anyOf":[{"type":"string","pattern":"^\\d{1,16}$"},{"type":"null"}]},"finalTiyin":{"anyOf":[{"type":"string","pattern":"^\\d{1,16}$"},{"type":"null"}]},"reservedCredits":{"type":["number","null"]},"finalCredits":{"type":["number","null"]},"billingMode":{"type":"string"},"safeErrorCode":{"type":["string","null"]},"attempts":{"type":"number"},"canResume":{"type":"boolean"},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","assetId","user","modelId","modality","status","prompt","reservedCredits","finalCredits","billingMode","safeErrorCode","attempts","canResume","createdAt","completedAt"],"additionalProperties":false}},"credits":{"type":"array","items":{"type":"object","properties":{"id":{"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)$"},"user":{"type":"object","properties":{"id":{"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)$"},"name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id","name","email"],"additionalProperties":false},"amount":{"type":"number"},"kind":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","user","amount","kind","createdAt"],"additionalProperties":false}},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"family":{"type":"string"},"modality":{"type":"string"},"enabled":{"type":"boolean"},"generations":{"type":"number"}},"required":["id","name","family","modality","enabled","generations"],"additionalProperties":false}},"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"prompt":{"type":"string"},"category":{"type":"string"},"enabled":{"type":"boolean"},"generations":{"type":"number"}},"required":["id","name","description","prompt","category","enabled","generations"],"additionalProperties":false}},"system":{"type":"object","properties":{"generationEnabled":{"type":"boolean"},"authConfigured":{"type":"boolean"},"providerConfigured":{"type":"boolean"},"storageConfigured":{"type":"boolean"},"workerOnline":{"type":"boolean"},"workerUpdatedAt":{"type":["string","null"]},"database":{"type":"boolean","const":true}},"required":["generationEnabled","authConfigured","providerConfigured","storageConfigured","workerOnline","workerUpdatedAt","database"],"additionalProperties":false},"audit":{"type":"array","items":{"type":"object","properties":{"id":{"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)$"},"action":{"type":"string"},"targetId":{"type":"string"},"source":{"type":"string"},"metadata":{},"createdAt":{"type":"string"}},"required":["id","action","targetId","source","metadata","createdAt"],"additionalProperties":false}}},"required":["access","section"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Staff role or section permission required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}},"post":{"operationId":"executeAdminCommand","security":[{"webSession":[]}],"description":"Same-origin active staff only, with a session authenticated within the past 10 minutes (403 REAUTHENTICATION_REQUIRED otherwise); role/capability rechecked and locked in the write transaction. SUBADMIN can moderate USER accounts, edit templates and reconcile held jobs; it cannot affect staff, finance, model switches, platform controls or roles. ADMIN can appoint/demote SUBADMIN with user.role, expectedRole, and a reason; all target sessions are revoked. Required reason and audit log. Credit adjustments require an idempotent operationId and cannot make a balance negative. UZS top-ups additionally require current sufficient confirmed platform capacity. finance.snapshot is ADMIN-only, accepts only the current provider USD balance, expectedSnapshotId and an idempotent operationId; it uses server CBU rates and audits the observation. App quote costs, allocations and earned markup are derived automatically; it never calls a provider payment operation. Cannot create another super admin or suspend/demote the super admin. Model/platform controls affect new requests only. Resume is restricted to held, unleased jobs and preserves provider identity.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"finance.snapshot"},"providerBalanceUsd":{"type":"string","pattern":"^\\d{1,12}(?:\\.\\d{1,6})?$"},"expectedSnapshotId":{"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"}]},"operationId":{"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":["action","providerBalanceUsd","expectedSnapshotId","operationId"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"user.role"},"userId":{"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)$"},"role":{"type":"string","enum":["USER","SUBADMIN"]},"expectedRole":{"type":"string","enum":["USER","SUBADMIN"]},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["action","userId","role","expectedRole","reason"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"user.status"},"userId":{"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)$"},"status":{"type":"string","enum":["ACTIVE","SUSPENDED"]},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["action","userId","status","reason"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"user.sessions"},"userId":{"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)$"},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["action","userId","reason"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"balance.adjust"},"userId":{"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)$"},"amountUzs":{"type":"string","pattern":"^-?\\d{1,13}(?:\\.\\d{1,2})?$"},"paymentReference":{"type":"string","minLength":3,"maxLength":180},"operationId":{"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)$"},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["action","userId","amountUzs","operationId","reason"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"credits.adjust"},"userId":{"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)$"},"amount":{"type":"integer","minimum":-1000000,"maximum":1000000},"operationId":{"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)$"},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["action","userId","amount","operationId","reason"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"model.enabled"},"modelId":{"type":"string","minLength":1,"maxLength":200},"enabled":{"type":"boolean"},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["action","modelId","enabled","reason"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"generation.enabled"},"enabled":{"type":"boolean"},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["action","enabled","reason"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"template.update"},"templateId":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":150},"description":{"type":"string","maxLength":2000},"prompt":{"type":"string","minLength":1,"maxLength":6000},"category":{"type":"string","minLength":1,"maxLength":100},"enabled":{"type":"boolean"},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["action","templateId","name","description","prompt","category","enabled","reason"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"generation.resume"},"generationId":{"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)$"},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["action","generationId","reason"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Audited change saved","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid command","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"402":{"description":"Adjustment would make balance negative","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Super admin or same origin required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"409":{"description":"Conflicting operation, stale billing report or insufficient platform capacity","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limited","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/admin/assets/{id}":{"get":{"operationId":"inspectAdminAsset","security":[{"webSession":[]}],"description":"Active ADMIN or SUBADMIN with generation-inspection access. Inspect an output belonging to any account. Development local files are served privately with byte-range support; R2 objects redirect to a 120-second signed preview URL. No provider URLs or credentials.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Local output bytes"},"206":{"description":"Byte range"},"302":{"description":"Short-lived signed object preview"},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Super admin required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"404":{"description":"Output not found","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/auth/telegram/start":{"post":{"operationId":"startTelegramLogin","security":[],"description":"Same-origin browser POST. Creates a5-minute HttpOnly browser-bound challenge. intent=link requires an active web session; intent=login rejects an already signed-in browser. Verified dedicated bot required. Rate limits perstart/complete:300/minute globally,30/5minutes/IP signal and10/5minutes/browser challenge. No bot messages sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"intent":{"type":"string","enum":["login","link"]}},"required":["intent"],"additionalProperties":false}}}},"responses":{"200":{"description":"Challenge identity and public bot ID; secret delivered only in HttpOnly cookie","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"challengeId":{"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)$"},"botId":{"type":"string","pattern":"^[1-9]\\d{0,19}$"}},"required":["challengeId","botId"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid input","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Link requires a session","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Origin or intent rejected","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limited","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"503":{"description":"Telegram unavailable","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/auth/telegram/complete":{"post":{"operationId":"completeTelegramLogin","security":[],"description":"Same-origin POST with challenge cookie and Telegram's signed legacy-widget payload. HMAC and5-minute freshness checked, signature/challenge atomically single-use. Links require the same active session as start, authenticated within the past 10 minutes at both steps (403 REAUTHENTICATION_REQUIRED otherwise). Login issues the same7-day revocable Auth.js session; no session token in JSON. No automatic account merges, email addresses or credit grants.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"challengeId":{"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)$"},"authData":{"type":"object","properties":{"id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^[1-9]\\d{0,19}$"}]},"first_name":{"type":"string","minLength":1,"maxLength":256},"last_name":{"type":"string","maxLength":256},"username":{"type":"string","maxLength":64},"photo_url":{"type":"string","maxLength":2048},"auth_date":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d{10}$"}]},"hash":{"type":"string","pattern":"^[a-fA-F0-9]{64}$"}},"required":["id","first_name","auth_date","hash"],"additionalProperties":false}},"required":["challengeId","authData"],"additionalProperties":false}}}},"responses":{"200":{"description":"Authenticated or linked; fresh browser navigation may now load account","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"linked":{"type":"boolean"},"firstRegistration":{"type":"boolean"}},"required":["linked"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid input","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Invalid, expired, replayed or unbound approval","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Origin or intent rejected","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"409":{"description":"Telegram belongs to another account","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limited","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"503":{"description":"Telegram unavailable","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/explore":{"get":{"operationId":"listExplore","security":[],"description":"Up to60 reviewed original motion templates, newest first. Editorial collection, not a provider trending ranking. Excludes provider staging URLs and private user work.","responses":{"200":{"description":"Public reviewed motion collection","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9-]{3,80}$"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["Cinematic","Editorial","Abstract"]},"videoUrl":{"type":"string","format":"starts_with","pattern":"^\\/explore\\/.*"},"posterUrl":{"type":"string","format":"starts_with","pattern":"^\\/explore\\/.*"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"durationSeconds":{"type":"number","minimum":4,"maximum":30},"modelName":{"type":"string"},"recentRecreations":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"prompt":{"default":"Use the subject from my reference image in the source video. Preserve the subject's identity, the reference motion, camera movement, composition and timing. Keep unrelated elements unchanged.","type":"string","minLength":1,"maxLength":8000}},"required":["id","name","description","category","videoUrl","posterUrl","width","height","durationSeconds","modelName","recentRecreations","prompt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}}}}},"/api/v1/uploads":{"post":{"operationId":"uploadReference","security":[{"webSession":[]}],"description":"Private R2 storage or development-local storage. Same-origin required;10 uploads/minute/user. Raw PNG/JPEG/WebP <=10MiB/40MP or validated MP4 <=128MiB/50MP/600seconds. Server generates keys and checks actual decoded content. Reference access expires after24hours; explicit operator cleanup can purge expired R2 inputs while pinning active/recent jobs. Checking a generation price may stage these bytes to provider public delivery URLs; credentials/URLs are not returned here.","requestBody":{"required":true,"content":{"image/png":{"schema":{"type":"string","contentEncoding":"binary"}},"image/jpeg":{"schema":{"type":"string","contentEncoding":"binary"}},"image/webp":{"schema":{"type":"string","contentEncoding":"binary"}},"video/mp4":{"schema":{"type":"string","contentEncoding":"binary"}}}},"responses":{"200":{"description":"Owned validated reference identity","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"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)$"},"mimeType":{"type":"string","enum":["image/jpeg","image/png","image/webp","video/mp4"]},"width":{"type":"integer","exclusiveMinimum":0,"maximum":16384},"height":{"type":"integer","exclusiveMinimum":0,"maximum":16384},"sizeBytes":{"type":"integer","exclusiveMinimum":0,"maximum":134217728},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"durationSeconds":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":600},{"type":"null"}]}},"required":["id","mimeType","width","height","sizeBytes","expiresAt"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid file","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Wrong origin","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Upload rate limit","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"503":{"description":"Reference storage unavailable","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/uploads/{id}/content":{"get":{"operationId":"previewReference","security":[{"webSession":[]}],"description":"Active owner session and unexpired reference required on every request. Development-local private no-store bytes, or a private R2 redirect to a signed GET valid for at most120seconds and bounded by input expiry. MP4 byte ranges supported; no provider URL exposed.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Validated private image or MP4 bytes"},"206":{"description":"Requested MP4 byte range"},"307":{"description":"Owned short-lived signed R2 preview; private, no-store"},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"404":{"description":"Not owned, expired or not found","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"416":{"description":"Invalid or unsatisfiable range"}}}},"/api/v1/me":{"get":{"operationId":"getMe","security":[{"webSession":[]}],"responses":{"200":{"description":"Current active user","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"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)$"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"name":{"type":["string","null"]},"role":{"type":"string","enum":["USER","SUBADMIN","ADMIN"]},"image":{"default":null,"type":["string","null"]}},"required":["id","email","name","role","image"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}},"patch":{"operationId":"updateMe","security":[{"webSession":[]}],"description":"Change only your display name. Same-origin Origin required. Maximum 20 requests/minute/user, 16 KiB body. Email, role, identity and credit fields are rejected.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Updated profile","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"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)$"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"name":{"type":["string","null"]},"role":{"type":"string","enum":["USER","SUBADMIN","ADMIN"]},"image":{"default":null,"type":["string","null"]}},"required":["id","email","name","role","image"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid input","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Wrong origin","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limit","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/me/overview":{"get":{"operationId":"getAccountOverview","security":[{"webSession":[]}],"description":"Current user's profile, sign-in methods, UZS wallet and latest 20 money transactions, archived credit ledger and usage counts. Never accepts a user ID.","responses":{"200":{"description":"Owned account overview","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"wallet":{"type":"object","properties":{"currency":{"type":"string","const":"UZS"},"availableTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"reservedTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"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)$"},"amountTiyin":{"type":"string","pattern":"^-?\\d{1,16}$"},"kind":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","amountTiyin","kind","createdAt"],"additionalProperties":false}}},"required":["currency","availableTiyin","reservedTiyin","transactions"],"additionalProperties":false},"profile":{"type":"object","properties":{"id":{"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)$"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"name":{"type":["string","null"]},"role":{"type":"string","enum":["USER","SUBADMIN","ADMIN"]},"image":{"default":null,"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"emailVerified":{"type":"boolean"},"providers":{"type":"array","items":{"type":"string"}},"username":{"default":null,"type":["string","null"]}},"required":["id","email","name","role","image","createdAt","emailVerified","providers","username"],"additionalProperties":false},"credits":{"type":"object","properties":{"available":{"type":"integer","minimum":0,"maximum":9007199254740991},"reserved":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["available","reserved"],"additionalProperties":false},"usage":{"type":"object","properties":{"generations":{"type":"integer","minimum":0,"maximum":9007199254740991},"assets":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["generations","assets"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"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)$"},"kind":{"type":"string"},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","amount","createdAt"],"additionalProperties":false}}},"required":["profile","credits","usage","transactions"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/me/wallet":{"get":{"operationId":"getWallet","security":[{"webSession":[]}],"description":"Owned UZS wallet, active reservations and latest 20 transactions. Amounts are integer tiyin strings (100 tiyin = 1 UZS). New accounts start at zero. Only verified super-admin payments add funds.","responses":{"200":{"description":"Owned UZS wallet","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"currency":{"type":"string","const":"UZS"},"availableTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"reservedTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"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)$"},"amountTiyin":{"type":"string","pattern":"^-?\\d{1,16}$"},"kind":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","amountTiyin","kind","createdAt"],"additionalProperties":false}}},"required":["currency","availableTiyin","reservedTiyin","transactions"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/me/credits":{"get":{"operationId":"getCredits","security":[{"webSession":[]}],"responses":{"200":{"description":"Available spendable credits","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"available":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["available"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/models":{"get":{"operationId":"getModels","security":[],"description":"Optional web session determines eligibility for owner-only local provider testing. Public callers do not receive that model configuration. All responses are uncached.","responses":{"200":{"description":"Documented image/video modes with availability and account quote evidence; active worker required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"family":{"type":"string"},"modality":{"type":"string","enum":["image","video","audio"]},"credits":{"type":"integer","minimum":0,"maximum":9007199254740991},"billingMode":{"type":"string","enum":["CREDITS","LOCAL_PROVIDER_TEST","UZS"]},"aspectRatios":{"type":"array","items":{"type":"string"}},"resolution":{"type":"string"},"enabled":{"type":"boolean"},"unavailableReason":{"type":"string"},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["string","integer","number","boolean"]},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":["string","number","boolean"]}},"optionLabels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"default":{"type":["string","number","boolean"]},"minimum":{"type":"number"},"maximum":{"type":"number"},"maxLength":{"type":"number"},"step":{"type":"number"}},"required":["name","title","type","required"],"additionalProperties":false}},"quoteUsd":{"type":["string","null"]},"quoteType":{"type":"string","enum":["fixed","description"]},"pricingDescription":{"type":["string","null"]},"verification":{"type":"string","enum":["generation_verified","quote_verified","unverified","quote_rejected"]},"documentationUrl":{"type":"string","format":"uri"},"requiresReferenceImage":{"type":"boolean"},"supportsReferenceImage":{"type":"boolean"},"requiresTemplate":{"type":"boolean"},"referenceFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["image","video"]},"required":{"type":"boolean"},"minItems":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxItems":{"type":"integer","exclusiveMinimum":0,"maximum":30},"minDurationSeconds":{"type":"number","minimum":0},"maxDurationSeconds":{"type":"number","exclusiveMinimum":0}},"required":["name","title","kind","required","minItems","maxItems"],"additionalProperties":false}},"referenceAlternatives":{"type":"array","items":{"type":"string"}}},"required":["id","name","modality","credits","billingMode","aspectRatios","resolution"],"additionalProperties":false}},"available":{"type":"boolean"}},"required":["models","available"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}}}}},"/api/v1/generations":{"post":{"operationId":"createGeneration","security":[{"webSession":[]}],"description":"10 requests/minute/user. UUID idempotencyKey in body; immutable body on replay. Server validates selected model parameters and named owned reference IDs; rejects arbitrary URLs. Up to12 roles,30 IDs perrole,40 total and128MiB aggregate validated media. Immutable provider input/owned-ID map persisted. templateId chooses a reviewed source for Motion Transfer; legacy referenceUploadId cannot mix with references. UZS mode requires a fresh owned quoteId matching all inputs. The displayed amount is fixed, reserved atomically and captured once on success; confirmed failures release it. Replays do not reserve again. Legacy credit-billed operations reserve atomically; local owner tests spend provider funds without app credits. Usage-based requests require explicit acknowledgement. Returns promptly; a separate worker processes jobs.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"modelId":{"type":"string","minLength":3,"maxLength":160,"pattern":"^[a-z0-9][a-z0-9./_-]+$"},"prompt":{"type":"string","minLength":1,"maxLength":8000},"aspectRatio":{"type":"string","enum":["9:16","16:9","4:3","3:4","1:1","2:3","3:2"]},"parameters":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":8000},{"type":"number"},{"type":"boolean"}]}},"acknowledgeVariablePrice":{"type":"boolean"},"referenceUploadId":{"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)$"},"references":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,79}$"},"additionalProperties":{"minItems":1,"maxItems":30,"type":"array","items":{"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)$"}}},"templateId":{"type":"string","pattern":"^[a-z0-9-]{3,80}$"},"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)$"},"idempotencyKey":{"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":["modelId","prompt","idempotencyKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"Created or existing logical generation","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"isPublic":{"type":"boolean"},"id":{"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)$"},"modelId":{"type":"string"},"modality":{"default":"image","type":"string","enum":["image","video","audio"]},"billingMode":{"type":"string","enum":["CREDITS","LOCAL_PROVIDER_TEST","UZS"]},"prompt":{"type":"string"},"aspectRatio":{"type":"string"},"status":{"type":"string","enum":["QUEUED","PROCESSING","SUCCEEDED","FAILED"]},"reservedCredits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"finalCredits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reservedTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"finalTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"safeErrorCode":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"assetId":{"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"}]}},"required":["id","modelId","modality","billingMode","prompt","aspectRatio","status","reservedCredits","finalCredits","safeErrorCode","createdAt","assetId"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid input","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient balance or legacy credits","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Wrong origin","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"409":{"description":"Changed idempotent request","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limit","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"503":{"description":"Model unavailable","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}},"get":{"operationId":"listGenerations","security":[{"webSession":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"description":"Owned generation cursor; 20 items/page, latest first"}],"responses":{"200":{"description":"Owned generation page","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"isPublic":{"type":"boolean"},"id":{"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)$"},"modelId":{"type":"string"},"modality":{"default":"image","type":"string","enum":["image","video","audio"]},"billingMode":{"type":"string","enum":["CREDITS","LOCAL_PROVIDER_TEST","UZS"]},"prompt":{"type":"string"},"aspectRatio":{"type":"string"},"status":{"type":"string","enum":["QUEUED","PROCESSING","SUCCEEDED","FAILED"]},"reservedCredits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"finalCredits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reservedTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"finalTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"safeErrorCode":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"assetId":{"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"}]}},"required":["id","modelId","modality","billingMode","prompt","aspectRatio","status","reservedCredits","finalCredits","safeErrorCode","createdAt","assetId"],"additionalProperties":false}},"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"}]}},"required":["items","nextCursor"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/generations/estimate":{"post":{"operationId":"estimateGeneration","security":[{"webSession":[]}],"description":"30 requests/minute/user; same-origin Origin required. Uses the configured key and the selected model's validated parameters. Creates no generation/reservation. In UZS mode, moneyQuote locks a server-calculated UZS amount for 10 minutes to the owner and exact inputs. Unknown pricing cannot be submitted for UZS billing. Provider-only estimates below describe legacy/test mode. Fixed quotes preserve decimal strings; description quotes have null provider amounts and usage-based pricingDescription. Recognized Genjutsu per-second formulas include usageEstimate with server-verified input duration, rounded billable seconds, selected resolution, current provider rate and estimated USD before account discounts. Unknown formulas leave usageEstimate null; the calculated estimate is not a settlement or spending cap. New usage-based generations require acknowledgeVariablePrice=true; a fresh server estimate gates dispatch. The UUID field is a client request identity, not a financial reservation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"modelId":{"type":"string","minLength":3,"maxLength":160,"pattern":"^[a-z0-9][a-z0-9./_-]+$"},"prompt":{"type":"string","minLength":1,"maxLength":8000},"aspectRatio":{"type":"string","enum":["9:16","16:9","4:3","3:4","1:1","2:3","3:2"]},"parameters":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":8000},{"type":"number"},{"type":"boolean"}]}},"acknowledgeVariablePrice":{"type":"boolean"},"referenceUploadId":{"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)$"},"references":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,79}$"},"additionalProperties":{"minItems":1,"maxItems":30,"type":"array","items":{"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)$"}}},"templateId":{"type":"string","pattern":"^[a-z0-9-]{3,80}$"},"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)$"},"idempotencyKey":{"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":["modelId","prompt","idempotencyKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"Provider estimate, not account balance or a settled charge","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"usd":{"anyOf":[{"type":"string","pattern":"^\\d+(?:\\.\\d+)?$"},{"type":"null"}]},"providerCredits":{"anyOf":[{"type":"string","pattern":"^\\d+(?:\\.\\d+)?$"},{"type":"null"}]},"credits":{"type":"integer","minimum":0,"maximum":9007199254740991},"quoteType":{"default":"fixed","type":"string","enum":["fixed","description"]},"pricingDescription":{"default":null,"type":["string","null"]},"usageEstimate":{"default":null,"anyOf":[{"type":"object","properties":{"estimatedUsd":{"type":"string","pattern":"^\\d+(?:\\.\\d+)?$"},"rateUsdPerSecond":{"type":"string","pattern":"^\\d+(?:\\.\\d+)?$"},"inputSeconds":{"type":"number","minimum":4,"maximum":30},"billableSeconds":{"type":"integer","minimum":4,"maximum":30},"resolution":{"type":"string","enum":["480p","720p","1080p"]},"beforeDiscounts":{"type":"boolean","const":true}},"required":["estimatedUsd","rateUsdPerSecond","inputSeconds","billableSeconds","resolution","beforeDiscounts"],"additionalProperties":false},{"type":"null"}]},"moneyQuote":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"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)$"},"amountTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"currency":{"type":"string","const":"UZS"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"usdUzsRate":{"type":"string"},"rateDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["id","amountTiyin","currency","expiresAt","usdUzsRate","rateDate"],"additionalProperties":false},{"type":"null"}]}},"required":["usd","providerCredits","credits","quoteType","pricingDescription","usageEstimate","moneyQuote"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"400":{"description":"Invalid parameters","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"403":{"description":"Wrong origin","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate limit","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"503":{"description":"Model or estimate unavailable","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/generations/{id}":{"get":{"operationId":"getGeneration","security":[{"webSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Owned generation","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"isPublic":{"type":"boolean"},"id":{"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)$"},"modelId":{"type":"string"},"modality":{"default":"image","type":"string","enum":["image","video","audio"]},"billingMode":{"type":"string","enum":["CREDITS","LOCAL_PROVIDER_TEST","UZS"]},"prompt":{"type":"string"},"aspectRatio":{"type":"string"},"status":{"type":"string","enum":["QUEUED","PROCESSING","SUCCEEDED","FAILED"]},"reservedCredits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"finalCredits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reservedTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"finalTiyin":{"type":"string","pattern":"^\\d{1,16}$"},"safeErrorCode":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"assetId":{"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"}]}},"required":["id","modelId","modality","billingMode","prompt","aspectRatio","status","reservedCredits","finalCredits","safeErrorCode","createdAt","assetId"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"404":{"description":"Not found or not owned","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/assets/{id}":{"get":{"operationId":"previewAsset","security":[{"webSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Private preview URL. R2 links expire in 120 seconds; local URLs require an active session on every request and use expiresIn=null","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresIn":{"anyOf":[{"type":"number","const":120},{"type":"null"}]},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"mimeType":{"default":"image/png","type":"string","enum":["image/png","image/jpeg","image/webp","video/mp4"]},"durationSeconds":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]}},"required":["url","expiresIn","width","height","mimeType"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"404":{"description":"Not found or not owned","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/assets/{id}/download":{"get":{"operationId":"downloadAsset","security":[{"webSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Private download access; expiresIn=null for authenticated local files","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresIn":{"anyOf":[{"type":"number","const":120},{"type":"null"}]}},"required":["url","expiresIn"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"404":{"description":"Not found or not owned","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/assets/{id}/content":{"get":{"operationId":"readLocalAsset","security":[{"webSession":[]}],"description":"Development-only local media. Checks current session and ownership on every request. No shared caching.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"download","in":"query","required":false,"schema":{"type":"string","const":"1"}}],"responses":{"200":{"description":"Private image or MP4 bytes. Range requests return206 with Content-Range/Accept-Ranges; malformed or unsatisfiable ranges return416 without a JSON body.","content":{"image/png":{"schema":{"type":"string","contentEncoding":"binary"}},"image/jpeg":{"schema":{"type":"string","contentEncoding":"binary"}},"image/webp":{"schema":{"type":"string","contentEncoding":"binary"}},"video/mp4":{"schema":{"type":"string","contentEncoding":"binary"}}}},"401":{"description":"Sign-in required","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"404":{"description":"Not found, not owned or unavailable in production","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/health":{"get":{"operationId":"getLiveness","summary":"Application process liveness","security":[],"responses":{"200":{"description":"Process is running","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","const":"ok"},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["status","timestamp"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"500":{"description":"Internal error","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/ready":{"get":{"operationId":"getReadiness","summary":"Database query readiness; does not verify migrations or external services","security":[],"responses":{"200":{"description":"Database responds","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","const":"ready"}},"required":["status"],"additionalProperties":false},"requestId":{"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":["data","requestId"],"additionalProperties":false}}}},"500":{"description":"Internal error","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}},"503":{"description":"Database unavailable","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_ERROR","SERVICE_UNAVAILABLE","UNAUTHENTICATED","FORBIDDEN","INVALID_REQUEST","NOT_FOUND","RATE_LIMITED","LOGIN_LOCKED","MODEL_UNAVAILABLE","INSUFFICIENT_CREDITS","INSUFFICIENT_BALANCE","PROVIDER_BALANCE_REQUIRED","INSUFFICIENT_PLATFORM_FUNDS","QUOTE_EXPIRED","IDEMPOTENCY_CONFLICT","ACCOUNT_ALREADY_LINKED","INVALID_CREDENTIALS","USERNAME_UNAVAILABLE","REAUTHENTICATION_REQUIRED"]},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":300}},"required":["code","message"],"additionalProperties":false},"requestId":{"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":["error","requestId"],"additionalProperties":false}}}}}}},"/api/v1/openapi":{"get":{"operationId":"getOpenApi","summary":"Machine-readable API specification","security":[],"responses":{"200":{"description":"OpenAPI 3.1 document","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string","const":"no-store"}}},"content":{"application/json":{"schema":{"type":"object"}}}}}}}}}