{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"qmoon","version":"1.078c2da9bbbd","description":"Every operation a connection (an API key, or an app a person connected) can call. A connection can do only what the person it acts for can, within its scope. Its scope is one of read, write, publish. Each includes the ones before it. Its edits apply at once. A delete moves the thing to Recently deleted, where the connection or its person can restore it for 30 days. Publishing, and deleting or restoring what others can see, needs the publish scope. Only the person deletes anything for good, manages members or connections, buys coins or changes the plan. Its charges count against its own spend limit, the person’s and the workspace’s. A connection works only in its own workspace. No input names a workspace."},"servers":[{"url":"https://api.qmoon.ai"}],"security":[{"connection":[]}],"paths":{"/api/v1/moderation.result.report":{"post":{"operationId":"moderation.result.report","summary":"Report a generation’s blocked results as mistakes. Staff review each result and its prompt.","tags":["moderation"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"generationId":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["generationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"reported":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["reported"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/moderation.appeal.get":{"post":{"operationId":"moderation.appeal.get","summary":"Show whether a suspended or removed work, episode or app can be appealed, and the appeal’s answer once staff reply.","tags":["moderation"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"work"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"episode"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"app"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}]}},"required":["subject"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"none"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"available"},"until":{"type":"number"}},"required":["state","until"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"closed"},"until":{"type":"number"}},"required":["state","until"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"sent"},"at":{"type":"number"}},"required":["state","at"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"kept"},"at":{"type":"number"},"reply":{"type":"string"}},"required":["state","at","reply"],"additionalProperties":false}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/moderation.appeal.send":{"post":{"operationId":"moderation.appeal.send","summary":"Appeal the decision that suspended or removed a work, episode or app, with a message staff read. Each decision takes one appeal.","tags":["moderation"],"x-qmoon-action":"publish","x-qmoon-scope":"publish","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"work"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"episode"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"app"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}]},"message":{"type":"string","minLength":1},"lang":{"type":"string","enum":["ja","en"]},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["subject","message","lang"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"none"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"available"},"until":{"type":"number"}},"required":["state","until"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"closed"},"until":{"type":"number"}},"required":["state","until"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"sent"},"at":{"type":"number"}},"required":["state","at"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"kept"},"at":{"type":"number"},"reply":{"type":"string"}},"required":["state","at","reply"],"additionalProperties":false}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/system.status.get":{"post":{"operationId":"system.status.get","summary":"List which qmoon services are on, and what is paused and since when.","tags":["system"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"services":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string","enum":["hostedModels","builtInServices","moderation","search","searchByMeaning","events","analytics","chat","paidFiles","push","line"]},"on":{"type":"boolean"}},"required":["service","on"],"additionalProperties":false}},"paused":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string","enum":["capability","provider","app"]},"name":{"type":"string"},"since":{"type":"number"}},"required":["scope","name","since"],"additionalProperties":false}}},"required":["services","paused"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/identity.account.get":{"post":{"operationId":"identity.account.get","summary":"Read the signed-in person’s account: name, language, time zone, preferences and status.","tags":["identity"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"displayName":{"type":"string"},"locale":{"type":"string","enum":["ja","en"]},"timeZone":{"type":"string"},"market":{"type":"string","enum":["jp","us"]},"personalWorkspaceId":{"type":"string","minLength":1},"staff":{"type":"boolean"},"adult":{"type":["boolean","null"]},"prefs":{"type":"object","properties":{"hideSensitiveWorks":{"type":"boolean"},"notify":{"type":"object","properties":{"email":{"type":"boolean"},"push":{"type":"boolean"}},"required":["email","push"],"additionalProperties":false}},"required":["hideSensitiveWorks","notify"],"additionalProperties":false},"personas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,32}$"},"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":1000}},"required":["id","name","description"],"additionalProperties":false}},"status":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"active"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"suspended"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"deleting"},"purgeAt":{"type":"number"}},"required":["kind","purgeAt"],"additionalProperties":false}]}},"required":["accountId","displayName","locale","timeZone","market","personalWorkspaceId","staff","adult","prefs","personas","status"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/identity.workspace.get":{"post":{"operationId":"identity.workspace.get","summary":"Read a workspace: its name, settings, public profile and the caller’s role.","tags":["identity"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["personal","team"]},"name":{"type":"string"},"handle":{"type":["string","null"]},"profile":{"anyOf":[{"type":"object","properties":{"name":{"type":"object","properties":{"ja":{"type":"string","maxLength":100},"en":{"type":"string","maxLength":100}},"additionalProperties":false},"nameReadings":{"type":"object","properties":{"ja":{"type":"string","maxLength":100},"en":{"type":"string","maxLength":100}},"additionalProperties":false},"bio":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"avatarAssetId":{"type":"string","minLength":1},"links":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["label","url"],"additionalProperties":false}}},"required":["name","nameReadings","bio","links"],"additionalProperties":false},{"type":"null"}]},"isQmoon":{"type":"boolean"},"settings":{"type":"object","properties":{"defaultLang":{"type":"string","enum":["ja","en"]},"limit":{"type":"object","properties":{"coins":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"reset":{"type":"string","enum":["never","day","week","month"]}},"required":["coins","reset"],"additionalProperties":false}},"required":["defaultLang","limit"],"additionalProperties":false},"role":{"anyOf":[{"type":"string","enum":["owner","admin","editor","commenter","viewer"]},{"type":"null"}]},"deleted":{"anyOf":[{"type":"object","properties":{"at":{"type":"number"},"purgeAt":{"type":"number"},"scheduled":{"type":"object","properties":{"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"atLeast":{"type":"boolean"}},"required":["episodes","atLeast"],"additionalProperties":false}},"required":["at","purgeAt","scheduled"],"additionalProperties":false},{"type":"null"}]}},"required":["workspaceId","kind","name","handle","profile","isQmoon","settings","role","deleted"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/identity.workspace.find":{"post":{"operationId":"identity.workspace.find","summary":"Find a creator’s workspace by handle.","tags":["identity"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"handle":{"type":"string","maxLength":64}},"required":["handle"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"anyOf":[{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"handle":{"type":"string"},"name":{"type":"string"}},"required":["workspaceId","handle","name"],"additionalProperties":false},{"type":"null"}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/identity.workspace.rename":{"post":{"operationId":"identity.workspace.rename","summary":"Rename a team workspace. A personal workspace takes the name on the owner’s account.","tags":["identity"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/identity.workspace.setProfile":{"post":{"operationId":"identity.workspace.setProfile","summary":"Set a workspace’s creator page: handle, name, bio, avatar and links. A handle publishes the page. It needs the publish scope and an owner or admin.","tags":["identity"],"x-qmoon-action":"publish","x-qmoon-scope":"publish","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"handle":{"type":"string","maxLength":64},"profile":{"type":"object","properties":{"name":{"type":"object","properties":{"ja":{"type":"string","maxLength":100},"en":{"type":"string","maxLength":100}},"additionalProperties":false},"nameReadings":{"type":"object","properties":{"ja":{"type":"string","maxLength":100},"en":{"type":"string","maxLength":100}},"additionalProperties":false},"bio":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"avatarAssetId":{"type":"string","minLength":1},"links":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["label","url"],"additionalProperties":false}}},"required":["name","nameReadings","bio","links"],"additionalProperties":false}},"required":["handle","profile"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"handle":{"type":"string"}},"required":["handle"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/identity.deleted.list":{"post":{"operationId":"identity.deleted.list","summary":"List what is in a workspace’s Recently deleted, most recently deleted first, of one type or all: what the caller may delete, and not what comes back with something else in it.","tags":["identity"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"type":{"type":"string","enum":["document","asset","work","episode","model","session","program","note","collection"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["document","asset","work","episode","model","session","program","note","collection"]},"documentId":{"type":"string","minLength":1},"asset":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"kind":{"type":"string"}},"required":["assetId","kind"],"additionalProperties":false},"workId":{"type":"string","minLength":1},"episodeId":{"type":"string","minLength":1},"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"sessionId":{"type":"string","minLength":1},"programId":{"type":"string","minLength":1},"noteId":{"type":"string","minLength":1},"collectionId":{"type":"string","minLength":1},"title":{"type":"string"},"deleted":{"type":"object","properties":{"at":{"type":"number"},"purgeAt":{"type":"number"},"by":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"person"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"connection"},"connectionId":{"type":"string","minLength":1},"scope":{"type":"string","enum":["read","write","publish"]}},"required":["kind","connectionId","scope"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"system"},"step":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["kind","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"staff"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false}]}},"required":["at","purgeAt","by"],"additionalProperties":false}},"required":["type","deleted"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/identity.connection.get":{"post":{"operationId":"identity.connection.get","summary":"Read this connection’s workspace, scope, spend limits with what remains (the tightest applies) and coins.","tags":["identity"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"workspace":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["personal","team"]},"name":{"type":"string"}},"required":["workspaceId","kind","name"],"additionalProperties":false},"credential":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"key"},"name":{"type":"string"},"prefix":{"type":"string"}},"required":["kind","name","prefix"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"agent"},"clientId":{"type":"string"},"name":{"type":["string","null"]},"host":{"type":["string","null"]}},"required":["kind","clientId","name","host"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"build"}},"required":["kind"],"additionalProperties":false}]},"scope":{"type":"string","enum":["read","write","publish"]},"limit":{"type":"object","properties":{"coins":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"reset":{"type":"string","enum":["never","day","week","month"]},"used":{"type":"integer","minimum":0,"maximum":9007199254740991},"remaining":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"resetsAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["coins","reset","used","remaining","resetsAt"],"additionalProperties":false},"memberLimit":{"anyOf":[{"type":"object","properties":{"coins":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"reset":{"type":"string","enum":["never","day","week","month"]},"used":{"type":"integer","minimum":0,"maximum":9007199254740991},"remaining":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"resetsAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["coins","reset","used","remaining","resetsAt"],"additionalProperties":false},{"type":"null"}]},"coins":{"type":"object","properties":{"plan":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"balance":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"object","properties":{"coins":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"reset":{"type":"string","enum":["never","day","week","month"]},"used":{"type":"integer","minimum":0,"maximum":9007199254740991},"remaining":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"resetsAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["coins","reset","used","remaining","resetsAt"],"additionalProperties":false}},"required":["plan","balance","limit"],"additionalProperties":false}},"required":["workspace","credential","scope","limit","memberLimit","coins"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/money.usage.get":{"post":{"operationId":"money.usage.get","summary":"Read a workspace’s plan, coins for media with recent charges, and storage.","tags":["money"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"plan":{"anyOf":[{"type":"object","properties":{"tier":{"type":"string","enum":["small","medium","large"]},"trial":{"type":"boolean"},"state":{"type":"string","enum":["active","canceling"]},"periodEnd":{"type":"integer","minimum":0,"maximum":9007199254740991},"seats":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["tier","trial","state","periodEnd","seats"],"additionalProperties":false},{"type":"null"}]},"coins":{"type":"object","properties":{"plan":{"anyOf":[{"type":"object","properties":{"remaining":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"refillsAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["remaining","total","refillsAt"],"additionalProperties":false},{"type":"null"}]},"balance":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"object","properties":{"coins":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"reset":{"type":"string","enum":["never","day","week","month"]},"used":{"type":"integer","minimum":0,"maximum":9007199254740991},"remaining":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"resetsAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["coins","reset","used","remaining","resetsAt"],"additionalProperties":false},"recent":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"ledgerEntryId":{"type":"string","minLength":1},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"coins":{"type":"integer","minimum":0,"maximum":9007199254740991},"kind":{"type":"string","enum":["image","video","audio","mesh","other"]},"pending":{"type":"boolean"}},"required":["ledgerEntryId","at","coins","kind","pending"],"additionalProperties":false},{"type":"object","properties":{"runId":{"type":"string","minLength":1},"title":{"type":"string"},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"coins":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"pending":{"type":"boolean"}},"required":["runId","title","at","coins","pending"],"additionalProperties":false}]}}},"required":["plan","balance","limit","recent"],"additionalProperties":false},"storage":{"type":"object","properties":{"usedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"limitBytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["usedBytes","limitBytes"],"additionalProperties":false},"seats":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"memberLimit":{"anyOf":[{"type":"object","properties":{"coins":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"reset":{"type":"string","enum":["never","day","week","month"]},"used":{"type":"integer","minimum":0,"maximum":9007199254740991},"remaining":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"resetsAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["coins","reset","used","remaining","resetsAt"],"additionalProperties":false},{"type":"null"}]}},"required":["plan","coins","storage","seats","memberLimit"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.document.create":{"post":{"operationId":"documents.document.create","summary":"Create a canvas in the workspace, outside any work. Create a saved entry with canon.entry.create.","tags":["documents"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["comicPage","prose","canvas","storyboard","entry"]},"title":{"type":"string"},"commands":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"args":{}},"required":["name","args"],"additionalProperties":false}},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["kind","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"documentId":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.document.list":{"post":{"operationId":"documents.document.list","summary":"List a workspace’s documents, most recently edited first, of one kind or all, a page at a time. Recently deleted lists those you may delete, newest first.","tags":["documents"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"kind":{"type":"string","enum":["comicPage","prose","canvas","storyboard","entry"]},"deleted":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["comicPage","prose","canvas","storyboard","entry"]},"title":{"type":"string"},"lastEditedAt":{"type":"number"},"workId":{"type":"string","minLength":1},"root":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"role":{"type":"string","enum":["page","text","storyboard","frames"]}},"required":["episodeId","role"],"additionalProperties":false},"lang":{"type":"string","enum":["ja","en"]},"translationOf":{"type":"string","minLength":1},"deleted":{"type":"object","properties":{"at":{"type":"number"},"purgeAt":{"type":"number"},"by":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"person"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"connection"},"connectionId":{"type":"string","minLength":1},"scope":{"type":"string","enum":["read","write","publish"]}},"required":["kind","connectionId","scope"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"system"},"step":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["kind","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"staff"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false}]},"unpublished":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["at","purgeAt","by"],"additionalProperties":false}},"required":["documentId","kind","title","lastEditedAt"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.document.roots":{"post":{"operationId":"documents.document.roots","summary":"List an episode’s documents in reading order: comic pages, the chapter in each edition, the storyboard. Read each with document_read.","tags":["documents"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"episodeId":{"type":"string","minLength":1},"role":{"type":"string","enum":["page","text","storyboard","frames"]}},"required":["episodeId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["comicPage","prose","canvas","storyboard","entry"]},"title":{"type":"string"},"lastEditedAt":{"type":"number"},"workId":{"type":"string","minLength":1},"root":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"role":{"type":"string","enum":["page","text","storyboard","frames"]}},"required":["episodeId","role"],"additionalProperties":false},"lang":{"type":"string","enum":["ja","en"]},"translationOf":{"type":"string","minLength":1},"deleted":{"type":"object","properties":{"at":{"type":"number"},"purgeAt":{"type":"number"},"by":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"person"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"connection"},"connectionId":{"type":"string","minLength":1},"scope":{"type":"string","enum":["read","write","publish"]}},"required":["kind","connectionId","scope"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"system"},"step":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["kind","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"staff"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false}]},"unpublished":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["at","purgeAt","by"],"additionalProperties":false}},"required":["documentId","kind","title","lastEditedAt"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.document.read":{"post":{"operationId":"documents.document.read","summary":"Read a document a page at a time: its blocks, panels, shots or canvas items in reading order, with ids commands name. Pages are at most 20,000 characters. Read an entry with canon_get.","tags":["documents"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]}},"required":["documentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"document":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["comicPage","prose","canvas","storyboard","entry"]},"title":{"type":"string"},"workspaceId":{"type":"string","minLength":1},"workId":{"type":"string","minLength":1},"root":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"role":{"type":"string","enum":["page","text","storyboard","frames"]}},"required":["episodeId","role"],"additionalProperties":false},"lang":{"type":"string","enum":["ja","en"]},"translationOf":{"type":"string","minLength":1},"copiedFrom":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"title":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]}},"required":["appId","title","creator"],"additionalProperties":false},"createdBy":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"person"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"connection"},"connectionId":{"type":"string","minLength":1},"scope":{"type":"string","enum":["read","write","publish"]}},"required":["kind","connectionId","scope"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"system"},"step":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["kind","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"staff"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false}]},"lastEditedAt":{"type":"number"},"lastEditedBy":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"person"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"connection"},"connectionId":{"type":"string","minLength":1},"scope":{"type":"string","enum":["read","write","publish"]}},"required":["kind","connectionId","scope"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"system"},"step":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["kind","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"staff"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false}]},"deleted":{"type":"object","properties":{"at":{"type":"number"},"purgeAt":{"type":"number"},"by":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"person"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"connection"},"connectionId":{"type":"string","minLength":1},"scope":{"type":"string","enum":["read","write","publish"]}},"required":["kind","connectionId","scope"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"system"},"step":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["kind","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"staff"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false}]},"unpublished":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["at","purgeAt","by"],"additionalProperties":false}},"required":["documentId","kind","title","workspaceId","createdBy","lastEditedAt","lastEditedBy"],"additionalProperties":false},"deletable":{"type":"boolean"},"rev":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"content":{"type":"string"},"cursor":{"type":["string","null"]}},"required":["document","deletable","rev","content","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.document.commands":{"post":{"operationId":"documents.document.commands","summary":"List the commands a kind of document accepts, each with its arguments as JSON Schema text, a page at a time.","tags":["documents"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["comicPage","prose","canvas","storyboard","entry"]},"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]}},"required":["kind"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"commands":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"args":{"type":"string"}},"required":["name","description","args"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["commands","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.document.apply":{"post":{"operationId":"documents.document.apply","summary":"Change a document with the commands of its kind, applied in order. Changing an entry open for chat needs the publish scope.","tags":["documents"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"commands":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"args":{}},"required":["name","args"],"additionalProperties":false}},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["documentId","commands"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"rev":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["rev"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.document.propose":{"post":{"operationId":"documents.document.propose","summary":"Propose a change made of a document’s commands, for a person to accept or reject.","tags":["documents"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"commands":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"args":{}},"required":["name","args"],"additionalProperties":false}},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"},"summary":{"type":"string"}},"required":["documentId","commands"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"proposalId":{"type":"string","minLength":1}},"required":["proposalId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.canvas.place":{"post":{"operationId":"documents.canvas.place","summary":"Place images, videos or other assets on a canvas, side by side in an open spot.","tags":["documents"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"assetIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["documentId","assetIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"rev":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["rev"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.canvas.instantiateTemplate":{"post":{"operationId":"documents.canvas.instantiateTemplate","summary":"Create an editable canvas from a template with its exposed fields filled in.","tags":["documents"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceDocumentId":{"type":"string","minLength":1},"title":{"type":"string"},"fills":{"default":[],"maxItems":64,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"value":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"text"},"text":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"color"},"color":{"anyOf":[{"type":"integer","minimum":0,"maximum":16777215},{"type":"null"}]}},"required":["kind","color"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"assetId":{"type":"string","minLength":1}},"required":["kind","assetId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"format"},"formatEntryId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["kind","formatEntryId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"entry"},"entry":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["entryId"],"additionalProperties":false}},"required":["kind","entry"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"option"},"option":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["kind","option"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"number"},"number":{"type":"number"}},"required":["kind","number"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"toggle"},"toggle":{"type":"boolean"}},"required":["kind","toggle"],"additionalProperties":false}]}},"required":["field","value"],"additionalProperties":false}},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["sourceDocumentId","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"documentId":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.document.rename":{"post":{"operationId":"documents.document.rename","summary":"Rename a document.","tags":["documents"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["documentId","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.document.delete":{"post":{"operationId":"documents.document.delete","summary":"Move a document to Recently deleted, where it can be restored for 30 days.","tags":["documents"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"purgeAt":{"type":"number"}},"required":["purgeAt"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.document.restore":{"post":{"operationId":"documents.document.restore","summary":"Restore a document from Recently deleted.","tags":["documents"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.version.list":{"post":{"operationId":"documents.version.list","summary":"List a document’s versions, newest first: named versions, releases, and the state before each restore.","tags":["documents"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"documentId":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["compaction","named","release","restore","connection"]},"rev":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"type":"string"},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"number"},"createdBy":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"person"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"connection"},"connectionId":{"type":"string","minLength":1},"scope":{"type":"string","enum":["read","write","publish"]}},"required":["kind","connectionId","scope"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"system"},"step":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["kind","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"staff"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false}]}},"required":["versionId","kind","rev","bytes","createdAt","createdBy"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.version.save":{"post":{"operationId":"documents.version.save","summary":"Save the document’s current state as a named version.","tags":["documents"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["documentId","label"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"versionId":{"type":"string","minLength":1}},"required":["versionId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.version.content":{"post":{"operationId":"documents.version.content","summary":"Read a version of a document a page at a time, as document_read reads the document, and an entry’s as its records. Pages are at most 20,000 characters.","tags":["documents"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]}},"required":["documentId","versionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"rev":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"content":{"type":"string"},"cursor":{"type":["string","null"]}},"required":["rev","content","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.version.compare":{"post":{"operationId":"documents.version.compare","summary":"Compare two versions of a document, or a version with the current document (null): the records added, removed and changed, a page at a time.","tags":["documents"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"from":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"to":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]}},"required":["documentId","from","to"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"counts":{"type":"object","properties":{"added":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"removed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["added","removed","changed"],"additionalProperties":false},"changes":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"recordId":{"type":"string"},"change":{"type":"string","const":"added"}},"required":["recordId","change"],"additionalProperties":false},{"type":"object","properties":{"recordId":{"type":"string"},"change":{"type":"string","const":"removed"}},"required":["recordId","change"],"additionalProperties":false},{"type":"object","properties":{"recordId":{"type":"string"},"change":{"type":"string","const":"changed"},"keys":{"type":"array","items":{"type":"string"}}},"required":["recordId","change","keys"],"additionalProperties":false}]}},"cursor":{"type":["string","null"]}},"required":["counts","changes","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.version.restore":{"post":{"operationId":"documents.version.restore","summary":"Restore a document to a version, as one new change that can be undone.","tags":["documents"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1}},"required":["documentId","versionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"rev":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["rev"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.proposal.list":{"post":{"operationId":"documents.proposal.list","summary":"List the open proposals on a document, newest first: changes that wait for a person to accept or reject.","tags":["documents"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"documentId":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"proposalId":{"type":"string","minLength":1},"documentId":{"type":"string","minLength":1},"documentKind":{"type":"string","enum":["comicPage","prose","canvas","storyboard","entry"]},"documentTitle":{"type":"string"},"documentNames":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"author":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"person"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"connection"},"connectionId":{"type":"string","minLength":1},"scope":{"type":"string","enum":["read","write","publish"]}},"required":["kind","connectionId","scope"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"system"},"step":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["kind","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"staff"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false}]},"source":{"type":"string","enum":["policy"]},"summary":{"type":"string"},"state":{"type":"string","enum":["open","decided","expired"]},"expiresAt":{"type":"number"},"createdAt":{"type":"number"}},"required":["proposalId","documentId","documentKind","documentTitle","author","source","summary","state","expiresAt","createdAt"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.proposal.listOpen":{"post":{"operationId":"documents.proposal.listOpen","summary":"List a workspace’s open proposals, newest first, as shown in Needs you: changes that wait for a person to accept or reject.","tags":["documents"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"proposalId":{"type":"string","minLength":1},"documentId":{"type":"string","minLength":1},"documentKind":{"type":"string","enum":["comicPage","prose","canvas","storyboard","entry"]},"documentTitle":{"type":"string"},"documentNames":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"author":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"person"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"connection"},"connectionId":{"type":"string","minLength":1},"scope":{"type":"string","enum":["read","write","publish"]}},"required":["kind","connectionId","scope"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"system"},"step":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["kind","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"staff"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false}]},"source":{"type":"string","enum":["policy"]},"summary":{"type":"string"},"state":{"type":"string","enum":["open","decided","expired"]},"expiresAt":{"type":"number"},"createdAt":{"type":"number"}},"required":["proposalId","documentId","documentKind","documentTitle","author","source","summary","state","expiresAt","createdAt"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.proposal.compare":{"post":{"operationId":"documents.proposal.compare","summary":"Compare a proposal item by item: the records now, as proposed and as accepting would leave them, as JSON text, with any conflicts, a page at a time.","tags":["documents"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"proposalId":{"type":"string","minLength":1},"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]}},"required":["documentId","proposalId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"proposal":{"type":"object","properties":{"proposalId":{"type":"string","minLength":1},"documentId":{"type":"string","minLength":1},"documentKind":{"type":"string","enum":["comicPage","prose","canvas","storyboard","entry"]},"documentTitle":{"type":"string"},"documentNames":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"baseRev":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"author":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"person"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"connection"},"connectionId":{"type":"string","minLength":1},"scope":{"type":"string","enum":["read","write","publish"]}},"required":["kind","connectionId","scope"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"system"},"step":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["kind","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"staff"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false}]},"source":{"type":"string","enum":["policy"]},"summary":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"recordIds":{"type":"array","items":{"type":"string"}},"state":{"type":"string","enum":["open","accepted","rejected","conflict"]}},"required":["key","recordIds","state"],"additionalProperties":false}},"state":{"type":"string","enum":["open","decided","expired"]},"decidedBy":{"type":"string","minLength":1},"decidedAt":{"type":"number"},"expiresAt":{"type":"number"},"createdAt":{"type":"number"}},"required":["proposalId","documentId","documentKind","documentTitle","baseRev","author","source","summary","items","state","expiresAt","createdAt"],"additionalProperties":false},"compared":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"state":{"type":"string","enum":["open","accepted","rejected","conflict"]},"conflicts":{"type":"array","items":{"type":"object","properties":{"recordId":{"type":"string"},"keys":{"type":"array","items":{"type":"string"}}},"required":["recordId","keys"],"additionalProperties":false}},"now":{"type":"string"},"proposed":{"type":"string"},"accepted":{"type":"string"}},"required":["key","state","conflicts","now","proposed","accepted"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["proposal","compared","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.proposal.accept":{"post":{"operationId":"documents.proposal.accept","summary":"Accept a proposal’s items (all open ones, or those named), choosing a side for each conflict.","tags":["documents"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"proposalId":{"type":"string","minLength":1},"items":{"type":"array","items":{"type":"string"}},"resolve":{"type":"array","items":{"type":"object","properties":{"recordId":{"type":"string"},"key":{"type":"string"},"take":{"type":"string","enum":["mine","theirs"]}},"required":["recordId","key","take"],"additionalProperties":false}}},"required":["documentId","proposalId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"state":{"type":"string","enum":["open","decided","expired"]},"accepted":{"type":"array","items":{"type":"string"}},"conflicts":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"recordId":{"type":"string"},"keys":{"type":"array","items":{"type":"string"}}},"required":["item","recordId","keys"],"additionalProperties":false}}},"required":["state","accepted","conflicts"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.proposal.reject":{"post":{"operationId":"documents.proposal.reject","summary":"Reject a proposal’s items, all open ones or those named.","tags":["documents"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"proposalId":{"type":"string","minLength":1},"items":{"type":"array","items":{"type":"string"}}},"required":["documentId","proposalId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"state":{"type":"string","enum":["open","decided","expired"]}},"required":["state"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.comment.list":{"post":{"operationId":"documents.comment.list","summary":"List a document’s review comment threads, open or resolved, newest first, or the replies in one thread, oldest first.","tags":["documents"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"documentId":{"type":"string","minLength":1},"resolved":{"type":"boolean"},"replyTo":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"commentId":{"type":"string","minLength":1},"documentId":{"type":"string","minLength":1},"replyTo":{"type":"string","minLength":1},"anchor":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"record"},"recordId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["kind","recordId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text"},"recordId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"from":{"type":"integer","minimum":0,"maximum":9007199254740991},"to":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","recordId","from","to"],"additionalProperties":false}]},"author":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"person"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"connection"},"connectionId":{"type":"string","minLength":1},"scope":{"type":"string","enum":["read","write","publish"]}},"required":["kind","connectionId","scope"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"system"},"step":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["kind","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"staff"},"accountId":{"type":"string","minLength":1}},"required":["kind","accountId"],"additionalProperties":false}]},"body":{"type":"string"},"resolved":{"type":"boolean"},"deletable":{"type":"boolean"},"createdAt":{"type":"number"},"editedAt":{"type":"number"},"replies":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["commentId","documentId","anchor","author","body","resolved","deletable","createdAt"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.comment.add":{"post":{"operationId":"documents.comment.add","summary":"Start a comment thread on a record or a span of its text.","tags":["documents"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"anchor":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"record"},"recordId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["kind","recordId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text"},"recordId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"from":{"type":"integer","minimum":0,"maximum":9007199254740991},"to":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","recordId","from","to"],"additionalProperties":false}]},"body":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["documentId","anchor","body"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"commentId":{"type":"string","minLength":1}},"required":["commentId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.comment.reply":{"post":{"operationId":"documents.comment.reply","summary":"Reply in a comment thread.","tags":["documents"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"commentId":{"type":"string","minLength":1},"body":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["documentId","commentId","body"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"commentId":{"type":"string","minLength":1}},"required":["commentId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.comment.edit":{"post":{"operationId":"documents.comment.edit","summary":"Edit the text of your own comment.","tags":["documents"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"commentId":{"type":"string","minLength":1},"body":{"type":"string","minLength":1}},"required":["documentId","commentId","body"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.comment.resolve":{"post":{"operationId":"documents.comment.resolve","summary":"Resolve a comment thread, or open it again.","tags":["documents"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"commentId":{"type":"string","minLength":1},"resolved":{"type":"boolean"}},"required":["documentId","commentId","resolved"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.upload.begin":{"post":{"operationId":"media.upload.begin","summary":"Start uploading a file to a workspace. Returns where to send the bytes, or the asset that already has them.","tags":["media"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"mediaType":{"type":"string","minLength":1,"maxLength":100},"bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"image":{"type":"object","properties":{"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":"string","pattern":"^[A-Za-z0-9+/]{4,64}={0,2}$"},"variants":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["w320","w640","w960","w1600","w2400"]},"bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["name","bytes","sha256","width","height"],"additionalProperties":false}}},"required":["width","height","placeholder","variants"],"additionalProperties":false},"mask":{"type":"boolean","const":true},"drawnFrom":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"lang":{"type":"string","enum":["ja","en"]},"frameId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["documentId","revision","lang"],"additionalProperties":false},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["filename","mediaType","bytes"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"duplicate"},"assetId":{"type":"string","minLength":1}},"required":["kind","assetId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"waiting"},"assetId":{"type":"string","minLength":1}},"required":["kind","assetId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"single"},"assetId":{"type":"string","minLength":1},"upload":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expiresAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["url","headers","expiresAt"],"additionalProperties":false},"variants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["w320","w640","w960","w1600","w2400"]},"upload":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expiresAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["url","headers","expiresAt"],"additionalProperties":false}},"required":["name","upload"],"additionalProperties":false}}},"required":["kind","assetId","upload","variants"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"multipart"},"assetId":{"type":"string","minLength":1},"partBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"partCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","assetId","partBytes","partCount"],"additionalProperties":false}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.upload.resume":{"post":{"operationId":"media.upload.resume","summary":"Resume an upload: new URLs for the bytes, or whether it is still waiting for space.","tags":["media"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["assetId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"duplicate"},"assetId":{"type":"string","minLength":1}},"required":["kind","assetId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"waiting"},"assetId":{"type":"string","minLength":1}},"required":["kind","assetId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"single"},"assetId":{"type":"string","minLength":1},"upload":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expiresAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["url","headers","expiresAt"],"additionalProperties":false},"variants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["w320","w640","w960","w1600","w2400"]},"upload":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expiresAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["url","headers","expiresAt"],"additionalProperties":false}},"required":["name","upload"],"additionalProperties":false}}},"required":["kind","assetId","upload","variants"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"multipart"},"assetId":{"type":"string","minLength":1},"partBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"partCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","assetId","partBytes","partCount"],"additionalProperties":false}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.upload.parts":{"post":{"operationId":"media.upload.parts","summary":"List the parts of a multipart upload received so far, and sign URLs for the next parts by MD5.","tags":["media"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"parts":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"number":{"type":"integer","minimum":1,"maximum":9007199254740991},"md5":{"type":"string","pattern":"^[A-Za-z0-9+/]{22}==$"}},"required":["number","md5"],"additionalProperties":false}},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["assetId","parts"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"uploaded":{"type":"array","items":{"type":"object","properties":{"number":{"type":"integer","minimum":1,"maximum":9007199254740991},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["number","bytes"],"additionalProperties":false}},"urls":{"type":"array","items":{"type":"object","properties":{"number":{"type":"integer","minimum":1,"maximum":9007199254740991},"upload":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expiresAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["url","headers","expiresAt"],"additionalProperties":false}},"required":["number","upload"],"additionalProperties":false}}},"required":["uploaded","urls"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.upload.complete":{"post":{"operationId":"media.upload.complete","summary":"Finish an upload after sending the bytes. The file is then verified.","tags":["media"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["assetId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.upload.abort":{"post":{"operationId":"media.upload.abort","summary":"Cancel an upload that is unfinished or waiting for space, and discard its bytes.","tags":["media"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.asset.get":{"post":{"operationId":"media.asset.get","summary":"Read an asset: its state, size, variants and moderation state. Use media.asset.files for the file URLs.","tags":["media"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["image","video","audio","mesh","font","bundle"]},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"sha256":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"hasAudio":{"type":["boolean","null"]},"hasAlpha":{"type":["boolean","null"]},"placeholder":{"type":["string","null"]},"state":{"type":"string","enum":["waiting","uploading","processing","ready","failed","blocked"]},"uploadingUntil":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"failure":{"anyOf":[{"type":"string","enum":["notUploaded","sizeMismatch","checksumMismatch","unsupportedType","tooManyPixels","decodeFailed","verifyFailed"]},{"type":"null"}]},"moderation":{"type":"string","enum":["pending","passed","blocked","unchecked","none"]},"variants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["name","mediaType","bytes","width","height"],"additionalProperties":false}},"fileAccess":{"anyOf":[{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"grant":{"type":"string","pattern":"^m\\.[A-Za-z0-9_-]{8}\\.[A-Za-z0-9_-]{86}$"},"lentTo":{"type":"string","minLength":1}},"required":["baseUrl","grant"],"additionalProperties":false},{"type":"null"}]},"source":{"type":"string","enum":["upload","generation","render","join","fork","copy"]},"filename":{"type":["string","null"]},"madeFrom":{"anyOf":[{"type":"object","properties":{"runId":{"type":"string","minLength":1},"assetIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["runId","assetIds"],"additionalProperties":false},{"type":"null"}]},"drawnFrom":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"lang":{"type":"string","enum":["ja","en"]},"frameId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["documentId","revision","lang"],"additionalProperties":false},{"type":"null"}]},"favorite":{"type":"boolean"},"origin":{"type":"string","enum":["human","ai"]},"createdBy":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"creatorKind":{"type":"string","enum":["person","connection","system"]},"own":{"type":"boolean"},"deletable":{"type":"boolean"},"createdAt":{"type":"number","minimum":0},"deleted":{"anyOf":[{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"purgeAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["at","purgeAt"],"additionalProperties":false},{"type":"null"}]}},"required":["assetId","workspaceId","kind","mediaType","bytes","sha256","width","height","durationMs","hasAudio","hasAlpha","placeholder","state","uploadingUntil","failure","moderation","variants","fileAccess","source","filename","madeFrom","drawnFrom","favorite","origin","createdBy","creatorKind","own","deletable","createdAt","deleted"],"additionalProperties":false},{"type":"null"}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.asset.files":{"post":{"operationId":"media.asset.files","summary":"Get short-lived download URLs for an asset’s original and variants, once the asset has passed moderation.","tags":["media"],"x-qmoon-action":"read","x-qmoon-scope":"read","parameters":[{"name":"Prefer","in":"header","required":false,"description":"preview=first or preview=each adds assets: each asset the result names, with links to its files and its preview, the first one or each, as base64. Without it, call media.asset.files for the files.","schema":{"type":"string","examples":["preview=first"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"files":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z_-]{1,128}$"}}},"required":["assetId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[0-9A-Za-z_-]{1,128}$"},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","url","expiresAt","mediaType","bytes"],"additionalProperties":false}}},"required":["files"],"additionalProperties":false},"settled":{"type":"boolean"},"assets":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"links":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[0-9A-Za-z_-]{1,128}$"},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","url","expiresAt","mediaType","bytes"],"additionalProperties":false}},"preview":{"anyOf":[{"type":"object","properties":{"mediaType":{"type":"string"},"base64":{"type":"string"}},"required":["mediaType","base64"],"additionalProperties":false},{"type":"null"}]}},"required":["assetId","links","preview"],"additionalProperties":false}}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.asset.list":{"post":{"operationId":"media.asset.list","summary":"List a workspace’s assets, newest first, of one kind or all, or those in Recently deleted.","tags":["media"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"kind":{"type":"string","enum":["image","video","audio","mesh","font","bundle"]},"deleted":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["image","video","audio","mesh","font","bundle"]},"mediaType":{"type":"string"},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"state":{"type":"string","enum":["waiting","uploading","processing","ready","failed","blocked"]},"filename":{"type":["string","null"]},"createdAt":{"type":"number","minimum":0}},"required":["assetId","kind","mediaType","width","height","durationMs","state","filename","createdAt"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.asset.uses":{"post":{"operationId":"media.asset.uses","summary":"List where an asset is used in its workspace: documents, covers, posts, canon and generations. Up to 100.","tags":["media"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"document"},"documentId":{"type":"string","minLength":1},"documentKind":{"type":"string","enum":["comicPage","prose","canvas","storyboard","entry"]},"title":{"type":"string"}},"required":["kind","documentId","documentKind","title"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"work"},"workId":{"type":"string","minLength":1},"titles":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["kind","workId","titles"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"episode"},"workId":{"type":"string","minLength":1},"episodeId":{"type":"string","minLength":1},"titles":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["kind","workId","episodeId","titles"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"entry"},"documentId":{"type":"string","minLength":1},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["kind","documentId","names"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"generation"},"generationId":{"type":"string","minLength":1},"documentId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["kind","generationId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"program"},"programId":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["kind","programId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"retained"},"by":{"type":"string","enum":["version","release","workspace"]}},"required":["kind","by"],"additionalProperties":false}]}},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.asset.nearCopies":{"post":{"operationId":"media.asset.nearCopies","summary":"List up to 12 exact or visually near-identical active images in the same workspace, closest first.","tags":["media"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"exact":{"type":"boolean"},"distance":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["assetId","exact","distance"],"additionalProperties":false}},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.asset.delete":{"post":{"operationId":"media.asset.delete","summary":"Move assets to Recently deleted, all or none. Each can be restored for 30 days.","tags":["media"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["assetIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"purgeAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["purgeAt"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.asset.restore":{"post":{"operationId":"media.asset.restore","summary":"Restore assets from Recently deleted, all or none.","tags":["media"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["assetIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.asset.favorite":{"post":{"operationId":"media.asset.favorite","summary":"Mark or unmark an asset as a favorite in the workspace’s Create.","tags":["media"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"favorite":{"type":"boolean"}},"required":["assetId","favorite"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.feed.list":{"post":{"operationId":"media.feed.list","summary":"List what a workspace generated and uploaded, newest first: generations with their sessions and outputs, runs with their generations, and files.","tags":["media"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"filter":{"type":"string","enum":["all","images","videos","uploaded","audio","favorites"]}},"required":["filter"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["generation","run","file"]},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"generation":{"type":"object","properties":{"generationId":{"type":"string","minLength":1},"capability":{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},"state":{"type":"string","enum":["queued","running","done","failed","canceled"]}},"required":["generationId","capability","state"],"additionalProperties":false},"session":{"anyOf":[{"type":"object","properties":{"sessionId":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["sessionId","title"],"additionalProperties":false},{"type":"null"}]},"document":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["documentId","title"],"additionalProperties":false},{"type":"null"}]},"outputs":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"asset":{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false}},"required":["index","asset"],"additionalProperties":false}},"runId":{"type":"string","minLength":1},"state":{"type":"string","enum":["running","waiting","done","failed","canceled"]},"asking":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]},"generations":{"type":"array","items":{"type":"object","properties":{"generation":{"type":"object","properties":{"generationId":{"type":"string","minLength":1}},"required":["generationId"],"additionalProperties":false}},"required":["generation"],"additionalProperties":false}},"asset":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["image","video","audio","mesh","font","bundle"]},"state":{"type":"string","enum":["waiting","uploading","processing","ready","failed","blocked"]},"failure":{"anyOf":[{"type":"string","enum":["notUploaded","sizeMismatch","checksumMismatch","unsupportedType","tooManyPixels","decodeFailed","verifyFailed"]},{"type":"null"}]}},"required":["assetId","kind","state","failure"],"additionalProperties":false}},"required":["kind","at"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.feed.get":{"post":{"operationId":"media.feed.get","summary":"Read the feed entry for one asset: the generation that produced it, with its prompt and model, the run that generation is a step of, or the uploaded file.","tags":["media"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"generation"},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"generation":{"type":"object","properties":{"generationId":{"type":"string","minLength":1},"capability":{"anyOf":[{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},{"type":"null"}]},"mediaKind":{"type":"string","enum":["image","video","audio","mesh","other"]},"quality":{"anyOf":[{"type":"string","enum":["fast","high"]},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","done","failed","canceled"]},"failureReason":{"anyOf":[{"type":"string","enum":["blocked","refused","unavailable","timedOut","failed"]},{"type":"null"}]},"count":{"type":"integer","minimum":1,"maximum":9007199254740991},"multiOutput":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"set"},"outputCount":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","outputCount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"layers"},"format":{"type":"string","enum":["pages","boxes"]},"outputCount":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","format","outputCount"],"additionalProperties":false}]},{"type":"null"}]},"outputs":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["pending","delivered","failed","blocked","canceled"]},"assetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"failureReason":{"anyOf":[{"type":"string","enum":["blocked","refused","unavailable","timedOut","failed"]},{"type":"null"}]},"effectFailure":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["threw","timeLimit","memory","crashed","drewNothing"]},"detail":{"type":"string"}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"progress":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"queued"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"generating"},"since":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","since"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"finishing"},"since":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","since"],"additionalProperties":false}]},{"type":"null"}]},"reported":{"type":"boolean"}},"required":["index","state","assetId","failureReason","effectFailure","progress","reported"],"additionalProperties":false}},"cancelable":{"type":"boolean"},"destination":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"recordId":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]}},"required":["documentId","recordId"],"additionalProperties":false},{"type":"null"}]},"modelId":{"anyOf":[{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},{"type":"null"}]},"prompt":{"type":"string"},"negativePrompt":{"type":["string","null"]},"othersApp":{"anyOf":[{"type":"object","properties":{"title":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"appId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"label":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"value":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"file"},"assetId":{"type":"string","minLength":1}},"required":["kind","assetId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text"},"text":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"entry"},"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["kind","entryId"],"additionalProperties":false}]}},"required":["label","value"],"additionalProperties":false}}},"required":["title","appId","versionId","runId","creator","fields"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"completedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["generationId","capability","mediaKind","quality","state","failureReason","count","multiOutput","outputs","cancelable","destination","modelId","prompt","negativePrompt","othersApp","createdAt","completedAt"],"additionalProperties":false},"intent":{"anyOf":[{"type":"object","properties":{"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":64000},"en":{"type":"string","maxLength":64000}},"additionalProperties":false},"mentions":{"default":[],"maxItems":15,"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"include":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"exclude":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"description":{"type":"string","maxLength":4000},"promptText":{"type":"string","maxLength":2000},"negativeText":{"type":"string","maxLength":2000}},"required":["entryId"],"additionalProperties":false}},"references":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},"role":{"type":"string","enum":["characterDesign","style","reference"]}},"required":["ref","role"],"additionalProperties":false}},"keyframes":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},"required":["atMs","ref"],"additionalProperties":false}},"aspect":{"type":"string","pattern":"^[1-9][0-9]?:[1-9][0-9]?$"},"negativePrompt":{"type":"string","maxLength":64000},"palette":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"weight":{"type":"number","exclusiveMinimum":0,"maximum":100}},"required":["color"],"additionalProperties":false}},"regions":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"left":{"type":"number","minimum":0,"maximum":1},"top":{"type":"number","minimum":0,"maximum":1},"right":{"type":"number","minimum":0,"maximum":1},"bottom":{"type":"number","minimum":0,"maximum":1},"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false}},"required":["left","top","right","bottom"],"additionalProperties":false}},"extend":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":2},"right":{"type":"number","minimum":0,"maximum":2},"bottom":{"type":"number","minimum":0,"maximum":2},"left":{"type":"number","minimum":0,"maximum":2}},"required":["top","right","bottom","left"],"additionalProperties":false},"details":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"seed":{"type":"integer","minimum":0,"maximum":9007199254740991},"loras":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"weight":{"type":"number","minimum":-4,"maximum":4}},"required":["model","weight"],"additionalProperties":false}},"params":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}}]}}}]}}},"additionalProperties":false}},"required":["prompt","mentions"],"additionalProperties":false},{"type":"null"}]},"model":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"by":{"anyOf":[{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["accountId","name"],"additionalProperties":false},{"type":"null"}]},"seconds":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"text":{"type":["string","null"]},"generating":{"type":"boolean"},"outputs":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"asset":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["image","video","audio","mesh","font","bundle"]},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"sha256":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"hasAudio":{"type":["boolean","null"]},"hasAlpha":{"type":["boolean","null"]},"placeholder":{"type":["string","null"]},"state":{"type":"string","enum":["waiting","uploading","processing","ready","failed","blocked"]},"uploadingUntil":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"failure":{"anyOf":[{"type":"string","enum":["notUploaded","sizeMismatch","checksumMismatch","unsupportedType","tooManyPixels","decodeFailed","verifyFailed"]},{"type":"null"}]},"moderation":{"type":"string","enum":["pending","passed","blocked","unchecked","none"]},"variants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["name","mediaType","bytes","width","height"],"additionalProperties":false}},"fileAccess":{"anyOf":[{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"grant":{"type":"string","pattern":"^m\\.[A-Za-z0-9_-]{8}\\.[A-Za-z0-9_-]{86}$"},"lentTo":{"type":"string","minLength":1}},"required":["baseUrl","grant"],"additionalProperties":false},{"type":"null"}]},"source":{"type":"string","enum":["upload","generation","render","join","fork","copy"]},"filename":{"type":["string","null"]},"madeFrom":{"anyOf":[{"type":"object","properties":{"runId":{"type":"string","minLength":1},"assetIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["runId","assetIds"],"additionalProperties":false},{"type":"null"}]},"drawnFrom":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"lang":{"type":"string","enum":["ja","en"]},"frameId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["documentId","revision","lang"],"additionalProperties":false},{"type":"null"}]},"favorite":{"type":"boolean"},"origin":{"type":"string","enum":["human","ai"]},"createdBy":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"creatorKind":{"type":"string","enum":["person","connection","system"]},"own":{"type":"boolean"},"deletable":{"type":"boolean"},"createdAt":{"type":"number","minimum":0},"deleted":{"anyOf":[{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"purgeAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["at","purgeAt"],"additionalProperties":false},{"type":"null"}]}},"required":["assetId","workspaceId","kind","mediaType","bytes","sha256","width","height","durationMs","hasAudio","hasAlpha","placeholder","state","uploadingUntil","failure","moderation","variants","fileAccess","source","filename","madeFrom","drawnFrom","favorite","origin","createdBy","creatorKind","own","deletable","createdAt","deleted"],"additionalProperties":false}},"required":["index","asset"],"additionalProperties":false}},"repeatable":{"type":"boolean"},"session":{"anyOf":[{"type":"object","properties":{"sessionId":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["sessionId","title"],"additionalProperties":false},{"type":"null"}]},"document":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["documentId","title"],"additionalProperties":false},{"type":"null"}]}},"required":["kind","at","generation","intent","model","by","seconds","text","generating","outputs","repeatable","session","document"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"run"},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"runId":{"type":"string","minLength":1},"document":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["documentId","title"],"additionalProperties":false},{"type":"null"}]},"app":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["appId","title"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["running","waiting","done","failed","canceled"]},"asking":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]},"cancelReason":{"type":"string","enum":["removed","expired","nodeRemoved","stalled"]},"mediaKind":{"type":"string","enum":["image","video","audio","other"]},"generations":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"generation"},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"generation":{"type":"object","properties":{"generationId":{"type":"string","minLength":1},"capability":{"anyOf":[{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},{"type":"null"}]},"mediaKind":{"type":"string","enum":["image","video","audio","mesh","other"]},"quality":{"anyOf":[{"type":"string","enum":["fast","high"]},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","done","failed","canceled"]},"failureReason":{"anyOf":[{"type":"string","enum":["blocked","refused","unavailable","timedOut","failed"]},{"type":"null"}]},"count":{"type":"integer","minimum":1,"maximum":9007199254740991},"multiOutput":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"set"},"outputCount":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","outputCount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"layers"},"format":{"type":"string","enum":["pages","boxes"]},"outputCount":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","format","outputCount"],"additionalProperties":false}]},{"type":"null"}]},"outputs":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["pending","delivered","failed","blocked","canceled"]},"assetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"failureReason":{"anyOf":[{"type":"string","enum":["blocked","refused","unavailable","timedOut","failed"]},{"type":"null"}]},"effectFailure":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["threw","timeLimit","memory","crashed","drewNothing"]},"detail":{"type":"string"}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"progress":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"queued"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"generating"},"since":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","since"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"finishing"},"since":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","since"],"additionalProperties":false}]},{"type":"null"}]},"reported":{"type":"boolean"}},"required":["index","state","assetId","failureReason","effectFailure","progress","reported"],"additionalProperties":false}},"cancelable":{"type":"boolean"},"destination":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"recordId":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]}},"required":["documentId","recordId"],"additionalProperties":false},{"type":"null"}]},"modelId":{"anyOf":[{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},{"type":"null"}]},"prompt":{"type":"string"},"negativePrompt":{"type":["string","null"]},"othersApp":{"anyOf":[{"type":"object","properties":{"title":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"appId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"label":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"value":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"file"},"assetId":{"type":"string","minLength":1}},"required":["kind","assetId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text"},"text":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"entry"},"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["kind","entryId"],"additionalProperties":false}]}},"required":["label","value"],"additionalProperties":false}}},"required":["title","appId","versionId","runId","creator","fields"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"completedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["generationId","capability","mediaKind","quality","state","failureReason","count","multiOutput","outputs","cancelable","destination","modelId","prompt","negativePrompt","othersApp","createdAt","completedAt"],"additionalProperties":false},"intent":{"anyOf":[{"type":"object","properties":{"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":64000},"en":{"type":"string","maxLength":64000}},"additionalProperties":false},"mentions":{"default":[],"maxItems":15,"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"include":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"exclude":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"description":{"type":"string","maxLength":4000},"promptText":{"type":"string","maxLength":2000},"negativeText":{"type":"string","maxLength":2000}},"required":["entryId"],"additionalProperties":false}},"references":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},"role":{"type":"string","enum":["characterDesign","style","reference"]}},"required":["ref","role"],"additionalProperties":false}},"keyframes":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},"required":["atMs","ref"],"additionalProperties":false}},"aspect":{"type":"string","pattern":"^[1-9][0-9]?:[1-9][0-9]?$"},"negativePrompt":{"type":"string","maxLength":64000},"palette":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"weight":{"type":"number","exclusiveMinimum":0,"maximum":100}},"required":["color"],"additionalProperties":false}},"regions":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"left":{"type":"number","minimum":0,"maximum":1},"top":{"type":"number","minimum":0,"maximum":1},"right":{"type":"number","minimum":0,"maximum":1},"bottom":{"type":"number","minimum":0,"maximum":1},"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false}},"required":["left","top","right","bottom"],"additionalProperties":false}},"extend":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":2},"right":{"type":"number","minimum":0,"maximum":2},"bottom":{"type":"number","minimum":0,"maximum":2},"left":{"type":"number","minimum":0,"maximum":2}},"required":["top","right","bottom","left"],"additionalProperties":false},"details":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"seed":{"type":"integer","minimum":0,"maximum":9007199254740991},"loras":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"weight":{"type":"number","minimum":-4,"maximum":4}},"required":["model","weight"],"additionalProperties":false}},"params":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}}]}}}]}}},"additionalProperties":false}},"required":["prompt","mentions"],"additionalProperties":false},{"type":"null"}]},"model":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"by":{"anyOf":[{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["accountId","name"],"additionalProperties":false},{"type":"null"}]},"seconds":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"text":{"type":["string","null"]},"generating":{"type":"boolean"},"outputs":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"asset":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["image","video","audio","mesh","font","bundle"]},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"sha256":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"hasAudio":{"type":["boolean","null"]},"hasAlpha":{"type":["boolean","null"]},"placeholder":{"type":["string","null"]},"state":{"type":"string","enum":["waiting","uploading","processing","ready","failed","blocked"]},"uploadingUntil":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"failure":{"anyOf":[{"type":"string","enum":["notUploaded","sizeMismatch","checksumMismatch","unsupportedType","tooManyPixels","decodeFailed","verifyFailed"]},{"type":"null"}]},"moderation":{"type":"string","enum":["pending","passed","blocked","unchecked","none"]},"variants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["name","mediaType","bytes","width","height"],"additionalProperties":false}},"fileAccess":{"anyOf":[{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"grant":{"type":"string","pattern":"^m\\.[A-Za-z0-9_-]{8}\\.[A-Za-z0-9_-]{86}$"},"lentTo":{"type":"string","minLength":1}},"required":["baseUrl","grant"],"additionalProperties":false},{"type":"null"}]},"source":{"type":"string","enum":["upload","generation","render","join","fork","copy"]},"filename":{"type":["string","null"]},"madeFrom":{"anyOf":[{"type":"object","properties":{"runId":{"type":"string","minLength":1},"assetIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["runId","assetIds"],"additionalProperties":false},{"type":"null"}]},"drawnFrom":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"lang":{"type":"string","enum":["ja","en"]},"frameId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["documentId","revision","lang"],"additionalProperties":false},{"type":"null"}]},"favorite":{"type":"boolean"},"origin":{"type":"string","enum":["human","ai"]},"createdBy":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"creatorKind":{"type":"string","enum":["person","connection","system"]},"own":{"type":"boolean"},"deletable":{"type":"boolean"},"createdAt":{"type":"number","minimum":0},"deleted":{"anyOf":[{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"purgeAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["at","purgeAt"],"additionalProperties":false},{"type":"null"}]}},"required":["assetId","workspaceId","kind","mediaType","bytes","sha256","width","height","durationMs","hasAudio","hasAlpha","placeholder","state","uploadingUntil","failure","moderation","variants","fileAccess","source","filename","madeFrom","drawnFrom","favorite","origin","createdBy","creatorKind","own","deletable","createdAt","deleted"],"additionalProperties":false}},"required":["index","asset"],"additionalProperties":false}},"repeatable":{"type":"boolean"},"session":{"anyOf":[{"type":"object","properties":{"sessionId":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["sessionId","title"],"additionalProperties":false},{"type":"null"}]},"document":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["documentId","title"],"additionalProperties":false},{"type":"null"}]}},"required":["kind","at","generation","intent","model","by","seconds","text","generating","outputs","repeatable","session","document"],"additionalProperties":false}}},"required":["kind","at","runId","document","app","state","asking","mediaKind","generations"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"file"},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"asset":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["image","video","audio","mesh","font","bundle"]},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"sha256":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"hasAudio":{"type":["boolean","null"]},"hasAlpha":{"type":["boolean","null"]},"placeholder":{"type":["string","null"]},"state":{"type":"string","enum":["waiting","uploading","processing","ready","failed","blocked"]},"uploadingUntil":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"failure":{"anyOf":[{"type":"string","enum":["notUploaded","sizeMismatch","checksumMismatch","unsupportedType","tooManyPixels","decodeFailed","verifyFailed"]},{"type":"null"}]},"moderation":{"type":"string","enum":["pending","passed","blocked","unchecked","none"]},"variants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["name","mediaType","bytes","width","height"],"additionalProperties":false}},"fileAccess":{"anyOf":[{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"grant":{"type":"string","pattern":"^m\\.[A-Za-z0-9_-]{8}\\.[A-Za-z0-9_-]{86}$"},"lentTo":{"type":"string","minLength":1}},"required":["baseUrl","grant"],"additionalProperties":false},{"type":"null"}]},"source":{"type":"string","enum":["upload","generation","render","join","fork","copy"]},"filename":{"type":["string","null"]},"madeFrom":{"anyOf":[{"type":"object","properties":{"runId":{"type":"string","minLength":1},"assetIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["runId","assetIds"],"additionalProperties":false},{"type":"null"}]},"drawnFrom":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"lang":{"type":"string","enum":["ja","en"]},"frameId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["documentId","revision","lang"],"additionalProperties":false},{"type":"null"}]},"favorite":{"type":"boolean"},"origin":{"type":"string","enum":["human","ai"]},"createdBy":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"creatorKind":{"type":"string","enum":["person","connection","system"]},"own":{"type":"boolean"},"deletable":{"type":"boolean"},"createdAt":{"type":"number","minimum":0},"deleted":{"anyOf":[{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"purgeAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["at","purgeAt"],"additionalProperties":false},{"type":"null"}]}},"required":["assetId","workspaceId","kind","mediaType","bytes","sha256","width","height","durationMs","hasAudio","hasAlpha","placeholder","state","uploadingUntil","failure","moderation","variants","fileAccess","source","filename","madeFrom","drawnFrom","favorite","origin","createdBy","creatorKind","own","deletable","createdAt","deleted"],"additionalProperties":false}},"required":["kind","at","asset"],"additionalProperties":false}]},{"type":"null"}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.asset.search":{"post":{"operationId":"media.asset.search","summary":"Search a workspace’s media and documents by words, filters, or similarity (`similarTo`, which overrides `query`). Each result is a stack.","tags":["media"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"query":{"type":"string","maxLength":200},"type":{"type":"string","enum":["image","video","audio","mesh","document"]},"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"workId":{"type":"string","minLength":1},"collectionId":{"anyOf":[{"type":"string","minLength":1},{"type":"string","const":"none"}]},"createdBy":{"type":"string","minLength":1},"source":{"type":"string","enum":["generated","uploaded"]},"favorite":{"type":"boolean","const":true},"unused":{"type":"boolean","const":true},"madeWith":{"type":"string","minLength":1},"shows":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"aspect":{"type":"string","enum":["portrait","landscape","square","wide","tall"]},"transparent":{"type":"boolean","const":true},"similarTo":{"type":"string","minLength":1}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"stackId":{"type":"string"},"kind":{"type":"string","enum":["generation","file","document"]},"type":{"type":"string","enum":["image","video","audio","mesh","document"]},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"assetIds":{"type":"array","items":{"type":"string","minLength":1}},"title":{"type":"string","maxLength":120},"model":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"favorite":{"type":"boolean"},"document":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["comicPage","prose","canvas","storyboard","entry"]}},"required":["documentId","kind"],"additionalProperties":false},{"type":"null"}]}},"required":["stackId","kind","type","at","count","assetIds","title","model","favorite","document"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.asset.choices":{"post":{"operationId":"media.asset.choices","summary":"List the choices in the filters of Assets: the models used, the people who made something, the works and collections, and whether word search and similarity search are available.","tags":["media"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"search":{"type":"boolean"},"meaning":{"type":"boolean"},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["id","name"],"additionalProperties":false}},"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["id","name"],"additionalProperties":false}},"works":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["id","name"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["id","name"],"additionalProperties":false}}},"required":["search","meaning","models","people","works","collections"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.asset.links":{"post":{"operationId":"media.asset.links","summary":"List the entries linked to an asset: entries it was made with, entries a person marked it as showing, and entries that use it as a reference.","tags":["media"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"documentId":{"type":"string","minLength":1},"type":{"type":"string"},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"relation":{"type":"string","enum":["madeWith","shows","reference"]},"variants":{"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"rev":{"type":"integer","minimum":0,"maximum":9007199254740991},"generationId":{"type":"string","minLength":1}},"required":["entryId","documentId","names","relation","variants"],"additionalProperties":false}},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.shows.set":{"post":{"operationId":"media.shows.set","summary":"Set or clear whether every file of the given stacks in Assets shows an entry.","tags":["media"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stackIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"entryId":{"type":"string","minLength":1},"shows":{"type":"boolean"}},"required":["stackIds","entryId","shows"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/media.shows.count":{"post":{"operationId":"media.shows.count","summary":"Count the files of the given stacks in Assets, and how many of them are marked as showing each entry.","tags":["media"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stackIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},"required":["stackIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"assets":{"type":"integer","minimum":0,"maximum":9007199254740991},"entries":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["entryId","count"],"additionalProperties":false}}},"required":["assets","entries"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/canon.entry.create":{"post":{"operationId":"canon.entry.create","summary":"Add a saved entry to the workspace, with optional person part and first variant. Edit it afterward with document_apply.","tags":["canon"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"names":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"type":{"type":"string","minLength":1,"maxLength":40},"summary":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false},"person":{"type":"boolean"},"format":{"type":"object","properties":{"trim":{"type":"object","properties":{"w":{"type":"number","exclusiveMinimum":0,"maximum":100000},"h":{"type":"number","exclusiveMinimum":0,"maximum":100000},"unit":{"type":"string","enum":["mm","px"]}},"required":["w","h","unit"],"additionalProperties":false},"dpi":{"type":"integer","minimum":72,"maximum":1200},"bleedMm":{"type":"number","minimum":0,"maximum":50},"safeArea":{"type":"array","prefixItems":[{"type":"number","minimum":0,"maximum":10000},{"type":"number","minimum":0,"maximum":10000},{"type":"number","minimum":0,"maximum":10000},{"type":"number","minimum":0,"maximum":10000}],"items":false,"minItems":4,"maxItems":4},"spine":{"type":"object","properties":{"pages":{"type":"integer","minimum":2,"maximum":2000},"paperMicrons":{"type":"number","exclusiveMinimum":0,"maximum":2000}},"required":["pages","paperMicrons"],"additionalProperties":false},"presetId":{"type":"string","pattern":"^[a-z][A-Za-z0-9]*\\.[a-z0-9][A-Za-z0-9.-]{0,47}$"}},"required":["trim","dpi","bleedMm","safeArea"],"additionalProperties":false},"collectionId":{"type":"string","minLength":1},"variant":{"type":"object","properties":{"name":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"references":{"default":[],"maxItems":24,"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"label":{"type":"string","minLength":1,"maxLength":40}},"required":["assetId","role"],"additionalProperties":false}},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false},"promptText":{"type":"string","maxLength":2000},"negativeText":{"type":"string","maxLength":2000},"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"loras":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"weight":{"type":"number","minimum":-4,"maximum":4}},"required":["model","weight"],"additionalProperties":false}},"modelSettings":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}}]}}}]}}},"palette":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"weight":{"type":"number","exclusiveMinimum":0,"maximum":100}},"required":["color"],"additionalProperties":false}}},"required":["name"],"additionalProperties":false},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["names"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"documentId":{"type":"string","minLength":1}},"required":["entryId","documentId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/canon.entry.asOf":{"post":{"operationId":"canon.entry.asOf","summary":"Read an entry as its author sees it as of an episode: variants with the one in use, then details and relationships with spans, a page at a time. Text is the author’s material.","tags":["canon"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"episodeId":{"type":"string","minLength":1},"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]}},"required":["documentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"entry":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"documentId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"type":{"type":"string"},"hasPerson":{"type":"boolean"},"isModifier":{"type":"boolean"},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"readings":{"type":"array","items":{"type":"string"}},"aliases":{"type":"array","items":{"type":"string"}},"summary":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"role":{"type":"string"},"collectionIds":{"type":"array","items":{"type":"string","minLength":1}},"reveal":{"anyOf":[{"type":"object","properties":{"episodeId":{"type":"string","minLength":1}},"required":["episodeId"],"additionalProperties":false},{"type":"object","properties":{"worldId":{"type":"string","minLength":1},"momentId":{"type":"string","minLength":1}},"required":["worldId","momentId"],"additionalProperties":false}]},"thumbnailAssetId":{"type":"string","minLength":1},"avatar":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"crop":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0,"maximum":1},"height":{"type":"number","minimum":0,"maximum":1}},"required":["x","y","width","height"],"additionalProperties":false}},"required":["assetId","crop"],"additionalProperties":false},"format":{"type":"object","properties":{"trim":{"type":"object","properties":{"w":{"type":"number","exclusiveMinimum":0,"maximum":100000},"h":{"type":"number","exclusiveMinimum":0,"maximum":100000},"unit":{"type":"string","enum":["mm","px"]}},"required":["w","h","unit"],"additionalProperties":false},"dpi":{"type":"integer","minimum":72,"maximum":1200},"bleedMm":{"type":"number","minimum":0,"maximum":50},"safeArea":{"type":"array","prefixItems":[{"type":"number","minimum":0,"maximum":10000},{"type":"number","minimum":0,"maximum":10000},{"type":"number","minimum":0,"maximum":10000},{"type":"number","minimum":0,"maximum":10000}],"items":false,"minItems":4,"maxItems":4},"spine":{"type":"object","properties":{"pages":{"type":"integer","minimum":2,"maximum":2000},"paperMicrons":{"type":"number","exclusiveMinimum":0,"maximum":2000}},"required":["pages","paperMicrons"],"additionalProperties":false},"presetId":{"type":"string","pattern":"^[a-z][A-Za-z0-9]*\\.[a-z0-9][A-Za-z0-9.-]{0,47}$"}},"required":["trim","dpi","bleedMm","safeArea"],"additionalProperties":false},"linkedMaterial":{"type":"object","properties":{"listingId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"linkId":{"type":"string","minLength":1}},"required":["listingId","versionId","linkId"],"additionalProperties":false}},"required":["entryId","documentId","workspaceId","hasPerson","isModifier","names","readings","aliases","summary","collectionIds"],"additionalProperties":false},"episodeId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"unpublishedChanges":{"type":"boolean"},"details":{"type":"array","items":{"type":"object","properties":{"recordId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"label":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"value":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"from":{"anyOf":[{"type":"object","properties":{"episodeId":{"type":"string","minLength":1}},"required":["episodeId"],"additionalProperties":false},{"type":"object","properties":{"worldId":{"type":"string","minLength":1},"momentId":{"type":"string","minLength":1}},"required":["worldId","momentId"],"additionalProperties":false}]},"until":{"anyOf":[{"type":"object","properties":{"episodeId":{"type":"string","minLength":1}},"required":["episodeId"],"additionalProperties":false},{"type":"object","properties":{"worldId":{"type":"string","minLength":1},"momentId":{"type":"string","minLength":1}},"required":["worldId","momentId"],"additionalProperties":false}]},"studioOnly":{"type":"boolean"},"state":{"type":"string","enum":["before","in","ended"]}},"required":["recordId","label","value","studioOnly","state"],"additionalProperties":false}},"relationships":{"type":"array","items":{"type":"object","properties":{"recordId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"to":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"type":{"type":"string"},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["entryId","names"],"additionalProperties":false},"relation":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"callName":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"from":{"anyOf":[{"type":"object","properties":{"episodeId":{"type":"string","minLength":1}},"required":["episodeId"],"additionalProperties":false},{"type":"object","properties":{"worldId":{"type":"string","minLength":1},"momentId":{"type":"string","minLength":1}},"required":["worldId","momentId"],"additionalProperties":false}]},"until":{"anyOf":[{"type":"object","properties":{"episodeId":{"type":"string","minLength":1}},"required":["episodeId"],"additionalProperties":false},{"type":"object","properties":{"worldId":{"type":"string","minLength":1},"momentId":{"type":"string","minLength":1}},"required":["worldId","momentId"],"additionalProperties":false}]},"state":{"type":"string","enum":["before","in","ended"]}},"required":["recordId","to","relation","state"],"additionalProperties":false}},"variants":{"type":"array","items":{"type":"object","properties":{"recordId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"basedOn":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"description":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"promptText":{"type":"string"},"negativeText":{"type":"string"},"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"loras":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"weight":{"type":"number","minimum":-4,"maximum":4}},"required":["model","weight"],"additionalProperties":false}},"modelSettings":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}}]}}}]}}},"palette":{"type":"array","items":{"type":"object","properties":{"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"weight":{"type":"number","exclusiveMinimum":0,"maximum":100}},"required":["color"],"additionalProperties":false}},"references":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"label":{"type":"string","minLength":1,"maxLength":40}},"required":["assetId","role"],"additionalProperties":false}},"from":{"anyOf":[{"type":"object","properties":{"episodeId":{"type":"string","minLength":1}},"required":["episodeId"],"additionalProperties":false},{"type":"object","properties":{"worldId":{"type":"string","minLength":1},"momentId":{"type":"string","minLength":1}},"required":["worldId","momentId"],"additionalProperties":false}]},"started":{"type":"boolean"}},"required":["recordId","names","description","loras","references","started"],"additionalProperties":false}},"variantInUse":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]},"chat":{"type":"object","properties":{"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}}},"required":["flags"],"additionalProperties":false},"cursor":{"type":["string","null"]}},"required":["entry","episodeId","unpublishedChanges","details","relationships","variants","variantInUse","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/canon.entry.search":{"post":{"operationId":"canon.entry.search","summary":"Search entries by any part of a name, reading or alias, in any kana or width: a given collection’s entries first, then the rest of the workspace. Entry text is the author’s material.","tags":["canon"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"text":{"default":"","type":"string","maxLength":64},"types":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","maxLength":40}},"hasPerson":{"type":"boolean"},"isModifier":{"type":"boolean"},"collectionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"documentId":{"type":"string","minLength":1},"type":{"type":"string"},"hasPerson":{"type":"boolean"},"isModifier":{"type":"boolean"},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"aliases":{"type":"array","items":{"type":"string"}},"summary":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"collectionIds":{"type":"array","items":{"type":"string","minLength":1}},"thumbnailAssetId":{"type":"string","minLength":1},"format":{"type":"object","properties":{"trim":{"type":"object","properties":{"w":{"type":"number","exclusiveMinimum":0,"maximum":100000},"h":{"type":"number","exclusiveMinimum":0,"maximum":100000},"unit":{"type":"string","enum":["mm","px"]}},"required":["w","h","unit"],"additionalProperties":false},"dpi":{"type":"integer","minimum":72,"maximum":1200},"bleedMm":{"type":"number","minimum":0,"maximum":50},"safeArea":{"type":"array","prefixItems":[{"type":"number","minimum":0,"maximum":10000},{"type":"number","minimum":0,"maximum":10000},{"type":"number","minimum":0,"maximum":10000},{"type":"number","minimum":0,"maximum":10000}],"items":false,"minItems":4,"maxItems":4},"spine":{"type":"object","properties":{"pages":{"type":"integer","minimum":2,"maximum":2000},"paperMicrons":{"type":"number","exclusiveMinimum":0,"maximum":2000}},"required":["pages","paperMicrons"],"additionalProperties":false},"presetId":{"type":"string","pattern":"^[a-z][A-Za-z0-9]*\\.[a-z0-9][A-Za-z0-9.-]{0,47}$"}},"required":["trim","dpi","bleedMm","safeArea"],"additionalProperties":false}},"required":["entryId","documentId","hasPerson","isModifier","names","aliases","summary","collectionIds"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/canon.entry.publish":{"post":{"operationId":"canon.entry.publish","summary":"Publish an entry’s changes to readers. Its public page, chat and the guide then show the entry as it is now.","tags":["canon"],"x-qmoon-action":"publish","x-qmoon-scope":"publish","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/canon.entry.duplicate":{"post":{"operationId":"canon.entry.duplicate","summary":"Duplicate an entry in the same workspace, with its records, under a marked name.","tags":["canon"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["documentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"documentId":{"type":"string","minLength":1}},"required":["entryId","documentId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/canon.work.story":{"post":{"operationId":"canon.work.story","summary":"Read the story so far: a work’s episodes in order with their summaries, up to and including an episode, a page at a time. Summaries are the author’s, never shown to readers.","tags":["canon"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"workId":{"type":"string","minLength":1},"until":{"type":"string","minLength":1}},"required":["workId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"titles":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"number":{"type":"integer","minimum":1,"maximum":9007199254740991},"summary":{"type":"string"}},"required":["episodeId","titles","summary"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/canon.appearance.list":{"post":{"operationId":"canon.appearance.list","summary":"List the episodes an entry appears in, a page at a time, each work’s in order: where a unit names it, or the text says its name and the author kept it. Drafts count.","tags":["canon"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"documentId":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"titles":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"number":{"type":"integer","minimum":1,"maximum":9007199254740991},"workId":{"type":"string","minLength":1}},"required":["episodeId","titles","workId"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/canon.cast.list":{"post":{"operationId":"canon.cast.list","summary":"List an episode’s cast entries, a page at a time. Each says where (a unit, or only a chapter’s text).","tags":["canon"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"episodeId":{"type":"string","minLength":1}},"required":["episodeId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"documentId":{"type":"string","minLength":1},"type":{"type":"string"},"hasPerson":{"type":"boolean"},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"source":{"type":"string","enum":["unit","text"]}},"required":["entryId","documentId","hasPerson","names","source"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/canon.episode.removeFromCast":{"post":{"operationId":"canon.episode.removeFromCast","summary":"Take an entry an episode names only in its text out of the studio’s cast, and keep it out. Readers see it once the episode is published.","tags":["canon"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"entryId":{"type":"string","minLength":1}},"required":["episodeId","entryId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/canon.entry.names":{"post":{"operationId":"canon.entry.names","summary":"Read entries by entry id: each one’s type, person flag, modifier flag, names and document, for canon_get. An id that names no entry is left out, and the rest keep the order asked.","tags":["canon"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entryIds":{"maxItems":30,"type":"array","items":{"type":"string","minLength":1}}},"required":["entryIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"documentId":{"type":"string","minLength":1},"type":{"type":"string"},"hasPerson":{"type":"boolean"},"isModifier":{"type":"boolean"},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["entryId","documentId","hasPerson","isModifier","names"],"additionalProperties":false}}},"required":["entries"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/canon.site.characters":{"post":{"operationId":"canon.site.characters","summary":"Read the site’s Characters section in one language: characters open for chat, ranked this week and all time, and the newest.","tags":["canon"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lang":{"type":"string","enum":["ja","en"]}},"required":["lang"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"open":{"type":"boolean"},"week":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"name":{"type":"string"},"summary":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"chat":{"anyOf":[{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},{"type":"null"}]},"creator":{"type":"object","properties":{"handle":{"type":["string","null"]},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},"workspaceId":{"type":"string","minLength":1}},"required":["entryId","name","summary","image","chat","creator","workspaceId"],"additionalProperties":false}},"all":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"name":{"type":"string"},"summary":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"chat":{"anyOf":[{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},{"type":"null"}]},"creator":{"type":"object","properties":{"handle":{"type":["string","null"]},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},"workspaceId":{"type":"string","minLength":1}},"required":["entryId","name","summary","image","chat","creator","workspaceId"],"additionalProperties":false}},"newest":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"name":{"type":"string"},"summary":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"chat":{"anyOf":[{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},{"type":"null"}]},"creator":{"type":"object","properties":{"handle":{"type":["string","null"]},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},"workspaceId":{"type":"string","minLength":1}},"required":["entryId","name","summary","image","chat","creator","workspaceId"],"additionalProperties":false}}},"required":["open","week","all","newest"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/canon.site.character":{"post":{"operationId":"canon.site.character","summary":"Read a character’s public page in one language: images, works, creator, and what readers know as of the first episode.","tags":["canon"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"lang":{"type":"string","enum":["ja","en"]}},"required":["entryId","lang"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"anyOf":[{"type":"object","properties":{"card":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"name":{"type":"string"},"summary":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"chat":{"anyOf":[{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},{"type":"null"}]},"creator":{"type":"object","properties":{"handle":{"type":["string","null"]},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},"workspaceId":{"type":"string","minLength":1}},"required":["entryId","name","summary","image","chat","creator","workspaceId"],"additionalProperties":false},"workspaceId":{"type":"string","minLength":1},"workId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"works":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}},"metadata":{"type":"object","properties":{"summary":{"type":"string"},"role":{"type":["string","null"]},"details":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"additionalProperties":false}},"variants":{"type":"array","items":{"type":"object","properties":{"recordId":{"type":"string"},"name":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"privateImage":{"anyOf":[{"type":"object","properties":{"placeholder":{"type":["string","null"]}},"required":["placeholder"],"additionalProperties":false},{"type":"null"}]}},"required":["recordId","name","image","privateImage"],"additionalProperties":false}}},"required":["summary","role","details","variants"],"additionalProperties":false}},"required":["card","workspaceId","workId","works","metadata"],"additionalProperties":false},{"type":"null"}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/canon.site.revealedCharacter":{"post":{"operationId":"canon.site.revealedCharacter","summary":"Read what a signed-in reader knows about a character, up to the furthest episode they read, in one language.","tags":["canon"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"lang":{"type":"string","enum":["ja","en"]}},"required":["entryId","lang"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"anyOf":[{"type":"object","properties":{"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"metadata":{"type":"object","properties":{"summary":{"type":"string"},"role":{"type":["string","null"]},"details":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"additionalProperties":false}},"variants":{"type":"array","items":{"type":"object","properties":{"recordId":{"type":"string"},"name":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"privateImage":{"anyOf":[{"type":"object","properties":{"placeholder":{"type":["string","null"]}},"required":["placeholder"],"additionalProperties":false},{"type":"null"}]}},"required":["recordId","name","image","privateImage"],"additionalProperties":false}}},"required":["summary","role","details","variants"],"additionalProperties":false}},"required":["number","metadata"],"additionalProperties":false},{"type":"null"}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/canon.site.revealedImages":{"post":{"operationId":"canon.site.revealedImages","summary":"Get links to a character’s variant images that aren’t public, for the variants a signed-in reader has reached, valid for minutes.","tags":["canon"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"lang":{"type":"string","enum":["ja","en"]}},"required":["entryId","lang"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"images":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"image":{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false}},"required":["key","image"],"additionalProperties":false}},"expiresIn":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["images","expiresIn"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.collection.create":{"post":{"operationId":"collections.collection.create","summary":"Create a collection in the workspace to group entries, assets, documents and works. Include story to make it a World with shared story moments.","tags":["collections"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"names":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false},"story":{"type":"object","properties":{"premise":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false}},"additionalProperties":false},"defaultStyleId":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["names"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"collectionId":{"type":"string","minLength":1}},"required":["collectionId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.collection.list":{"post":{"operationId":"collections.collection.list","summary":"List the workspace’s collections in order, or only its Worlds when worldsOnly is true.","tags":["collections"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"worldsOnly":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"collectionId":{"type":"string","minLength":1},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"defaultStyle":{"anyOf":[{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"documentId":{"type":"string","minLength":1},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["entryId","documentId","names"],"additionalProperties":false},{"type":"null"}]},"story":{"anyOf":[{"type":"object","properties":{"premise":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["premise"],"additionalProperties":false},{"type":"null"}]},"counts":{"type":"object","properties":{"entries":{"type":"integer","minimum":0,"maximum":9007199254740991},"assets":{"type":"integer","minimum":0,"maximum":9007199254740991},"documents":{"type":"integer","minimum":0,"maximum":9007199254740991},"works":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["entries","assets","documents","works"],"additionalProperties":false}},"required":["collectionId","names","description","defaultStyle","story","counts"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.collection.get":{"post":{"operationId":"collections.collection.get","summary":"Read one collection or World by id, including its default style, story premise and member counts.","tags":["collections"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","minLength":1}},"required":["collectionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"collectionId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"defaultStyle":{"anyOf":[{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"documentId":{"type":"string","minLength":1},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["entryId","documentId","names"],"additionalProperties":false},{"type":"null"}]},"story":{"anyOf":[{"type":"object","properties":{"premise":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["premise"],"additionalProperties":false},{"type":"null"}]},"counts":{"type":"object","properties":{"entries":{"type":"integer","minimum":0,"maximum":9007199254740991},"assets":{"type":"integer","minimum":0,"maximum":9007199254740991},"documents":{"type":"integer","minimum":0,"maximum":9007199254740991},"works":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["entries","assets","documents","works"],"additionalProperties":false},"deletable":{"type":"boolean"},"linkedMaterial":{"type":"object","properties":{"listingId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"linkId":{"type":"string","minLength":1}},"required":["listingId","versionId","linkId"],"additionalProperties":false}},"required":["collectionId","workspaceId","names","description","defaultStyle","story","counts","deletable"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.collection.update":{"post":{"operationId":"collections.collection.update","summary":"Update a collection’s name, description, default style or story settings.","tags":["collections"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","minLength":1},"names":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false},"defaultStyleId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"story":{"anyOf":[{"type":"object","properties":{"premise":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false}},"additionalProperties":false},{"type":"null"}]}},"required":["collectionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.collection.delete":{"post":{"operationId":"collections.collection.delete","summary":"Move a collection to Recently deleted for 30 days. Its entries, assets, documents and works stay intact in the workspace.","tags":["collections"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","minLength":1}},"required":["collectionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.collection.restore":{"post":{"operationId":"collections.collection.restore","summary":"Restore a collection from Recently deleted with the members still in the workspace.","tags":["collections"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","minLength":1}},"required":["collectionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.member.add":{"post":{"operationId":"collections.member.add","summary":"Add an entry, asset, document or work to a collection. A work can belong to at most one active World at a time.","tags":["collections"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","minLength":1},"member":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"entry"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"document"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"work"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}]},"after":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["collectionId","member"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"membershipId":{"type":"string","minLength":1}},"required":["membershipId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.member.remove":{"post":{"operationId":"collections.member.remove","summary":"Remove an entry, asset, document or work from a collection without deleting the item.","tags":["collections"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","minLength":1},"member":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"entry"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"document"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"work"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}]}},"required":["collectionId","member"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.member.reorder":{"post":{"operationId":"collections.member.reorder","summary":"Move a member to a new position inside a collection.","tags":["collections"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","minLength":1},"member":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"entry"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"document"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"work"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}]},"after":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["collectionId","member","after"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.member.list":{"post":{"operationId":"collections.member.list","summary":"List the members of a collection in order, optionally filtered by member kind.","tags":["collections"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"collectionId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["entry","asset","document","work"]}},"required":["collectionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"membershipId":{"type":"string","minLength":1},"collectionId":{"type":"string","minLength":1},"member":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"entry"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"document"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"work"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}]},"order":{"type":"string"},"addedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["membershipId","collectionId","member","order","addedAt"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.member.collections":{"post":{"operationId":"collections.member.collections","summary":"List the active collections and Worlds an entry, asset, document or work belongs to.","tags":["collections"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"member":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"entry"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"document"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"work"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}]}},"required":["member"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"collections":{"type":"array","items":{"type":"object","properties":{"collectionId":{"type":"string","minLength":1},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"isWorld":{"type":"boolean"},"defaultStyleId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["collectionId","names","isWorld","defaultStyleId"],"additionalProperties":false}}},"required":["collections"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.moment.list":{"post":{"operationId":"collections.moment.list","summary":"List a World’s ordered story moments and the episodes mapped to each moment.","tags":["collections"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"worldId":{"type":"string","minLength":1}},"required":["worldId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"momentId":{"type":"string","minLength":1},"worldId":{"type":"string","minLength":1},"order":{"type":"string"},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"episodes":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"workTitles":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"episodeId":{"type":"string","minLength":1},"titles":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"number":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["workId","workTitles","episodeId","titles"],"additionalProperties":false}}},"required":["momentId","worldId","order","episodes"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.moment.create":{"post":{"operationId":"collections.moment.create","summary":"Create a new story moment on a World’s timeline.","tags":["collections"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"worldId":{"type":"string","minLength":1},"name":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"after":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["worldId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"momentId":{"type":"string","minLength":1}},"required":["momentId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.moment.update":{"post":{"operationId":"collections.moment.update","summary":"Rename a World’s story moment, or clear its name with null.","tags":["collections"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"worldId":{"type":"string","minLength":1},"momentId":{"type":"string","minLength":1},"name":{"anyOf":[{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},{"type":"null"}]}},"required":["worldId","momentId","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.moment.reorder":{"post":{"operationId":"collections.moment.reorder","summary":"Move a story moment to a new position on the World’s timeline.","tags":["collections"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"worldId":{"type":"string","minLength":1},"momentId":{"type":"string","minLength":1},"after":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["worldId","momentId","after"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.moment.delete":{"post":{"operationId":"collections.moment.delete","summary":"Move a story moment to Recently deleted for 30 days and unlink any episodes placed on it. Restoring within 30 days preserves its id and dated facts.","tags":["collections"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"worldId":{"type":"string","minLength":1},"momentId":{"type":"string","minLength":1}},"required":["worldId","momentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.moment.restore":{"post":{"operationId":"collections.moment.restore","summary":"Restore a soft-deleted story moment within 30 days, keeping its exact id and re-attaching any unplaced episodes still in this World.","tags":["collections"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"worldId":{"type":"string","minLength":1},"momentId":{"type":"string","minLength":1}},"required":["worldId","momentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections.moment.setEpisode":{"post":{"operationId":"collections.moment.setEpisode","summary":"Place an episode of a work in a World onto one of that World’s moments, or clear its moment with null.","tags":["collections"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"worldId":{"type":"string","minLength":1},"episodeId":{"type":"string","minLength":1},"momentId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["worldId","episodeId","momentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/materials.listing.preview":{"post":{"operationId":"materials.listing.preview","summary":"Preview what publishing an entry, collection or template canvas will include, which studio-only details are removed, and any missing dependencies.","tags":["materials"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["entry","collection","template"]},"sourceId":{"type":"string","minLength":1}},"required":["kind","sourceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"ready":{"type":"boolean"},"kind":{"type":"string","enum":["entry","collection","template"]},"sourceId":{"type":"string"},"title":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"existingListing":{"anyOf":[{"type":"object","properties":{"listingId":{"type":"string","minLength":1},"state":{"type":"string","enum":["open","unpublished","suspended","removed"]},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"forkable":{"type":"boolean"},"priceCoins":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["listingId","state","number","forkable","priceCoins"],"additionalProperties":false},{"type":"null"}]},"counts":{"type":"object","properties":{"entries":{"type":"integer","minimum":0,"maximum":9007199254740991},"variants":{"type":"integer","minimum":0,"maximum":9007199254740991},"files":{"type":"integer","minimum":0,"maximum":9007199254740991},"templates":{"type":"integer","minimum":0,"maximum":9007199254740991},"strippedStudioOnly":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["entries","variants","files","templates","strippedStudioOnly"],"additionalProperties":false},"entries":{"type":"array","items":{"type":"object","properties":{"sourceEntryId":{"type":"string"},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"entryType":{"type":["string","null"]},"hasPerson":{"type":"boolean"},"variantCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["sourceEntryId","names","entryType","hasPerson","variantCount"],"additionalProperties":false}},"files":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"filename":{"type":["string","null"]},"kind":{"type":"string"}},"required":["assetId","filename","kind"],"additionalProperties":false}},"templates":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}},"omitted":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["studioOnly","strokes","apps","mentions","privateLoras","collectionMembers","nonPortableItems"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","count"],"additionalProperties":false}},"missingDependencies":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["asset","entry","document"]},"label":{"type":"string"},"reason":{"type":"string","enum":["deleted","unready","blocked","missing"]}},"required":["kind","label","reason"],"additionalProperties":false}}},"required":["ready","kind","sourceId","title","description","existingListing","counts","entries","files","templates","omitted","missingDependencies"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/materials.listing.publish":{"post":{"operationId":"materials.listing.publish","summary":"Publish an entry, collection or template canvas as a versioned cross-workspace material release with copied files and studio-only details removed.","tags":["materials"],"x-qmoon-action":"publish","x-qmoon-scope":"publish","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["entry","collection","template"]},"sourceId":{"type":"string","minLength":1},"title":{"type":"object","properties":{"ja":{"type":"string","maxLength":120},"en":{"type":"string","maxLength":120}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"forkable":{"default":true,"type":"boolean"},"priceCoins":{"default":0,"type":"integer","minimum":0,"maximum":100000},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["kind","sourceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"listingId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["open","unpublished","suspended","removed"]},"counts":{"type":"object","properties":{"entries":{"type":"integer","minimum":0,"maximum":9007199254740991},"variants":{"type":"integer","minimum":0,"maximum":9007199254740991},"files":{"type":"integer","minimum":0,"maximum":9007199254740991},"templates":{"type":"integer","minimum":0,"maximum":9007199254740991},"strippedStudioOnly":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["entries","variants","files","templates","strippedStudioOnly"],"additionalProperties":false}},"required":["listingId","versionId","number","state","counts"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/materials.listing.update":{"post":{"operationId":"materials.listing.update","summary":"Update a published material listing’s copy setting or coin price, or unpublish it while keeping existing linked workspaces working.","tags":["materials"],"x-qmoon-action":"publish","x-qmoon-scope":"publish","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"listingId":{"type":"string","minLength":1},"forkable":{"type":"boolean"},"priceCoins":{"type":"integer","minimum":0,"maximum":100000},"unpublish":{"type":"boolean"}},"required":["listingId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"listingId":{"type":"string","minLength":1},"state":{"type":"string","enum":["open","unpublished","suspended","removed"]},"forkable":{"type":"boolean"},"priceCoins":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["listingId","state","forkable","priceCoins"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/materials.listing.list":{"post":{"operationId":"materials.listing.list","summary":"List open published materials available for reuse across workspaces.","tags":["materials"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["entry","collection","template"]},"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"listingId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["entry","collection","template"]},"state":{"type":"string","enum":["open","unpublished","suspended","removed"]},"title":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string","minLength":1},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"forkable":{"type":"boolean"},"priceCoins":{"type":"integer","minimum":0,"maximum":9007199254740991},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"counts":{"type":"object","properties":{"entries":{"type":"integer","minimum":0,"maximum":9007199254740991},"variants":{"type":"integer","minimum":0,"maximum":9007199254740991},"files":{"type":"integer","minimum":0,"maximum":9007199254740991},"templates":{"type":"integer","minimum":0,"maximum":9007199254740991},"strippedStudioOnly":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["entries","variants","files","templates","strippedStudioOnly"],"additionalProperties":false},"publishedAt":{"type":"number"},"own":{"type":"boolean"},"unlocked":{"type":"boolean"},"linked":{"type":"boolean"}},"required":["listingId","kind","state","title","creator","forkable","priceCoins","number","counts","publishedAt","own","unlocked","linked"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/materials.listing.search":{"post":{"operationId":"materials.listing.search","summary":"Search open published materials across workspaces by words and filters (kind, free or paid, copyable or use-only).","tags":["materials"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","maxLength":200},"kind":{"type":"string","enum":["entry","collection","template"]},"price":{"type":"string","enum":["free","paid"]},"forkable":{"type":"boolean"},"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"listingId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["entry","collection","template"]},"state":{"type":"string","enum":["open","unpublished","suspended","removed"]},"title":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string","minLength":1},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"forkable":{"type":"boolean"},"priceCoins":{"type":"integer","minimum":0,"maximum":9007199254740991},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"counts":{"type":"object","properties":{"entries":{"type":"integer","minimum":0,"maximum":9007199254740991},"variants":{"type":"integer","minimum":0,"maximum":9007199254740991},"files":{"type":"integer","minimum":0,"maximum":9007199254740991},"templates":{"type":"integer","minimum":0,"maximum":9007199254740991},"strippedStudioOnly":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["entries","variants","files","templates","strippedStudioOnly"],"additionalProperties":false},"publishedAt":{"type":"number"},"own":{"type":"boolean"},"unlocked":{"type":"boolean"},"linked":{"type":"boolean"}},"required":["listingId","kind","state","title","creator","forkable","priceCoins","number","counts","publishedAt","own","unlocked","linked"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/materials.listing.similar":{"post":{"operationId":"materials.listing.similar","summary":"List open published materials that look or read like a given material listing.","tags":["materials"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"listingId":{"type":"string","minLength":1},"limit":{"type":"integer","minimum":1,"maximum":24}},"required":["listingId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"listingId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["entry","collection","template"]},"state":{"type":"string","enum":["open","unpublished","suspended","removed"]},"title":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string","minLength":1},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"forkable":{"type":"boolean"},"priceCoins":{"type":"integer","minimum":0,"maximum":9007199254740991},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"counts":{"type":"object","properties":{"entries":{"type":"integer","minimum":0,"maximum":9007199254740991},"variants":{"type":"integer","minimum":0,"maximum":9007199254740991},"files":{"type":"integer","minimum":0,"maximum":9007199254740991},"templates":{"type":"integer","minimum":0,"maximum":9007199254740991},"strippedStudioOnly":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["entries","variants","files","templates","strippedStudioOnly"],"additionalProperties":false},"thumbnailAssetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"publishedAt":{"type":"number"},"own":{"type":"boolean"},"unlocked":{"type":"boolean"},"linked":{"type":"boolean"}},"required":["listingId","kind","state","title","description","creator","forkable","priceCoins","number","counts","thumbnailAssetId","publishedAt","own","unlocked","linked"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/materials.listing.get":{"post":{"operationId":"materials.listing.get","summary":"Read a published material listing, unlock and link status, a read-only item preview while locked, and full contents once unlocked. Returns null when unavailable.","tags":["materials"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"listingId":{"type":"string","minLength":1}},"required":["listingId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"anyOf":[{"type":"object","properties":{"listingId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["entry","collection","template"]},"state":{"type":"string","enum":["open","unpublished","suspended","removed"]},"title":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string","minLength":1},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"forkable":{"type":"boolean"},"priceCoins":{"type":"integer","minimum":0,"maximum":9007199254740991},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"counts":{"type":"object","properties":{"entries":{"type":"integer","minimum":0,"maximum":9007199254740991},"variants":{"type":"integer","minimum":0,"maximum":9007199254740991},"files":{"type":"integer","minimum":0,"maximum":9007199254740991},"templates":{"type":"integer","minimum":0,"maximum":9007199254740991},"strippedStudioOnly":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["entries","variants","files","templates","strippedStudioOnly"],"additionalProperties":false},"thumbnailAssetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"publishedAt":{"type":"number"},"own":{"type":"boolean"},"unlocked":{"type":"boolean"},"revoked":{"type":"boolean"},"moderationReason":{"type":["string","null"]},"link":{"anyOf":[{"type":"object","properties":{"linkId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"linkedAt":{"type":"number"}},"required":["linkId","versionId","versionNumber","linkedAt"],"additionalProperties":false},{"type":"null"}]},"updateAvailable":{"type":"boolean"},"preview":{"anyOf":[{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"entries":{"type":"array","items":{"type":"object","properties":{"sourceEntryId":{"type":"string"},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"entryType":{"type":["string","null"]},"hasPerson":{"type":"boolean"},"variantCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["sourceEntryId","names","entryType","hasPerson","variantCount"],"additionalProperties":false}},"template":{"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"fieldLabels":{"type":"array","items":{"type":"string"}}},"required":["title","fieldLabels"],"additionalProperties":false},{"type":"null"}]}},"required":["versionId","number","entries","template"],"additionalProperties":false},{"type":"null"}]},"contents":{"anyOf":[{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"kind":{"type":"string","enum":["entry","collection","template"]},"entries":{"type":"array","items":{"type":"object","properties":{"sourceEntryId":{"type":"string"},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"entryType":{"type":["string","null"]},"summary":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"hasPerson":{"type":"boolean"},"variants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"promptText":{"type":["string","null"]},"referenceCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","description","promptText","referenceCount"],"additionalProperties":false}},"details":{"type":"array","items":{"type":"object","properties":{"label":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"value":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["label","value"],"additionalProperties":false}}},"required":["sourceEntryId","names","entryType","summary","hasPerson","variants","details"],"additionalProperties":false}},"collection":{"anyOf":[{"type":"object","properties":{"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["names","description"],"additionalProperties":false},{"type":"null"}]},"template":{"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"fieldLabels":{"type":"array","items":{"type":"string"}}},"required":["title","fieldLabels"],"additionalProperties":false},{"type":"null"}]}},"required":["versionId","number","kind","entries","collection","template"],"additionalProperties":false},{"type":"null"}]}},"required":["listingId","versionId","kind","state","title","description","creator","forkable","priceCoins","number","counts","thumbnailAssetId","publishedAt","own","unlocked","revoked","moderationReason","link","updateAvailable","preview","contents"],"additionalProperties":false},{"type":"null"}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/materials.listing.listLinks":{"post":{"operationId":"materials.listing.listLinks","summary":"List materials linked into a workspace, including pinned version numbers, explicit update availability and moderation status.","tags":["materials"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"linkId":{"type":"string","minLength":1},"listingId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["entry","collection","template"]},"title":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string","minLength":1},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"pinnedVersionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"latestVersionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"listingState":{"type":"string","enum":["open","unpublished","suspended","removed"]},"updateAvailable":{"type":"boolean"},"revoked":{"type":"boolean"},"linkedAt":{"type":"number"}},"required":["linkId","listingId","kind","title","creator","pinnedVersionNumber","latestVersionNumber","listingState","updateAvailable","revoked","linkedAt"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/materials.listing.unlock":{"post":{"operationId":"materials.listing.unlock","summary":"Unlock a free or paid published material listing for a workspace, verifying the shown coin price, enforcing spend limits, charging coins and recording creator earnings when priced.","tags":["materials"],"x-qmoon-action":"charge","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"listingId":{"type":"string","minLength":1},"expectedCoins":{"type":"integer","minimum":0,"maximum":9007199254740991},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["listingId","expectedCoins"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"unlocked":{"type":"boolean","const":true},"coins":{"type":"integer","minimum":0,"maximum":9007199254740991},"alreadyUnlocked":{"type":"boolean"}},"required":["unlocked","coins","alreadyUnlocked"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/materials.listing.use":{"post":{"operationId":"materials.listing.use","summary":"Link a published material’s current release into a workspace so entries and collections can be used read-only across Studio, or create a live canvas from a published template.","tags":["materials"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"listingId":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["listingId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"linkId":{"type":"string","minLength":1},"listingId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"documentIds":{"type":"array","items":{"type":"string","minLength":1}},"entryIds":{"type":"array","items":{"type":"string","minLength":1}},"collectionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["linkId","listingId","versionId","number","documentIds","entryIds","collectionId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/materials.listing.unlink":{"post":{"operationId":"materials.listing.unlink","summary":"Remove a linked published material and its read-only linked items from a workspace.","tags":["materials"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"listingId":{"type":"string","minLength":1}},"required":["listingId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"unlinked":{"type":"boolean"}},"required":["unlinked"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/materials.listing.applyUpdate":{"post":{"operationId":"materials.listing.applyUpdate","summary":"Update a workspace’s pinned material link to the listing’s latest open release.","tags":["materials"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"listingId":{"type":"string","minLength":1}},"required":["listingId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"linkId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["linkId","versionId","number"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/materials.listing.copy":{"post":{"operationId":"materials.listing.copy","summary":"Copy an open copyable material listing into editable entries, a collection or a template canvas in a workspace with its own file copies.","tags":["materials"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"listingId":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["listingId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"kind":{"type":"string","enum":["entry","collection","template"]},"documentIds":{"type":"array","items":{"type":"string","minLength":1}},"entryIds":{"type":"array","items":{"type":"string","minLength":1}},"collectionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["kind","documentIds","entryIds","collectionId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.work.create":{"post":{"operationId":"publishing.work.create","summary":"Create a work with a title in one language, and the work’s first episode.","tags":["publishing"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio"]},"title":{"type":"string","minLength":1},"lang":{"type":"string","enum":["ja","en"]},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["medium","title","lang"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"episodeId":{"type":"string","minLength":1}},"required":["workId","episodeId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.work.list":{"post":{"operationId":"publishing.work.list","summary":"List the workspace’s works, newest first, with their titles, medium, world and status, or those in Recently deleted. canon_story lists a work’s episodes.","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"deleted":{"type":"boolean"},"media":{"minItems":1,"type":"array","items":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"titles":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"originalLang":{"type":"string","enum":["ja","en"]},"editions":{"type":"array","items":{"type":"string","enum":["ja","en"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"worldId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"live":{"type":"array","items":{"type":"object","properties":{"edition":{"type":"string","enum":["ja","en"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["edition","episodes"],"additionalProperties":false}},"deleted":{"anyOf":[{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"purgeAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"scheduled":{"type":"object","properties":{"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"atLeast":{"type":"boolean"}},"required":["episodes","atLeast"],"additionalProperties":false}},"required":["at","purgeAt","scheduled"],"additionalProperties":false},{"type":"null"}]},"suspended":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["reason"],"additionalProperties":false},{"type":"null"}]},"removed":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["reason"],"additionalProperties":false},{"type":"null"}]}},"required":["workId","medium","titles","originalLang","editions","serial","worldId","live","deleted","suspended","removed"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.work.get":{"post":{"operationId":"publishing.work.get","summary":"Read a work’s listing and settings: titles, synopsis, content flags, tags, editions and status.","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workId":{"type":"string","minLength":1}},"required":["workId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"titles":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"originalLang":{"type":"string","enum":["ja","en"]},"editions":{"type":"array","items":{"type":"string","enum":["ja","en"]}},"coverAssetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"worldId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"live":{"type":"array","items":{"type":"object","properties":{"edition":{"type":"string","enum":["ja","en"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["edition","episodes"],"additionalProperties":false}},"post":{"anyOf":[{"type":"object","properties":{"images":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["live","checking","failed","notPublished"]}},"required":["images","state"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"deleted":{"anyOf":[{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"purgeAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"scheduled":{"type":"object","properties":{"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"atLeast":{"type":"boolean"}},"required":["episodes","atLeast"],"additionalProperties":false}},"required":["at","purgeAt","scheduled"],"additionalProperties":false},{"type":"null"}]},"suspended":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["reason"],"additionalProperties":false},{"type":"null"}]},"removed":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["reason"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"titleReadings":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"synopses":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"taglines":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"descriptors":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"object","properties":{"lang":{"type":"string","enum":["ja","en"]},"name":{"type":"string"}},"required":["lang","name"],"additionalProperties":false}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"direction":{"anyOf":[{"type":"string","enum":["rtl","ltr"]},{"type":"null"}]},"firstPublishedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"recipes":{"anyOf":[{"type":"object","properties":{"shown":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"images":{"minItems":1,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"capability":{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},"intent":{"type":"object","properties":{"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":64000},"en":{"type":"string","maxLength":64000}},"additionalProperties":false},"mentions":{"default":[],"maxItems":15,"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"include":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"exclude":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"description":{"type":"string","maxLength":4000},"promptText":{"type":"string","maxLength":2000},"negativeText":{"type":"string","maxLength":2000}},"required":["entryId"],"additionalProperties":false}},"references":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},"role":{"type":"string","enum":["characterDesign","style","reference"]}},"required":["ref","role"],"additionalProperties":false}},"keyframes":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},"required":["atMs","ref"],"additionalProperties":false}},"aspect":{"type":"string","pattern":"^[1-9][0-9]?:[1-9][0-9]?$"},"negativePrompt":{"type":"string","maxLength":64000},"palette":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"weight":{"type":"number","exclusiveMinimum":0,"maximum":100}},"required":["color"],"additionalProperties":false}},"regions":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"left":{"type":"number","minimum":0,"maximum":1},"top":{"type":"number","minimum":0,"maximum":1},"right":{"type":"number","minimum":0,"maximum":1},"bottom":{"type":"number","minimum":0,"maximum":1},"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false}},"required":["left","top","right","bottom"],"additionalProperties":false}},"extend":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":2},"right":{"type":"number","minimum":0,"maximum":2},"bottom":{"type":"number","minimum":0,"maximum":2},"left":{"type":"number","minimum":0,"maximum":2}},"required":["top","right","bottom","left"],"additionalProperties":false},"details":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"seed":{"type":"integer","minimum":0,"maximum":9007199254740991},"loras":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"weight":{"type":"number","minimum":-4,"maximum":4}},"required":["model","weight"],"additionalProperties":false}},"params":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}}]}}}]}}},"additionalProperties":false}},"required":["prompt","mentions"],"additionalProperties":false},"model":{"type":["string","null"]},"quality":{"type":"string","enum":["fast","high"]},"leftOut":{"type":"array","items":{"type":"string","enum":["references","editedImage","regions","loras","model"]}}},"required":["images","capability","intent","model","quality","leftOut"],"additionalProperties":false}}},"required":["shown","items"],"additionalProperties":false},{"type":"null"}]},"deletable":{"type":"boolean"},"editable":{"type":"boolean"},"publishable":{"type":"boolean"},"lastEpisodeNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastRelease":{"anyOf":[{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"access":{"type":"object","properties":{"initial":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"free"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paid"},"waitForFree":{"type":"boolean"},"unlockCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"rentalCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","waitForFree","unlockCoins","rentalCoins"],"additionalProperties":false}]},"changes":{"type":"array","items":{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"access":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"free"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paid"},"waitForFree":{"type":"boolean"},"unlockCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"rentalCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","waitForFree","unlockCoins","rentalCoins"],"additionalProperties":false}]}},"required":["at","access"],"additionalProperties":false}}},"required":["initial","changes"],"additionalProperties":false}},"required":["episodeId","number","at","access"],"additionalProperties":false},{"type":"null"}]}},"required":["workId","medium","titles","originalLang","editions","coverAssetId","serial","worldId","live","post","createdAt","deleted","suspended","removed","workspaceId","titleReadings","synopses","taglines","flags","descriptors","tags","weekdays","direction","firstPublishedAt","recipes","deletable","editable","publishable","lastEpisodeNumber","lastRelease"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.work.update":{"post":{"operationId":"publishing.work.update","summary":"Change a work’s settings: listing, flags, tags, status, schedule and policies. A connection changes a live work only with the publish scope.","tags":["publishing"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"settings":{"type":"object","properties":{"titles":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"titleReadings":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"synopses":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"taglines":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"coverAssetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"worldId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"descriptors":{"type":"array","items":{"type":"string","minLength":1}},"tags":{"type":"object","properties":{"lang":{"type":"string","enum":["ja","en"]},"names":{"type":"array","items":{"type":"string","minLength":1}}},"required":["lang","names"],"additionalProperties":false},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"direction":{"type":"string","enum":["rtl","ltr"]},"showRecipes":{"type":"boolean"}},"additionalProperties":false}},"required":["workId","settings"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.work.addEdition":{"post":{"operationId":"publishing.work.addEdition","summary":"Add an edition in another language to a work. Its episodes can then be translated and published there.","tags":["publishing"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"lang":{"type":"string","enum":["ja","en"]},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["workId","lang"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.work.delete":{"post":{"operationId":"publishing.work.delete","summary":"Move a work to Recently deleted. It is taken off the site immediately and can be restored for 30 days.","tags":["publishing"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workId":{"type":"string","minLength":1}},"required":["workId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"purgeAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["purgeAt"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.work.restore":{"post":{"operationId":"publishing.work.restore","summary":"Restore a work from Recently deleted, with what it had on the site.","tags":["publishing"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workId":{"type":"string","minLength":1}},"required":["workId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.episode.create":{"post":{"operationId":"publishing.episode.create","summary":"Add an episode, or a part heading the episodes that follow, to a work: after another, or last. A connection adds a part to a live work only with the publish scope.","tags":["publishing"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["episode","part"]},"title":{"type":"string"},"lang":{"type":"string","enum":["ja","en"]},"after":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["workId","kind","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1}},"required":["episodeId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.episode.list":{"post":{"operationId":"publishing.episode.list","summary":"List a work’s episodes and parts in order, with their chapter documents and each edition’s state: live, scheduled or failed, and its access.","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"workId":{"type":"string","minLength":1},"deleted":{"type":"boolean"}},"required":["workId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["episode","part"]},"number":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"titles":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"part":{"anyOf":[{"type":"object","properties":{"partId":{"type":"string","minLength":1},"titles":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["partId","titles"],"additionalProperties":false},{"type":"null"}]},"textRoot":{"type":"object","properties":{"ja":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"en":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["ja","en"],"additionalProperties":false},"letteredIn":{"type":"array","items":{"type":"string","enum":["ja","en"]}},"opens":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"pages":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"assets":{"type":"array","items":{"type":"string","minLength":1}},"editions":{"type":"array","items":{"type":"object","properties":{"edition":{"type":"string","enum":["ja","en"]},"live":{"anyOf":[{"type":"object","properties":{"releaseId":{"type":"string","minLength":1},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"publishedBy":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"person"},"name":{"type":"string"},"self":{"type":"boolean"}},"required":["kind","name","self"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"connection"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},{"type":"null"}]}},"required":["releaseId","version","at","publishedBy"],"additionalProperties":false},{"type":"null"}]},"pending":{"anyOf":[{"type":"object","properties":{"releaseId":{"type":"string","minLength":1},"state":{"type":"string","enum":["staging","scheduled","failed"]},"at":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"publishedBy":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"person"},"name":{"type":"string"},"self":{"type":"boolean"}},"required":["kind","name","self"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"connection"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},{"type":"null"}]}},"required":["releaseId","state","at","publishedBy"],"additionalProperties":false},{"type":"null"}]},"scheduledAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"access":{"anyOf":[{"type":"object","properties":{"initial":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"free"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paid"},"waitForFree":{"type":"boolean"},"unlockCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"rentalCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","waitForFree","unlockCoins","rentalCoins"],"additionalProperties":false}]},"changes":{"type":"array","items":{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"access":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"free"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paid"},"waitForFree":{"type":"boolean"},"unlockCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"rentalCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","waitForFree","unlockCoins","rentalCoins"],"additionalProperties":false}]}},"required":["at","access"],"additionalProperties":false}}},"required":["initial","changes"],"additionalProperties":false},{"type":"null"}]},"changedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["edition","live","pending","scheduledAt","access","changedAt"],"additionalProperties":false}},"deleted":{"anyOf":[{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"purgeAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["at","purgeAt"],"additionalProperties":false},{"type":"null"}]},"suspended":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["reason"],"additionalProperties":false},{"type":"null"}]},"removed":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["reason"],"additionalProperties":false},{"type":"null"}]}},"required":["episodeId","kind","number","titles","part","textRoot","letteredIn","opens","pages","assets","editions","deleted","suspended","removed"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.episode.get":{"post":{"operationId":"publishing.episode.get","summary":"Read one episode with its pages and each edition’s state: live, scheduled or failed, and its access.","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1}},"required":["episodeId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["episode","part"]},"order":{"type":"string"},"number":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"titles":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"summary":{"type":"string"},"part":{"anyOf":[{"type":"object","properties":{"partId":{"type":"string","minLength":1},"titles":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["partId","titles"],"additionalProperties":false},{"type":"null"}]},"textRoot":{"type":"object","properties":{"ja":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"en":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["ja","en"],"additionalProperties":false},"letteredIn":{"type":"array","items":{"type":"string","enum":["ja","en"]}},"opens":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"pages":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"firstPage":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"editedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["documentId","editedAt"],"additionalProperties":false},{"type":"null"}]},"assets":{"type":"array","items":{"type":"string","minLength":1}},"editions":{"type":"array","items":{"type":"object","properties":{"edition":{"type":"string","enum":["ja","en"]},"live":{"anyOf":[{"type":"object","properties":{"releaseId":{"type":"string","minLength":1},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"publishedBy":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"person"},"name":{"type":"string"},"self":{"type":"boolean"}},"required":["kind","name","self"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"connection"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},{"type":"null"}]}},"required":["releaseId","version","at","publishedBy"],"additionalProperties":false},{"type":"null"}]},"pending":{"anyOf":[{"type":"object","properties":{"releaseId":{"type":"string","minLength":1},"state":{"type":"string","enum":["staging","scheduled","failed"]},"at":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"publishedBy":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"person"},"name":{"type":"string"},"self":{"type":"boolean"}},"required":["kind","name","self"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"connection"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]},{"type":"null"}]}},"required":["releaseId","state","at","publishedBy"],"additionalProperties":false},{"type":"null"}]},"scheduledAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"access":{"anyOf":[{"type":"object","properties":{"initial":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"free"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paid"},"waitForFree":{"type":"boolean"},"unlockCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"rentalCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","waitForFree","unlockCoins","rentalCoins"],"additionalProperties":false}]},"changes":{"type":"array","items":{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"access":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"free"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paid"},"waitForFree":{"type":"boolean"},"unlockCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"rentalCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","waitForFree","unlockCoins","rentalCoins"],"additionalProperties":false}]}},"required":["at","access"],"additionalProperties":false}}},"required":["initial","changes"],"additionalProperties":false},{"type":"null"}]},"changedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["edition","live","pending","scheduledAt","access","changedAt"],"additionalProperties":false}},"deleted":{"anyOf":[{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"purgeAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["at","purgeAt"],"additionalProperties":false},{"type":"null"}]},"suspended":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["reason"],"additionalProperties":false},{"type":"null"}]},"removed":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["reason"],"additionalProperties":false},{"type":"null"}]},"pageList":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"editedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["documentId","editedAt"],"additionalProperties":false}}},"required":["episodeId","kind","order","number","titles","summary","part","textRoot","letteredIn","opens","pages","firstPage","assets","editions","deleted","suspended","removed","pageList"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.episode.rename":{"post":{"operationId":"publishing.episode.rename","summary":"Change an episode’s or a part’s title in one language. A connection renames a live episode, or a part of a live work, only with the publish scope.","tags":["publishing"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"lang":{"type":"string","enum":["ja","en"]},"title":{"type":"string"}},"required":["episodeId","lang","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.episode.setSummary":{"post":{"operationId":"publishing.episode.setSummary","summary":"Write an episode’s summary: what happens in it, for the studio only. Summaries in order are the story so far.","tags":["publishing"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"summary":{"type":"string"}},"required":["episodeId","summary"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.episode.reorder":{"post":{"operationId":"publishing.episode.reorder","summary":"Move an episode or a part after another one, or first. The numbers readers see don’t change. A connection moves a live episode, or a part of a live work, only with the publish scope.","tags":["publishing"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"after":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["episodeId","after"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.episode.addDocument":{"post":{"operationId":"publishing.episode.addDocument","summary":"Create a page, chapter or storyboard in an episode’s work, and add it to the episode’s documents. A chapter’s text or a storyboard takes the episode’s title in its language, whatever title says.","tags":["publishing"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["comicPage","prose","canvas","storyboard","entry"]},"role":{"type":"string","enum":["page","text","storyboard","frames"]},"title":{"type":"string"},"lang":{"type":"string","enum":["ja","en"]},"translationOf":{"type":"string","minLength":1},"after":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["episodeId","kind","role","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"documentId":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.episode.moveDocument":{"post":{"operationId":"publishing.episode.moveDocument","summary":"Move one of an episode’s documents after another of the same role, or first.","tags":["publishing"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"documentId":{"type":"string","minLength":1},"after":{"type":"string","minLength":1}},"required":["episodeId","documentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.episode.setAccess":{"post":{"operationId":"publishing.episode.setAccess","summary":"Set how readers get an episode in one edition: free, wait for free, coins, rental or early access. A live edition’s access needs the publish scope.","tags":["publishing"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"schedule":{"type":"object","properties":{"initial":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"free"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paid"},"waitForFree":{"type":"boolean"},"unlockCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"rentalCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","waitForFree","unlockCoins","rentalCoins"],"additionalProperties":false}]},"changes":{"type":"array","items":{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"access":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"free"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paid"},"waitForFree":{"type":"boolean"},"unlockCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"rentalCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","waitForFree","unlockCoins","rentalCoins"],"additionalProperties":false}]}},"required":["at","access"],"additionalProperties":false}}},"required":["initial","changes"],"additionalProperties":false}},"required":["episodeId","edition","schedule"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.episode.delete":{"post":{"operationId":"publishing.episode.delete","summary":"Move an episode or a part to Recently deleted, taking it off the site. It can be restored for 30 days. A connection deletes one readers see only with the publish scope.","tags":["publishing"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1}},"required":["episodeId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"purgeAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["purgeAt"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.episode.restore":{"post":{"operationId":"publishing.episode.restore","summary":"Restore an episode or a part from Recently deleted. An episode stays off the site until it is published again. A connection restores a live work’s part only with the publish scope.","tags":["publishing"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1}},"required":["episodeId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.episode.preview":{"post":{"operationId":"publishing.episode.preview","summary":"Preview publishing an episode in an edition: its number, access, and what the work still needs.","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]}},"required":["episodeId","edition"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"edition":{"type":"string","enum":["ja","en"]},"first":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string","enum":["title","cover","synopsis"]}},"handle":{"type":["string","null"]},"kind":{"type":"string","enum":["pages","strip","prose","video","audio","post"]},"empty":{"type":"boolean"},"rightsStatement":{"type":"boolean"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","enum":["episode","chapter","post"]},"access":{"type":"object","properties":{"initial":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"free"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paid"},"waitForFree":{"type":"boolean"},"unlockCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"rentalCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","waitForFree","unlockCoins","rentalCoins"],"additionalProperties":false}]},"changes":{"type":"array","items":{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"access":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"free"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paid"},"waitForFree":{"type":"boolean"},"unlockCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"rentalCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","waitForFree","unlockCoins","rentalCoins"],"additionalProperties":false}]}},"required":["at","access"],"additionalProperties":false}}},"required":["initial","changes"],"additionalProperties":false},"live":{"type":"boolean"},"scheduled":{"anyOf":[{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"final":{"type":"boolean"},"rightsStatement":{"type":["string","null"]}},"required":["at"],"additionalProperties":false},{"type":"null"}]},"suspended":{"anyOf":[{"type":"object","properties":{"subject":{"type":"string","enum":["work","episode"]},"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["subject","reason"],"additionalProperties":false},{"type":"null"}]},"removed":{"anyOf":[{"type":"object","properties":{"subject":{"type":"string","enum":["work","episode"]},"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["subject","reason"],"additionalProperties":false},{"type":"null"}]}},"required":["edition","first","missing","handle","kind","empty","rightsStatement","number","unit","access","live","scheduled","suspended","removed"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.episode.publish":{"post":{"operationId":"publishing.episode.publish","summary":"Publish an episode in an edition, now or at a set time. Its documents are frozen and its files generated and checked, then it goes live.","tags":["publishing"],"x-qmoon-action":"publish","x-qmoon-scope":"publish","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"at":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"final":{"type":"boolean"},"rightsStatement":{"type":"string","minLength":1},"access":{"type":"object","properties":{"initial":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"free"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paid"},"waitForFree":{"type":"boolean"},"unlockCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"rentalCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","waitForFree","unlockCoins","rentalCoins"],"additionalProperties":false}]},"changes":{"type":"array","items":{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"access":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"free"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paid"},"waitForFree":{"type":"boolean"},"unlockCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"rentalCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","waitForFree","unlockCoins","rentalCoins"],"additionalProperties":false}]}},"required":["at","access"],"additionalProperties":false}}},"required":["initial","changes"],"additionalProperties":false},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["episodeId","edition","at","final"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"releaseId":{"type":"string","minLength":1},"browser":{"type":"boolean"}},"required":["releaseId","browser"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.episode.withdraw":{"post":{"operationId":"publishing.episode.withdraw","summary":"Unpublish an episode’s edition, or cancel a publication that hasn’t gone live. Readers keep what they bought.","tags":["publishing"],"x-qmoon-action":"publish","x-qmoon-scope":"publish","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]}},"required":["episodeId","edition"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.release.get":{"post":{"operationId":"publishing.release.get","summary":"Read a release of an episode: the state, the document versions it froze and files. documents.version.content reads a frozen version’s text.","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"releaseId":{"type":"string","minLength":1}},"required":["episodeId","releaseId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"releaseId":{"type":"string","minLength":1},"episodeId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"kind":{"type":"string","enum":["pages","strip","prose","video","audio","post"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["staging","scheduled","live","superseded","withdrawn","failed"]},"step":{"anyOf":[{"type":"string","enum":["freezing","files","checking","finishing"]},{"type":"null"}]},"failure":{"anyOf":[{"type":"string","enum":["blocked","unchecked","removedMaterial","filesMissing","mismatch","stepFailed"]},{"type":"null"}]},"at":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"documents":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["comicPage","prose","canvas","storyboard","entry"]}},"required":["documentId","versionId","kind"],"additionalProperties":false}},"browser":{"type":"boolean"},"files":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["count","bytes"],"additionalProperties":false},"listed":{"type":"boolean"}},"required":["releaseId","episodeId","edition","kind","version","state","step","failure","at","documents","browser","files","listed"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.release.list":{"post":{"operationId":"publishing.release.list","summary":"List an episode’s releases in one edition, newest first, including corrected, unpublished and failed ones.","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"episodeId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]}},"required":["episodeId","edition"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"releaseId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"kind":{"type":"string","enum":["pages","strip","prose","video","audio","post"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["staging","scheduled","live","superseded","withdrawn","failed"]},"step":{"anyOf":[{"type":"string","enum":["freezing","files","checking","finishing"]},{"type":"null"}]},"failure":{"anyOf":[{"type":"string","enum":["blocked","unchecked","removedMaterial","filesMissing","mismatch","stepFailed"]},{"type":"null"}]},"at":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"files":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["count","bytes"],"additionalProperties":false},"listed":{"type":"boolean"}},"required":["releaseId","edition","kind","version","state","step","failure","at","files","listed"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.post.create":{"post":{"operationId":"publishing.post.create","summary":"Post images as an illustration in one step: one post holding them all, or one post for each image.","tags":["publishing"],"x-qmoon-action":"publish","x-qmoon-scope":"publish","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"lang":{"type":"string","enum":["ja","en"]},"title":{"type":"string"},"caption":{"type":"string"},"tags":{"type":"array","items":{"type":"string","minLength":1}},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"separate":{"type":"boolean"},"showRecipes":{"type":"boolean"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["assetIds","lang","tags","flags"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"posts":{"minItems":1,"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"episodeId":{"type":"string","minLength":1},"releaseId":{"type":"string","minLength":1}},"required":["workId","episodeId","releaseId"],"additionalProperties":false}}},"required":["posts"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.note.post":{"post":{"operationId":"publishing.note.post","summary":"Post a note on the workspace’s creator page.","tags":["publishing"],"x-qmoon-action":"publish","x-qmoon-scope":"publish","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lang":{"type":"string","enum":["ja","en"]},"title":{"type":"string","minLength":1},"body":{"type":"string","minLength":1},"workId":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["lang","title","body"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"noteId":{"type":"string","minLength":1}},"required":["noteId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.note.edit":{"post":{"operationId":"publishing.note.edit","summary":"Change a note’s title and text on the creator page. A connection needs the publish scope.","tags":["publishing"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"noteId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"body":{"type":"string","minLength":1}},"required":["noteId","title","body"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.note.delete":{"post":{"operationId":"publishing.note.delete","summary":"Move a note on the creator page to Recently deleted, where it can be restored for 30 days.","tags":["publishing"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"noteId":{"type":"string","minLength":1}},"required":["noteId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.note.restore":{"post":{"operationId":"publishing.note.restore","summary":"Restore a note from Recently deleted to the creator page.","tags":["publishing"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"noteId":{"type":"string","minLength":1}},"required":["noteId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.note.list":{"post":{"operationId":"publishing.note.list","summary":"List the notes on the workspace’s creator page, newest first, with their titles and works. publishing.note.get reads a note’s text.","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"noteId":{"type":"string","minLength":1},"lang":{"type":"string","enum":["ja","en"]},"title":{"type":"string"},"workId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"publishedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"editedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["noteId","lang","title","workId","publishedAt","editedAt"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.note.get":{"post":{"operationId":"publishing.note.get","summary":"Read a note on the workspace’s creator page, with its whole text.","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"noteId":{"type":"string","minLength":1}},"required":["noteId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"noteId":{"type":"string","minLength":1},"lang":{"type":"string","enum":["ja","en"]},"title":{"type":"string"},"body":{"type":"string"},"workId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"publishedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"editedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["noteId","lang","title","body","workId","publishedAt","editedAt"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.site.home":{"post":{"operationId":"publishing.site.home","summary":"Read the home page’s works in one language: the week’s top works and the newest, across every section. rowSize sets how many of each (1 by default).","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lang":{"type":"string","enum":["ja","en"]},"rowSize":{"type":"integer","minimum":1,"maximum":100}},"required":["lang"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"top":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}},"newest":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}}},"required":["top","newest"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.site.wall":{"post":{"operationId":"publishing.site.wall","summary":"Read a page of the home page’s wall of art and video in one language: most popular this week, newest, or newest from the creators the person follows.","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"lang":{"type":"string","enum":["ja","en"]},"kind":{"type":"string","enum":["all","images","video"]},"sort":{"type":"string","enum":["popular","new","following"]}},"required":["lang","kind","sort"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","creator","workspaceId","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.site.section":{"post":{"operationId":"publishing.site.section","summary":"Read a site section in one language: whether it is open, a row from each list, the top of each ranking, serials by weekday, and genre counts. rowSize sets each row’s works (1 by default).","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lang":{"type":"string","enum":["ja","en"]},"section":{"type":"string","enum":["manga","novels","video","audio","art"]},"rowSize":{"type":"integer","minimum":1,"maximum":100}},"required":["lang","section"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"section":{"type":"string","enum":["manga","novels","video","audio","art"]},"open":{"type":"boolean"},"rows":{"type":"object","properties":{"new":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}},"free":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}},"waitForFree":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}},"oneShots":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}},"complete":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}}},"required":["new","free","waitForFree","oneShots","complete"],"additionalProperties":false},"rankings":{"type":"object","properties":{"day":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}},"week":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}},"month":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}},"all":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}}},"required":["day","week","month","all"],"additionalProperties":false},"weekdays":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}}},"genres":{"type":"array","items":{"type":"object","properties":{"genre":{"type":"string","enum":["action","romance","romcom","fantasy","sci-fi","mystery","horror","sports","school","slice-of-life","food","workplace","historical","comedy","drama","music","voice-drama","asmr","characters","landscape","chibi","animals","seasons","still-life"]},"works":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["genre","works"],"additionalProperties":false}}},"required":["section","open","rows","rankings","weekdays","genres"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.site.list":{"post":{"operationId":"publishing.site.list","summary":"Read a page of a section’s list: new, free, wait for free, one-shots, completed, a weekday, a tag, or a genre by popular or newest.","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"lang":{"type":"string","enum":["ja","en"]},"section":{"type":"string","enum":["manga","novels","video","audio","art"]},"list":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["new","free","waitForFree","oneShots","complete"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"weekday"},"day":{"type":"integer","minimum":0,"maximum":6}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"tag"},"tag":{"type":"string","minLength":1,"maxLength":100}},"required":["kind","tag"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"genre"},"genre":{"type":"string","enum":["action","romance","romcom","fantasy","sci-fi","mystery","horror","sports","school","slice-of-life","food","workplace","historical","comedy","drama","music","voice-drama","asmr","characters","landscape","chibi","animals","seasons","still-life"]},"order":{"type":"string","enum":["popular","new"]}},"required":["kind","genre","order"],"additionalProperties":false}]}},"required":["lang","section","list"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","creator","workspaceId","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.site.ranking":{"post":{"operationId":"publishing.site.ranking","summary":"Read a section’s ranking for a period, or its rising or new-creator ranking, best first. limit sets how many works (5 by default).","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lang":{"type":"string","enum":["ja","en"]},"section":{"type":"string","enum":["manga","novels","video","audio","art"]},"ranking":{"type":"string","enum":["day","week","month","all","rising","newCreator"]},"limit":{"type":"integer","minimum":1,"maximum":100}},"required":["lang","section","ranking"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.site.work":{"post":{"operationId":"publishing.site.work","summary":"Read a published work’s page in one edition: card, editions and episodes.","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"lang":{"type":"string","enum":["ja","en"]}},"required":["workId","lang"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"anyOf":[{"type":"object","properties":{"card":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false},"profile":{"anyOf":[{"type":"object","properties":{"avatar":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"bio":{"type":"string"}},"required":["avatar","bio"],"additionalProperties":false},{"type":"null"}]},"counts":{"type":"object","properties":{"likes":{"type":"integer","minimum":0,"maximum":9007199254740991},"library":{"type":"integer","minimum":0,"maximum":9007199254740991},"stars":{"type":"object","properties":{"mean":{"anyOf":[{"type":"number","minimum":1,"maximum":3},{"type":"null"}]},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mean","count"],"additionalProperties":false}},"required":["likes","library","stars"],"additionalProperties":false},"genres":{"type":"array","items":{"type":"string","enum":["action","romance","romcom","fantasy","sci-fi","mystery","horror","sports","school","slice-of-life","food","workplace","historical","comedy","drama","music","voice-drama","asmr","characters","landscape","chibi","animals","seasons","still-life"]}},"tags":{"type":"array","items":{"type":"string"}},"cast":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"name":{"type":"string"},"image":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"chat":{"type":"boolean"}},"required":["entryId","name","image","chat"],"additionalProperties":false}},"editions":{"type":"array","items":{"type":"object","properties":{"edition":{"type":"string","enum":["ja","en"]},"title":{"type":"string"},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["edition","title","episodes"],"additionalProperties":false}},"original":{"type":"string","enum":["ja","en"]},"direction":{"anyOf":[{"type":"string","enum":["rtl","ltr"]},{"type":"null"}]},"descriptors":{"type":"array","items":{"type":"string"}},"episodes":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string"},"part":{"type":["string","null"]},"publishedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"access":{"type":"string","enum":["free","waitForFree","earlyAccess","paid"]},"opensAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"unlockCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"rentalCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"likes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"thumb":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width","height"],"additionalProperties":false},{"type":"null"}]}},"required":["episodeId","number","title","part","publishedAt","updatedAt","access","opensAt","unlockCoins","rentalCoins","likes","chars","durationMs","thumb"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]}},"required":["items","cursor"],"additionalProperties":false},"recipes":{"type":"array","items":{"type":"object","properties":{"images":{"minItems":1,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"capability":{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},"intent":{"type":"object","properties":{"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":64000},"en":{"type":"string","maxLength":64000}},"additionalProperties":false},"mentions":{"default":[],"maxItems":15,"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"include":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"exclude":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"description":{"type":"string","maxLength":4000},"promptText":{"type":"string","maxLength":2000},"negativeText":{"type":"string","maxLength":2000}},"required":["entryId"],"additionalProperties":false}},"references":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},"role":{"type":"string","enum":["characterDesign","style","reference"]}},"required":["ref","role"],"additionalProperties":false}},"keyframes":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},"required":["atMs","ref"],"additionalProperties":false}},"aspect":{"type":"string","pattern":"^[1-9][0-9]?:[1-9][0-9]?$"},"negativePrompt":{"type":"string","maxLength":64000},"palette":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"weight":{"type":"number","exclusiveMinimum":0,"maximum":100}},"required":["color"],"additionalProperties":false}},"regions":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"left":{"type":"number","minimum":0,"maximum":1},"top":{"type":"number","minimum":0,"maximum":1},"right":{"type":"number","minimum":0,"maximum":1},"bottom":{"type":"number","minimum":0,"maximum":1},"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false}},"required":["left","top","right","bottom"],"additionalProperties":false}},"extend":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":2},"right":{"type":"number","minimum":0,"maximum":2},"bottom":{"type":"number","minimum":0,"maximum":2},"left":{"type":"number","minimum":0,"maximum":2}},"required":["top","right","bottom","left"],"additionalProperties":false},"details":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"seed":{"type":"integer","minimum":0,"maximum":9007199254740991},"loras":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"weight":{"type":"number","minimum":-4,"maximum":4}},"required":["model","weight"],"additionalProperties":false}},"params":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}}]}}}]}}},"additionalProperties":false}},"required":["prompt","mentions"],"additionalProperties":false},"model":{"type":["string","null"]},"quality":{"type":"string","enum":["fast","high"]},"leftOut":{"type":"array","items":{"type":"string","enum":["references","editedImage","regions","loras","model"]}}},"required":["images","capability","intent","model","quality","leftOut"],"additionalProperties":false}},"rows":{"type":"object","properties":{"creator":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}},"previous":{"anyOf":[{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false},{"type":"null"}]},"next":{"anyOf":[{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false},{"type":"null"}]},"genre":{"anyOf":[{"type":"object","properties":{"genre":{"type":"string","enum":["action","romance","romcom","fantasy","sci-fi","mystery","horror","sports","school","slice-of-life","food","workplace","historical","comedy","drama","music","voice-drama","asmr","characters","landscape","chibi","animals","seasons","still-life"]},"cards":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}}},"required":["genre","cards"],"additionalProperties":false},{"type":"null"}]}},"required":["creator","previous","next","genre"],"additionalProperties":false}},"required":["card","profile","counts","genres","tags","cast","editions","original","direction","descriptors","episodes","recipes","rows"],"additionalProperties":false},{"type":"null"}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.site.episodes":{"post":{"operationId":"publishing.site.episodes","summary":"List a published work’s episodes in one edition, oldest or newest first, a page at a time after a cursor.","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"lang":{"type":"string","enum":["ja","en"]},"order":{"type":"string","enum":["oldest","newest"]},"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100}},"required":["workId","lang","order","cursor"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string"},"part":{"type":["string","null"]},"publishedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"access":{"type":"string","enum":["free","waitForFree","earlyAccess","paid"]},"opensAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"unlockCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"rentalCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"likes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["episodeId","number","title","part","publishedAt","updatedAt","access","opensAt","unlockCoins","rentalCoins","likes","chars","durationMs"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.site.open":{"post":{"operationId":"publishing.site.open","summary":"Open an episode of a published work by number: the release, access, the work’s title and cover, and the episodes around it.","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"lang":{"type":"string","enum":["ja","en"]},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["workId","lang","number"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"anyOf":[{"type":"object","properties":{"workId":{"type":"string","minLength":1},"work":{"type":"object","properties":{"title":{"type":"string"},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]}},"required":["title","medium","cover"],"additionalProperties":false},"episodeId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string"},"releaseId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["pages","strip","prose","video","audio","post"]},"manifestUrl":{"type":"string","format":"uri"},"filesBase":{"type":"string","format":"uri"},"restricted":{"type":"boolean"},"access":{"type":"string","enum":["free","waitForFree","earlyAccess","paid"]},"direction":{"anyOf":[{"type":"string","enum":["rtl","ltr"]},{"type":"null"}]},"previous":{"anyOf":[{"type":"object","properties":{"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string"}},"required":["number","title"],"additionalProperties":false},{"type":"null"}]},"next":{"anyOf":[{"type":"object","properties":{"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string"}},"required":["number","title"],"additionalProperties":false},{"type":"null"}]},"episodes":{"type":"array","items":{"type":"object","properties":{"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string"},"access":{"type":"string","enum":["free","waitForFree","earlyAccess","paid"]}},"required":["number","title","access"],"additionalProperties":false}}},"required":["workId","work","episodeId","edition","number","title","releaseId","kind","manifestUrl","filesBase","restricted","access","direction","previous","next","episodes"],"additionalProperties":false},{"type":"null"}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishing.site.creator":{"post":{"operationId":"publishing.site.creator","summary":"Read a creator page by handle: works, posts and notes.","tags":["publishing"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"handle":{"type":"string","minLength":1,"maxLength":64},"lang":{"type":"string","enum":["ja","en"]}},"required":["handle","lang"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"anyOf":[{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"handle":{"type":"string"},"name":{"type":"string"},"avatar":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"bio":{"type":"string"},"links":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"}},"required":["label","url"],"additionalProperties":false}},"works":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}},"posts":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"synopsis":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"cover":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","synopsis","creator","workspaceId","cover","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false}},"notes":{"type":"array","items":{"type":"object","properties":{"noteId":{"type":"string","minLength":1},"lang":{"type":"string","enum":["ja","en"]},"title":{"type":"string"},"body":{"type":"string"},"workId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"publishedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"editedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["noteId","lang","title","body","workId","publishedAt","editedAt"],"additionalProperties":false}}},"required":["workspaceId","handle","name","avatar","bio","links","works","posts","notes"],"additionalProperties":false},{"type":"null"}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/models.model.list":{"post":{"operationId":"models.model.list","summary":"List the models a workspace can use, a page at a time: built-in models, models from the hub and the workspace’s custom models, for one capability or all.","tags":["models"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"capability":{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"maker":{"type":["string","null"]},"available":{"type":"boolean"},"status":{"type":"string","enum":["ready","waiting","failed"]},"capabilities":{"type":"array","items":{"type":"object","properties":{"capability":{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},"startingPrice":{"type":"number"},"price":{"type":"object","properties":{"unit":{"type":"string","enum":["output","second","thousandChars"]}},"required":["unit"],"additionalProperties":false}},"required":["capability","startingPrice","price"],"additionalProperties":false}}},"required":["modelId","names","maker","available","status","capabilities"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/models.model.speeds":{"post":{"operationId":"models.model.speeds","summary":"Read how long a generation usually takes on each model the workspace can use, from the first request to the last output’s delivery. Has only models measured often enough.","tags":["models"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"array","items":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"medianMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"generations":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"generatingMs":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"finishingMs":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["modelId","medianMs","generations","generatingMs","finishingMs"],"additionalProperties":false}},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/models.model.get":{"post":{"operationId":"models.model.get","summary":"Read one model: what it generates for each capability, its prices and license.","tags":["models"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"}},"required":["modelId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"kind":{"type":"string","enum":["model","checkpoint","lora"]},"subject":{"type":"string","enum":["general","style","character","concept"]},"family":{"anyOf":[{"type":"string","enum":["anima","animaTurbo"]},{"type":"null"}]},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"maker":{"type":["string","null"]},"category":{"anyOf":[{"type":"string","enum":["fast","anime","general","edit"]},{"type":"null"}]},"rank":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"series":{"type":"string"},"released":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string","enum":["text","photo"]}},"examples":{"type":"array","items":{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false}},"available":{"type":"boolean"},"status":{"type":"string","enum":["ready","waiting","failed"]},"capabilities":{"type":"array","items":{"type":"object","properties":{"capability":{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},"tasks":{"type":"array","items":{"type":"string"}},"inputs":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"kinds":{"type":"array","items":{"type":"string","enum":["text","document","canon","image","video","audio","mesh","frames","wordTimestamps"]}},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["role","kinds","max"],"additionalProperties":false}},"loras":{"type":"integer","minimum":0,"maximum":9007199254740991},"references":{"type":"integer","minimum":0,"maximum":9007199254740991},"characterSlots":{"type":"integer","minimum":0,"maximum":9007199254740991},"styleSlots":{"type":"integer","minimum":0,"maximum":9007199254740991},"frames":{"type":"integer","minimum":0,"maximum":2},"maxResolution":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}]},"durations":{"type":"array","items":{"type":"number","exclusiveMinimum":0}},"supportsAudio":{"type":"boolean"},"markup":{"type":"object","properties":{"mask":{"type":"string","enum":["none","optional","required"]},"regions":{"anyOf":[{"type":"object","properties":{"format":{"type":"string","enum":["described","single","perInput","drawn"]},"max":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["format","max"],"additionalProperties":false},{"type":"null"}]}},"required":["mask","regions"],"additionalProperties":false},"price":{"type":"object","properties":{"unit":{"type":"string","enum":["output","second","thousandChars"]},"rates":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"when":{"maxItems":8,"type":"array","items":{"anyOf":[{"type":"object","properties":{"setting":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"values":{"minItems":1,"maxItems":16,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}}},"required":["setting","values"],"additionalProperties":false},{"type":"object","properties":{"seconds":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"number","exclusiveMinimum":0}}},"required":["seconds"],"additionalProperties":false}]}},"coins":{"type":"number","exclusiveMinimum":0,"multipleOf":0.1}},"required":["when","coins"],"additionalProperties":false}},"inputSurcharges":{"type":"object","properties":{"image":{"type":"number","exclusiveMinimum":0,"multipleOf":0.1},"megapixel":{"type":"number","exclusiveMinimum":0,"multipleOf":0.1},"thousandBytes":{"type":"number","exclusiveMinimum":0,"multipleOf":0.1}},"additionalProperties":false}},"required":["unit","rates"],"additionalProperties":false},"priceDefaults":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"setting":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"value":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},"required":["setting","value"],"additionalProperties":false}},"startingPrice":{"type":"number","exclusiveMinimum":0}},"required":["capability","tasks","inputs","loras","references","characterSlots","styleSlots","frames","maxResolution","durations","supportsAudio","markup","price","priceDefaults","startingPrice"],"additionalProperties":false}},"evaluations":{"type":"array","items":{"type":"object","properties":{"capability":{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},"task":{"type":"string"},"result":{"type":"string","enum":["untested","approved","rejected"]}},"required":["capability","task","result"],"additionalProperties":false}},"defaults":{"type":"array","items":{"type":"object","properties":{"capability":{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},"task":{"type":"string"},"quality":{"type":"string","enum":["fast","high"]},"rank":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["capability","task","quality","rank"],"additionalProperties":false}},"triggerWords":{"type":"array","items":{"type":"string"}},"license":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"commercial":{"type":"boolean"}},"required":["name","url","commercial"],"additionalProperties":false},"visibility":{"type":"string","enum":["private","workspace","public"]},"workspaceId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"builtIn":{"type":"boolean"},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["builtIn","upload","civitai","huggingface"]},"url":{"type":["string","null"]}},"required":["kind","url"],"additionalProperties":false},"deletable":{"type":"boolean"}},"required":["modelId","kind","subject","family","names","description","maker","category","rank","series","released","tags","examples","available","status","capabilities","evaluations","defaults","triggerWords","license","visibility","workspaceId","builtIn","source","deletable"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/models.hub.list":{"post":{"operationId":"models.hub.list","summary":"List the model hub, a page at a time: models people published, newest first.","tags":["models"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"family":{"type":"string","enum":["anima","animaTurbo"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"maker":{"type":["string","null"]},"available":{"type":"boolean"},"status":{"type":"string","enum":["ready","waiting","failed"]},"capabilities":{"type":"array","items":{"type":"object","properties":{"capability":{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},"startingPrice":{"type":"number"},"price":{"type":"object","properties":{"unit":{"type":"string","enum":["output","second","thousandChars"]}},"required":["unit"],"additionalProperties":false}},"required":["capability","startingPrice","price"],"additionalProperties":false}}},"required":["modelId","names","maker","available","status","capabilities"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/models.upload.begin":{"post":{"operationId":"models.upload.begin","summary":"Start uploading checkpoint or LoRA weights to a workspace. The file goes straight to storage.","tags":["models"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["checkpoint","lora"]},"subject":{"type":"string","enum":["general","style","character","concept"]},"family":{"type":"string","enum":["anima","animaTurbo"]},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"triggerWords":{"maxItems":16,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"filename":{"type":"string","minLength":1,"maxLength":200},"bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["kind","subject","family","names","triggerWords","filename","bytes","sha256"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"upload":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expiresAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["url","headers","expiresAt"],"additionalProperties":false}},"required":["modelId","upload"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/models.upload.complete":{"post":{"operationId":"models.upload.complete","summary":"Finish an upload after the file arrives. The model can be used right away.","tags":["models"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["modelId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"}},"required":["modelId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/models.import.start":{"post":{"operationId":"models.import.start","summary":"Import a checkpoint or LoRA into a workspace from its Civitai or Hugging Face URL.","tags":["models"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":500,"format":"uri"},"subject":{"type":"string","enum":["general","style","character","concept"]},"family":{"type":"string","enum":["anima","animaTurbo"]},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["url","subject","family"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"}},"required":["modelId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/models.model.setVisibility":{"post":{"operationId":"models.model.setVisibility","summary":"Publish a workspace’s model on the model hub, or limit it to the workspace or to its owner.","tags":["models"],"x-qmoon-action":"publish","x-qmoon-scope":"publish","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"visibility":{"type":"string","enum":["private","workspace","public"]}},"required":["modelId","visibility"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/models.model.delete":{"post":{"operationId":"models.model.delete","summary":"Move a workspace’s model to Recently deleted. It can be restored for 30 days.","tags":["models"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"}},"required":["modelId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/models.model.restore":{"post":{"operationId":"models.model.restore","summary":"Restore a model from Recently deleted.","tags":["models"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"}},"required":["modelId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/models.model.settings":{"post":{"operationId":"models.model.settings","summary":"List a model’s settings for a capability. Set them in intent.details.params, with this model as intent.details.modelId. Common settings have their own fields, except resolution, audio, set and layers.","tags":["models"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"capability":{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"}},"required":["modelId","capability"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"maxItems":160,"type":"array","items":{"oneOf":[{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"choice"},"options":{"minItems":1,"maxItems":4096,"type":"array","items":{"type":"object","properties":{"value":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"formats":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","maxLength":16}},"constraints":{"type":"object","properties":{"requires":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"excludes":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"caps":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"max":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","max"],"additionalProperties":false}},"pixels":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"required":["value"],"additionalProperties":false}},"default":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},"required":["name","label","required","kind","options"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","enum":["number","integer"]},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"keywords":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":200}},"default":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},"required":["name","label","required","kind"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"boolean"},"default":{"type":"boolean"},"constraints":{"type":"object","properties":{"requires":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"excludes":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"caps":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"max":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","max"],"additionalProperties":false}},"pixels":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"required":["name","label","required","kind"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"text"},"minLength":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxLength":{"type":"integer","exclusiveMinimum":0,"maximum":64000},"pattern":{"type":"string","maxLength":200},"default":{"type":"string","maxLength":64000}},"required":["name","label","required","kind","maxLength"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"color"},"format":{"type":"string","enum":["hex","rgb"]},"default":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"}},"required":["name","label","required","kind","format"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","enum":["image","video","audio"]},"min":{"type":"integer","minimum":0,"maximum":9007199254740991},"max":{"type":"integer","minimum":1,"maximum":64},"list":{"type":"boolean"}},"required":["name","label","required","kind","min","max","list"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"values"},"min":{"type":"integer","minimum":0,"maximum":9007199254740991},"max":{"type":"integer","minimum":1,"maximum":64},"item":{"oneOf":[{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"choice"},"options":{"minItems":1,"maxItems":4096,"type":"array","items":{"type":"object","properties":{"value":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"formats":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","maxLength":16}},"constraints":{"type":"object","properties":{"requires":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"excludes":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"caps":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"max":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","max"],"additionalProperties":false}},"pixels":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"required":["value"],"additionalProperties":false}},"default":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},"required":["name","label","required","kind","options"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","enum":["number","integer"]},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"keywords":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":200}},"default":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},"required":["name","label","required","kind"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"boolean"},"default":{"type":"boolean"},"constraints":{"type":"object","properties":{"requires":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"excludes":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"caps":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"max":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","max"],"additionalProperties":false}},"pixels":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"required":["name","label","required","kind"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"text"},"minLength":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxLength":{"type":"integer","exclusiveMinimum":0,"maximum":64000},"pattern":{"type":"string","maxLength":200},"default":{"type":"string","maxLength":64000}},"required":["name","label","required","kind","maxLength"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"color"},"format":{"type":"string","enum":["hex","rgb"]},"default":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"}},"required":["name","label","required","kind","format"],"additionalProperties":false}]}},"required":["name","label","required","kind","min","max","item"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"size"},"range":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"},"multiple":{"type":"number","exclusiveMinimum":0}},"required":["min","max"],"additionalProperties":false},"area":{"type":"object","properties":{"min":{"type":"number","exclusiveMinimum":0},"max":{"type":"number","exclusiveMinimum":0}},"additionalProperties":false},"ratio":{"type":"object","properties":{"min":{"type":"number","exclusiveMinimum":0},"max":{"type":"number","exclusiveMinimum":0}},"additionalProperties":false},"sizes":{"maxItems":160,"type":"array","items":{"type":"object","properties":{"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"resolution":{"type":"string","maxLength":16}},"required":["width","height"],"additionalProperties":false}}},"required":["name","label","required","kind","sizes"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"lora"},"max":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["name","label","required","kind","max"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"list"},"min":{"type":"integer","minimum":0,"maximum":9007199254740991},"max":{"type":"integer","minimum":1,"maximum":64},"item":{"minItems":1,"maxItems":24,"type":"array","items":{"oneOf":[{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"choice"},"options":{"minItems":1,"maxItems":4096,"type":"array","items":{"type":"object","properties":{"value":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"formats":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","maxLength":16}},"constraints":{"type":"object","properties":{"requires":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"excludes":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"caps":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"max":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","max"],"additionalProperties":false}},"pixels":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"required":["value"],"additionalProperties":false}},"default":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},"required":["name","label","required","kind","options"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","enum":["number","integer"]},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"keywords":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":200}},"default":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},"required":["name","label","required","kind"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"boolean"},"default":{"type":"boolean"},"constraints":{"type":"object","properties":{"requires":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"excludes":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"caps":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"max":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","max"],"additionalProperties":false}},"pixels":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"required":["name","label","required","kind"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"text"},"minLength":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxLength":{"type":"integer","exclusiveMinimum":0,"maximum":64000},"pattern":{"type":"string","maxLength":200},"default":{"type":"string","maxLength":64000}},"required":["name","label","required","kind","maxLength"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"color"},"format":{"type":"string","enum":["hex","rgb"]},"default":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"}},"required":["name","label","required","kind","format"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","enum":["image","video","audio"]},"min":{"type":"integer","minimum":0,"maximum":9007199254740991},"max":{"type":"integer","minimum":1,"maximum":64},"list":{"type":"boolean"}},"required":["name","label","required","kind","min","max","list"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"values"},"min":{"type":"integer","minimum":0,"maximum":9007199254740991},"max":{"type":"integer","minimum":1,"maximum":64},"item":{"oneOf":[{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"choice"},"options":{"minItems":1,"maxItems":4096,"type":"array","items":{"type":"object","properties":{"value":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"formats":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","maxLength":16}},"constraints":{"type":"object","properties":{"requires":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"excludes":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"caps":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"max":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","max"],"additionalProperties":false}},"pixels":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"required":["value"],"additionalProperties":false}},"default":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},"required":["name","label","required","kind","options"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","enum":["number","integer"]},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"keywords":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":200}},"default":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},"required":["name","label","required","kind"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"boolean"},"default":{"type":"boolean"},"constraints":{"type":"object","properties":{"requires":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"excludes":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"caps":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"max":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","max"],"additionalProperties":false}},"pixels":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"required":["name","label","required","kind"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"text"},"minLength":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxLength":{"type":"integer","exclusiveMinimum":0,"maximum":64000},"pattern":{"type":"string","maxLength":200},"default":{"type":"string","maxLength":64000}},"required":["name","label","required","kind","maxLength"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"color"},"format":{"type":"string","enum":["hex","rgb"]},"default":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"}},"required":["name","label","required","kind","format"],"additionalProperties":false}]}},"required":["name","label","required","kind","min","max","item"],"additionalProperties":false}]}}},"required":["name","label","required","kind","min","max","item"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":1000},"en":{"type":"string","maxLength":1000}},"additionalProperties":false},"required":{"type":"boolean"},"common":{"type":"string","enum":["prompt","negativePrompt","text","size","count","set","layers","resolution","seed","duration","references","characters","styles","frames","source","initImage","mask","motion","speech","regions","outpaint","audio","lora","palette"]},"qmoonDefault":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},"requiredWithin":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"group":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"kind":{"type":"string","const":"regions"},"format":{"type":"string","enum":["described","single","perInput"]},"max":{"type":"integer","minimum":1,"maximum":64}},"required":["name","label","required","kind","format","max"],"additionalProperties":false}]}},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generation.generation.create":{"post":{"operationId":"generation.generation.create","summary":"Generate images, a video, speech, a voice, music, a sound effect or a 3D mesh from an intent, on a document or in the workspace’s Create. Charges coins. Returns the generation ID.","tags":["generation"],"x-qmoon-action":"charge","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"recordId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"placement":{"type":"object","properties":{"anchor":{"type":"array","prefixItems":[{"type":"number","minimum":-1000000,"maximum":1000000},{"type":"number","minimum":-1000000,"maximum":1000000}],"items":false,"minItems":2,"maxItems":2},"viewport":{"type":"object","properties":{"x":{"type":"number","minimum":-1000000,"maximum":1000000},"y":{"type":"number","minimum":-1000000,"maximum":1000000},"w":{"type":"number","exclusiveMinimum":0,"maximum":2000000},"h":{"type":"number","exclusiveMinimum":0,"maximum":2000000}},"required":["x","y","w","h"],"additionalProperties":false}},"required":["anchor","viewport"],"additionalProperties":false},"capability":{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},"intent":{"type":"object","properties":{"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":64000},"en":{"type":"string","maxLength":64000}},"additionalProperties":false},"mentions":{"default":[],"maxItems":15,"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"include":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"exclude":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"description":{"type":"string","maxLength":4000},"promptText":{"type":"string","maxLength":2000},"negativeText":{"type":"string","maxLength":2000}},"required":["entryId"],"additionalProperties":false}},"references":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},"role":{"type":"string","enum":["characterDesign","style","reference"]}},"required":["ref","role"],"additionalProperties":false}},"keyframes":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},"required":["atMs","ref"],"additionalProperties":false}},"aspect":{"type":"string","pattern":"^[1-9][0-9]?:[1-9][0-9]?$"},"negativePrompt":{"type":"string","maxLength":64000},"palette":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"weight":{"type":"number","exclusiveMinimum":0,"maximum":100}},"required":["color"],"additionalProperties":false}},"regions":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"left":{"type":"number","minimum":0,"maximum":1},"top":{"type":"number","minimum":0,"maximum":1},"right":{"type":"number","minimum":0,"maximum":1},"bottom":{"type":"number","minimum":0,"maximum":1},"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false}},"required":["left","top","right","bottom"],"additionalProperties":false}},"extend":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":2},"right":{"type":"number","minimum":0,"maximum":2},"bottom":{"type":"number","minimum":0,"maximum":2},"left":{"type":"number","minimum":0,"maximum":2}},"required":["top","right","bottom","left"],"additionalProperties":false},"details":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"seed":{"type":"integer","minimum":0,"maximum":9007199254740991},"loras":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"weight":{"type":"number","minimum":-4,"maximum":4}},"required":["model","weight"],"additionalProperties":false}},"params":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}}]}}}]}}},"additionalProperties":false}},"required":["prompt"],"additionalProperties":false},"count":{"type":"integer","minimum":1,"maximum":4},"quality":{"type":"string","enum":["fast","high"]},"sources":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"assetId":{"type":"string","minLength":1}},"required":["role","assetId"],"additionalProperties":false}},"seconds":{"type":"number","exclusiveMinimum":0,"maximum":300},"text":{"type":"string","maxLength":64000},"episodeId":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["capability","intent","count","quality","sources","requestId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"generationId":{"type":"string","minLength":1}},"required":["generationId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generation.generation.estimate":{"post":{"operationId":"generation.generation.estimate","summary":"Estimate a generation without starting it: the model it would run on, the prompt as the model receives it and the cost in coins. Charges nothing.","tags":["generation"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"recordId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"placement":{"type":"object","properties":{"anchor":{"type":"array","prefixItems":[{"type":"number","minimum":-1000000,"maximum":1000000},{"type":"number","minimum":-1000000,"maximum":1000000}],"items":false,"minItems":2,"maxItems":2},"viewport":{"type":"object","properties":{"x":{"type":"number","minimum":-1000000,"maximum":1000000},"y":{"type":"number","minimum":-1000000,"maximum":1000000},"w":{"type":"number","exclusiveMinimum":0,"maximum":2000000},"h":{"type":"number","exclusiveMinimum":0,"maximum":2000000}},"required":["x","y","w","h"],"additionalProperties":false}},"required":["anchor","viewport"],"additionalProperties":false},"capability":{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},"intent":{"type":"object","properties":{"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":64000},"en":{"type":"string","maxLength":64000}},"additionalProperties":false},"mentions":{"default":[],"maxItems":15,"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"include":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"exclude":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"description":{"type":"string","maxLength":4000},"promptText":{"type":"string","maxLength":2000},"negativeText":{"type":"string","maxLength":2000}},"required":["entryId"],"additionalProperties":false}},"references":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},"role":{"type":"string","enum":["characterDesign","style","reference"]}},"required":["ref","role"],"additionalProperties":false}},"keyframes":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},"required":["atMs","ref"],"additionalProperties":false}},"aspect":{"type":"string","pattern":"^[1-9][0-9]?:[1-9][0-9]?$"},"negativePrompt":{"type":"string","maxLength":64000},"palette":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"weight":{"type":"number","exclusiveMinimum":0,"maximum":100}},"required":["color"],"additionalProperties":false}},"regions":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"left":{"type":"number","minimum":0,"maximum":1},"top":{"type":"number","minimum":0,"maximum":1},"right":{"type":"number","minimum":0,"maximum":1},"bottom":{"type":"number","minimum":0,"maximum":1},"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false}},"required":["left","top","right","bottom"],"additionalProperties":false}},"extend":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":2},"right":{"type":"number","minimum":0,"maximum":2},"bottom":{"type":"number","minimum":0,"maximum":2},"left":{"type":"number","minimum":0,"maximum":2}},"required":["top","right","bottom","left"],"additionalProperties":false},"details":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"seed":{"type":"integer","minimum":0,"maximum":9007199254740991},"loras":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"weight":{"type":"number","minimum":-4,"maximum":4}},"required":["model","weight"],"additionalProperties":false}},"params":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}}]}}}]}}},"additionalProperties":false}},"required":["prompt"],"additionalProperties":false},"count":{"type":"integer","minimum":1,"maximum":4},"quality":{"type":"string","enum":["fast","high"]},"sources":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"assetId":{"type":"string","minLength":1}},"required":["role","assetId"],"additionalProperties":false}},"seconds":{"type":"number","exclusiveMinimum":0,"maximum":300},"text":{"type":"string","maxLength":64000},"episodeId":{"type":"string","minLength":1}},"required":["capability","intent","count","quality","sources"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"ready"},"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"prompt":{"type":"string"},"promptParts":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"source":{"type":"string","enum":["user","description","promptText","trigger"]},"entryId":{"type":"string","minLength":1}},"required":["text","source"],"additionalProperties":false}},"negativePrompt":{"type":["string","null"]},"mentions":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]},"sentFiles":{"type":"array","items":{"type":"string","minLength":1}},"waitingFiles":{"type":"array","items":{"type":"string","minLength":1}},"excludedFiles":{"type":"array","items":{"type":"string","minLength":1}},"sendable":{"type":"integer","minimum":0,"maximum":9007199254740991},"descriptionSent":{"type":"string"},"promptTextSent":{"type":"string"},"negativeTextSent":{"type":"string"},"partsNotUsed":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"model"},"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"reason":{"type":"string","enum":["alreadySet","unsupported"]}},"required":["kind","model","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"setting"},"setting":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}}]}}}]},"reason":{"type":"string","enum":["alreadySet","unsupported","changesPrice"]}},"required":["kind","setting","value","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"lora"},"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"reason":{"type":"string","enum":["wrongFamily","unsupported","limit","unavailable"]}},"required":["kind","model","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"palette"},"reason":{"type":"string","enum":["alreadySet","unsupported"]}},"required":["kind","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"negativeText"},"reason":{"type":"string","const":"unsupported"}},"required":["kind","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"file"},"assetId":{"type":"string","minLength":1},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"reason":{"type":"string","enum":["unsupported","excludedByInput"]}},"required":["kind","assetId","role","reason"],"additionalProperties":false}]}}},"required":["entryId","variant","sentFiles","waitingFiles","excludedFiles","sendable","descriptionSent","promptTextSent","negativeTextSent","partsNotUsed"],"additionalProperties":false}},"coins":{"type":"integer","minimum":0,"maximum":9007199254740991},"blocked":{"anyOf":[{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}},{"type":"null"}]}},"required":["kind","modelId","names","prompt","promptParts","negativePrompt","mentions","coins","blocked"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"failed"},"error":{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}}},"required":["kind","error"],"additionalProperties":false}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generation.generation.retry":{"post":{"operationId":"generation.generation.retry","summary":"Retry a generation’s failed, blocked or canceled outputs in place, with a new seed.","tags":["generation"],"x-qmoon-action":"charge","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"generationId":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["generationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"retried":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["retried"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generation.generation.get":{"post":{"operationId":"generation.generation.get","summary":"Read one generation: its state, and each output’s state and asset.","tags":["generation"],"x-qmoon-action":"read","x-qmoon-scope":"read","parameters":[{"name":"Prefer","in":"header","required":false,"description":"wait=n keeps the read open for up to n seconds (at most 25) until the result settles. Without it, the read responds immediately. preview=first or preview=each adds assets: each asset the result names, with links to its files and its preview, the first one or each, as base64. Without it, call media.asset.files for the files.","schema":{"type":"string","examples":["wait=20, preview=first"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"generationId":{"type":"string","minLength":1}},"required":["generationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done. `settled` says whether the result had settled. Preference-Applied says how long the read waited.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"generationId":{"type":"string","minLength":1},"capability":{"anyOf":[{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},{"type":"null"}]},"mediaKind":{"type":"string","enum":["image","video","audio","mesh","other"]},"quality":{"anyOf":[{"type":"string","enum":["fast","high"]},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","done","failed","canceled"]},"failureReason":{"anyOf":[{"type":"string","enum":["blocked","refused","unavailable","timedOut","failed"]},{"type":"null"}]},"count":{"type":"integer","minimum":1,"maximum":9007199254740991},"multiOutput":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"set"},"outputCount":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","outputCount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"layers"},"format":{"type":"string","enum":["pages","boxes"]},"outputCount":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","format","outputCount"],"additionalProperties":false}]},{"type":"null"}]},"outputs":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["pending","delivered","failed","blocked","canceled"]},"assetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"failureReason":{"anyOf":[{"type":"string","enum":["blocked","refused","unavailable","timedOut","failed"]},{"type":"null"}]},"effectFailure":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["threw","timeLimit","memory","crashed","drewNothing"]},"detail":{"type":"string"}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"progress":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"queued"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"generating"},"since":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","since"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"finishing"},"since":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","since"],"additionalProperties":false}]},{"type":"null"}]},"reported":{"type":"boolean"}},"required":["index","state","assetId","failureReason","effectFailure","progress","reported"],"additionalProperties":false}},"cancelable":{"type":"boolean"},"destination":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"recordId":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]}},"required":["documentId","recordId"],"additionalProperties":false},{"type":"null"}]},"modelId":{"anyOf":[{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},{"type":"null"}]},"prompt":{"type":"string"},"negativePrompt":{"type":["string","null"]},"othersApp":{"anyOf":[{"type":"object","properties":{"title":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"appId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"label":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"value":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"file"},"assetId":{"type":"string","minLength":1}},"required":["kind","assetId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text"},"text":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"entry"},"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["kind","entryId"],"additionalProperties":false}]}},"required":["label","value"],"additionalProperties":false}}},"required":["title","appId","versionId","runId","creator","fields"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"completedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["generationId","capability","mediaKind","quality","state","failureReason","count","multiOutput","outputs","cancelable","destination","modelId","prompt","negativePrompt","othersApp","createdAt","completedAt"],"additionalProperties":false},"settled":{"type":"boolean"},"assets":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"links":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[0-9A-Za-z_-]{1,128}$"},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","url","expiresAt","mediaType","bytes"],"additionalProperties":false}},"preview":{"anyOf":[{"type":"object","properties":{"mediaType":{"type":"string"},"base64":{"type":"string"}},"required":["mediaType","base64"],"additionalProperties":false},{"type":"null"}]}},"required":["assetId","links","preview"],"additionalProperties":false}}},"required":["status","output","settled"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generation.generation.list":{"post":{"operationId":"generation.generation.list","summary":"List a document’s generations, or one record’s. Without a document, list the generations in the workspace’s Create. Newest first, a page at a time.","tags":["generation"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"documentId":{"type":"string","minLength":1},"recordId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"generationId":{"type":"string","minLength":1},"capability":{"anyOf":[{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","done","failed","canceled"]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputs":{"type":"array","items":{"type":"object","properties":{"assetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["assetId"],"additionalProperties":false}}},"required":["generationId","capability","state","createdAt","outputs"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generation.activity.get":{"post":{"operationId":"generation.activity.get","summary":"Read the person’s queued and running generations in a workspace, oldest first, each with its session. Up to 50 in each state.","tags":["generation"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"generations":{"type":"array","items":{"type":"object","properties":{"generationId":{"type":"string","minLength":1},"state":{"type":"string","enum":["queued","running"]},"capability":{"anyOf":[{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},{"type":"null"}]},"sessionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["generationId","state","capability","sessionId"],"additionalProperties":false}}},"required":["generations"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generation.generation.cancel":{"post":{"operationId":"generation.generation.cancel","summary":"Cancel a generation’s outputs that haven’t been sent to a model. Outputs already sent are still generated and charged, and delivered outputs stay.","tags":["generation"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"generationId":{"type":"string","minLength":1}},"required":["generationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"canceled":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["canceled","sent"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generation.writingHelp.estimate":{"post":{"operationId":"generation.writingHelp.estimate","summary":"Show what writing help would read beside a request in a chapter, and the most it can cost in coins. Charges nothing.","tags":["generation"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"request":{"type":"string","maxLength":2000},"removed":{"type":"object","properties":{"premise":{"type":"boolean"},"storySoFar":{"type":"boolean"},"chapter":{"type":"boolean"},"entryIds":{"maxItems":64,"type":"array","items":{"type":"string","minLength":1}}},"required":["premise","storySoFar","chapter","entryIds"],"additionalProperties":false},"prompt":{"type":"boolean"}},"required":["documentId","request","removed","prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"kind":{"type":"string","const":"ready"},"context":{"type":"object","properties":{"premise":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["sent","removed"]},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["state","chars"],"additionalProperties":false},{"type":"null"}]},"entries":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"name":{"type":"string"},"state":{"type":"string","enum":["sent","removed","tooLong"]},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["entryId","name","state","chars"],"additionalProperties":false}},"storySoFar":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["sent","removed"]},"episodes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"cut":{"type":"boolean"},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["state","episodes","cut","chars"],"additionalProperties":false},{"type":"null"}]},"chapter":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["sent","removed"]},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"cut":{"type":"boolean"}},"required":["state","chars","cut"],"additionalProperties":false},{"type":"null"}]}},"required":["premise","entries","storySoFar","chapter"],"additionalProperties":false},"prompt":{"type":["string","null"]},"coins":{"type":"integer","minimum":0,"maximum":9007199254740991},"blocked":{"anyOf":[{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}},{"type":"null"}]}},"required":["kind","context","prompt","coins","blocked"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generation.writingHelp.create":{"post":{"operationId":"generation.writingHelp.create","summary":"Ask for text in a chapter, written with the story as context. Charges coins. Read the text with generation.writingHelp.getLatest.","tags":["generation"],"x-qmoon-action":"charge","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"request":{"type":"string","maxLength":2000},"removed":{"type":"object","properties":{"premise":{"type":"boolean"},"storySoFar":{"type":"boolean"},"chapter":{"type":"boolean"},"entryIds":{"maxItems":64,"type":"array","items":{"type":"string","minLength":1}}},"required":["premise","storySoFar","chapter","entryIds"],"additionalProperties":false},"shown":{"type":"object","properties":{"premise":{"type":"boolean"},"storySoFar":{"type":"boolean"},"chapter":{"type":"boolean"},"entryIds":{"maxItems":64,"type":"array","items":{"type":"string","minLength":1}},"coins":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["premise","storySoFar","chapter","entryIds","coins"],"additionalProperties":false},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["documentId","request","removed","shown","requestId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"created"},"helpId":{"type":"string","minLength":1},"token":{"type":"string"},"url":{"type":"string"}},"required":["kind","helpId","token","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"started"},"helpId":{"type":"string","minLength":1}},"required":["kind","helpId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"changed"},"estimate":{"type":"object","properties":{"kind":{"type":"string","const":"ready"},"context":{"type":"object","properties":{"premise":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["sent","removed"]},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["state","chars"],"additionalProperties":false},{"type":"null"}]},"entries":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"name":{"type":"string"},"state":{"type":"string","enum":["sent","removed","tooLong"]},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["entryId","name","state","chars"],"additionalProperties":false}},"storySoFar":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["sent","removed"]},"episodes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"cut":{"type":"boolean"},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["state","episodes","cut","chars"],"additionalProperties":false},{"type":"null"}]},"chapter":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["sent","removed"]},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"cut":{"type":"boolean"}},"required":["state","chars","cut"],"additionalProperties":false},{"type":"null"}]}},"required":["premise","entries","storySoFar","chapter"],"additionalProperties":false},"prompt":{"type":["string","null"]},"coins":{"type":"integer","minimum":0,"maximum":9007199254740991},"blocked":{"anyOf":[{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}},{"type":"null"}]}},"required":["kind","context","prompt","coins","blocked"],"additionalProperties":false}},"required":["kind","estimate"],"additionalProperties":false}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generation.writingHelp.getLatest":{"post":{"operationId":"generation.writingHelp.getLatest","summary":"Read your latest writing help request in a chapter that you haven’t inserted or discarded.","tags":["generation"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"anyOf":[{"type":"object","properties":{"helpId":{"type":"string","minLength":1},"request":{"type":"string"},"state":{"type":"string","enum":["queued","running","done","stopped","failed"]},"text":{"type":["string","null"]},"coins":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["helpId","request","state","text","coins"],"additionalProperties":false},{"type":"null"}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/generation.writingHelp.dismiss":{"post":{"operationId":"generation.writingHelp.dismiss","summary":"Stop showing a writing help request in the chapter, once the text was inserted or discarded.","tags":["generation"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"helpId":{"type":"string","minLength":1}},"required":["documentId","helpId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.reader.work":{"post":{"operationId":"audience.reader.work","summary":"Read the reader’s Library entry, progress, follow, purchases and review for one work.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]}},"required":["workId","edition"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"library":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["reading","planned","completed","dropped"]},"notify":{"type":"boolean"}},"required":["status","notify"],"additionalProperties":false},{"type":"null"}]},"following":{"anyOf":[{"type":"object","properties":{"notify":{"type":"boolean"}},"required":["notify"],"additionalProperties":false},{"type":"null"}]},"progress":{"anyOf":[{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"resume":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"releaseId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"anchor":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"page"},"index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","index"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paragraph"},"id":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"offset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","id","offset"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"second"},"at":{"type":"number","minimum":0}},"required":["kind","at"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"scroll"},"at":{"type":"number","minimum":0,"maximum":1}},"required":["kind","at"],"additionalProperties":false}]},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["episodeId","releaseId","number","anchor","at"],"additionalProperties":false},"furthest":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["episodeId","number"],"additionalProperties":false},"finished":{"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","resume","furthest","finished","updatedAt"],"additionalProperties":false},{"type":"null"}]},"entitlement":{"type":"object","properties":{"unlocked":{"type":"array","items":{"type":"string","minLength":1}},"rentals":{"type":"array","items":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"until":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["episodeId","until"],"additionalProperties":false}},"waitForFreeAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["unlocked","rentals","waitForFreeAt"],"additionalProperties":false},"review":{"anyOf":[{"type":"object","properties":{"reviewId":{"type":"string","minLength":1},"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"stars":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3}]},"body":{"type":["string","null"]},"spoiler":{"type":"boolean"},"author":{"type":"object","properties":{"name":{"type":["string","null"]},"handle":{"type":["string","null"]},"tag":{"type":"string"},"own":{"type":"boolean"}},"required":["name","handle","tag","own"],"additionalProperties":false},"hidden":{"anyOf":[{"type":"string","enum":["creator","staff"]},{"type":"null"}]},"at":{"type":"number","minimum":0}},"required":["reviewId","workId","edition","stars","body","spoiler","author","hidden","at"],"additionalProperties":false},{"type":"null"}]}},"required":["library","following","progress","entitlement","review"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.reader.episode":{"post":{"operationId":"audience.reader.episode","summary":"Read whether the reader can open an episode now, their 応援, like and finished mark on it, their Library entry and progress in the work, and the work’s episodes they own.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]}},"required":["episodeId","edition"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"access":{"type":"string","enum":["free","owned","locked"]},"availability":{"type":"object","properties":{"access":{"type":"string","enum":["free","waitForFree","earlyAccess","paid"]},"opensAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"unlockCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"rentalCoins":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["access","opensAt","unlockCoins","rentalCoins"],"additionalProperties":false},"rentalUntil":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"waitForFreeAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"cheered":{"type":"boolean"},"liked":{"type":"boolean"},"finished":{"type":"boolean"},"library":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["reading","planned","completed","dropped"]},"notify":{"type":"boolean"}},"required":["status","notify"],"additionalProperties":false},{"type":"null"}]},"progress":{"anyOf":[{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"resume":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"releaseId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"anchor":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"page"},"index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","index"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paragraph"},"id":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"offset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","id","offset"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"second"},"at":{"type":"number","minimum":0}},"required":["kind","at"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"scroll"},"at":{"type":"number","minimum":0,"maximum":1}},"required":["kind","at"],"additionalProperties":false}]},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["episodeId","releaseId","number","anchor","at"],"additionalProperties":false},"furthest":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["episodeId","number"],"additionalProperties":false},"finished":{"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","resume","furthest","finished","updatedAt"],"additionalProperties":false},{"type":"null"}]},"owned":{"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}},"required":["episodeId","access","availability","rentalUntil","waitForFreeAt","cheered","liked","finished","library","progress","owned"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.library.list":{"post":{"operationId":"audience.library.list","summary":"List the reader’s Library works with one status, most recently changed first, a page at a time.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"status":{"type":"string","enum":["reading","planned","completed","dropped"]},"lang":{"type":"string","enum":["ja","en"]}},"required":["status","lang"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"status":{"type":"string","enum":["reading","planned","completed","dropped"]},"notify":{"type":"boolean"},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"card":{"anyOf":[{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","creator","workspaceId","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false},{"type":"null"}]},"progress":{"anyOf":[{"type":"object","properties":{"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"finished":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["number","finished"],"additionalProperties":false},{"type":"null"}]}},"required":["workId","status","notify","updatedAt","card","progress"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.library.history":{"post":{"operationId":"audience.library.history","summary":"List the works the reader has read, most recent first: the Continue row and history.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"card":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","creator","workspaceId","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false},"progress":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"resume":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"releaseId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"anchor":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"page"},"index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","index"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paragraph"},"id":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"offset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","id","offset"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"second"},"at":{"type":"number","minimum":0}},"required":["kind","at"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"scroll"},"at":{"type":"number","minimum":0,"maximum":1}},"required":["kind","at"],"additionalProperties":false}]},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["episodeId","releaseId","number","anchor","at"],"additionalProperties":false},"furthest":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["episodeId","number"],"additionalProperties":false},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","resume","furthest","updatedAt"],"additionalProperties":false},"title":{"type":"string"}},"required":["card","progress","title"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.library.purchases":{"post":{"operationId":"audience.library.purchases","summary":"List the works the reader bought episodes of, each with its unlocked and rented episodes and where each one opens.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"lang":{"type":"string","enum":["ja","en"]}},"required":["lang"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"card":{"anyOf":[{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":"string"},"tagline":{"type":"string"},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"string"}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"flags":{"maxItems":3,"type":"array","items":{"type":"string","enum":["sexual","violence","gore"]}},"serial":{"type":"string","enum":["ongoing","hiatus","complete"]},"access":{"type":"string","enum":["free","waitForFree","paid"]},"episodes":{"type":"integer","minimum":0,"maximum":9007199254740991},"chars":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"oneShot":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"lastReleaseAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","medium","title","tagline","creator","workspaceId","flags","serial","access","episodes","chars","durationMs","oneShot","tags","weekdays","lastReleaseAt"],"additionalProperties":false},{"type":"null"}]},"workId":{"type":"string","minLength":1},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]},"title":{"type":["string","null"]}},"required":["card","workId","medium","title"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.library.purchasedEpisodes":{"post":{"operationId":"audience.library.purchasedEpisodes","summary":"List the episodes the reader bought or rents of one work, a page at a time, with where each opens, also once the work has left the site.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"workId":{"type":"string","minLength":1},"lang":{"type":"string","enum":["ja","en"]}},"required":["workId","lang"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string"},"until":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"opens":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"site"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"retained"},"episodeId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]}},"required":["kind","episodeId","edition"],"additionalProperties":false}]},{"type":"null"}]}},"required":["episodeId","number","title","until","opens"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.creator.list":{"post":{"operationId":"audience.creator.list","summary":"List the creators the reader follows, most recently followed first.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"handle":{"type":"string"},"name":{"type":"string"},"notify":{"type":"boolean"}},"required":["workspaceId","handle","name","notify"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.progress.get":{"post":{"operationId":"audience.progress.get","summary":"Read the reader’s progress in a work’s edition.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]}},"required":["workId","edition"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"anyOf":[{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"resume":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"releaseId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"anchor":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"page"},"index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","index"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paragraph"},"id":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"offset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","id","offset"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"second"},"at":{"type":"number","minimum":0}},"required":["kind","at"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"scroll"},"at":{"type":"number","minimum":0,"maximum":1}},"required":["kind","at"],"additionalProperties":false}]},"at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["episodeId","releaseId","number","anchor","at"],"additionalProperties":false},"furthest":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["episodeId","number"],"additionalProperties":false},"finished":{"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workId","edition","resume","furthest","finished","updatedAt"],"additionalProperties":false},{"type":"null"}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.review.list":{"post":{"operationId":"audience.review.list","summary":"List a work’s reviews in an edition, newest first, a page at a time. Its ★ summary is on audience.review.summary.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]}},"required":["workId","edition"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"reviewId":{"type":"string","minLength":1},"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"stars":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3}]},"body":{"type":["string","null"]},"spoiler":{"type":"boolean"},"author":{"type":"object","properties":{"name":{"type":["string","null"]},"handle":{"type":["string","null"]},"tag":{"type":"string"},"own":{"type":"boolean"}},"required":["name","handle","tag","own"],"additionalProperties":false},"hidden":{"anyOf":[{"type":"string","enum":["creator","staff"]},{"type":"null"}]},"at":{"type":"number","minimum":0}},"required":["reviewId","workId","edition","stars","body","spoiler","author","hidden","at"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.review.summary":{"post":{"operationId":"audience.review.summary","summary":"Read a work’s ★ summary in an edition, and how many of its ratings came with a review.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]}},"required":["workId","edition"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"summary":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"mean":{"anyOf":[{"type":"number","minimum":1,"maximum":3},{"type":"null"}]},"byStars":{"type":"object","properties":{"1":{"type":"integer","minimum":0,"maximum":9007199254740991},"2":{"type":"integer","minimum":0,"maximum":9007199254740991},"3":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["1","2","3"],"additionalProperties":false}},"required":["count","mean","byStars"],"additionalProperties":false},"written":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["summary","written"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.comment.list":{"post":{"operationId":"audience.comment.list","summary":"List the comment threads on an episode, newest first, a page at a time.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"episodeId":{"type":"string","minLength":1}},"required":["episodeId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"commentId":{"type":"string","minLength":1},"episodeId":{"type":"string","minLength":1},"replyTo":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"author":{"type":"object","properties":{"name":{"type":["string","null"]},"handle":{"type":["string","null"]},"tag":{"type":"string"},"own":{"type":"boolean"}},"required":["name","handle","tag","own"],"additionalProperties":false},"body":{"type":"string"},"spoiler":{"type":"boolean"},"likes":{"type":"integer","minimum":0,"maximum":9007199254740991},"liked":{"type":"boolean"},"replies":{"type":"integer","minimum":0,"maximum":9007199254740991},"hearted":{"type":"boolean"},"hidden":{"anyOf":[{"type":"string","enum":["creator","filter","staff"]},{"type":"null"}]},"at":{"type":"number","minimum":0}},"required":["commentId","episodeId","replyTo","author","body","spoiler","likes","liked","replies","hearted","hidden","at"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.comment.replies":{"post":{"operationId":"audience.comment.replies","summary":"List a thread’s replies, oldest first, a page at a time.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"commentId":{"type":"string","minLength":1}},"required":["commentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"commentId":{"type":"string","minLength":1},"episodeId":{"type":"string","minLength":1},"replyTo":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"author":{"type":"object","properties":{"name":{"type":["string","null"]},"handle":{"type":["string","null"]},"tag":{"type":"string"},"own":{"type":"boolean"}},"required":["name","handle","tag","own"],"additionalProperties":false},"body":{"type":"string"},"spoiler":{"type":"boolean"},"likes":{"type":"integer","minimum":0,"maximum":9007199254740991},"liked":{"type":"boolean"},"replies":{"type":"integer","minimum":0,"maximum":9007199254740991},"hearted":{"type":"boolean"},"hidden":{"anyOf":[{"type":"string","enum":["creator","filter","staff"]},{"type":"null"}]},"at":{"type":"number","minimum":0}},"required":["commentId","episodeId","replyTo","author","body","spoiler","likes","liked","replies","hearted","hidden","at"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.block.list":{"post":{"operationId":"audience.block.list","summary":"List the reader’s blocks, mutes or Hide list, newest first, a page at a time.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"kind":{"type":"string","enum":["block","mute","hide"]}},"required":["kind"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["block","mute","hide"]},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"person"},"person":{"type":"object","properties":{"name":{"type":["string","null"]},"handle":{"type":["string","null"]},"tag":{"type":"string"},"own":{"type":"boolean"}},"required":["name","handle","tag","own"],"additionalProperties":false}},"required":["kind","person"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"creator"},"workspaceId":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["kind","workspaceId","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"work"},"workId":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["kind","workId","title"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"tag"},"name":{"type":"string"}},"required":["kind","name"],"additionalProperties":false}]}},"required":["blockId","kind","target"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.notifications.list":{"post":{"operationId":"audience.notifications.list","summary":"List the person’s notifications in one group, newest first, a page at a time. The unread count is on audience.notifications.unread.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"group":{"type":"string","enum":["needsYou","activity"]}},"required":["group"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"notificationId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["newEpisode","reply","firstCheer","firstComment","comments","proposal","suspended","suspensionLifted","removed","appealKept","appealReversed"]},"args":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]}},"needsYou":{"type":"boolean"},"subject":{"type":"object","properties":{"kind":{"type":"string","enum":["proposal","work","episode","comment","app"]},"id":{"type":"string"}},"required":["kind","id"],"additionalProperties":false},"read":{"type":"boolean"},"at":{"type":"number","minimum":0}},"required":["notificationId","kind","args","needsYou","subject","read","at"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.notifications.unread":{"post":{"operationId":"audience.notifications.unread","summary":"Count the person’s unread notifications in one group, up to 100.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"group":{"type":"string","enum":["needsYou","activity"]}},"required":["group"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"unread":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["unread"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.comment.moderate":{"post":{"operationId":"audience.comment.moderate","summary":"List the comments in a workspace’s audience, newest first, including hidden ones, a page at a time: every work’s, one work’s or one episode’s.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"workId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"episodeId":{"type":"string","minLength":1},"hiddenOnly":{"type":"boolean"}},"required":["workId","hiddenOnly"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"comment":{"type":"object","properties":{"commentId":{"type":"string","minLength":1},"episodeId":{"type":"string","minLength":1},"replyTo":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"author":{"type":"object","properties":{"name":{"type":["string","null"]},"handle":{"type":["string","null"]},"tag":{"type":"string"},"own":{"type":"boolean"}},"required":["name","handle","tag","own"],"additionalProperties":false},"body":{"type":"string"},"spoiler":{"type":"boolean"},"likes":{"type":"integer","minimum":0,"maximum":9007199254740991},"liked":{"type":"boolean"},"replies":{"type":"integer","minimum":0,"maximum":9007199254740991},"hearted":{"type":"boolean"},"hidden":{"anyOf":[{"type":"string","enum":["creator","filter","staff"]},{"type":"null"}]},"at":{"type":"number","minimum":0}},"required":["commentId","episodeId","replyTo","author","body","spoiler","likes","liked","replies","hearted","hidden","at"],"additionalProperties":false},"work":{"anyOf":[{"type":"object","properties":{"workId":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["workId","title"],"additionalProperties":false},{"type":"null"}]},"episode":{"anyOf":[{"type":"object","properties":{"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","enum":["episode","chapter","post"]}},"required":["number","unit"],"additionalProperties":false},{"type":"null"}]}},"required":["comment","work","episode"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.comment.heart":{"post":{"operationId":"audience.comment.heart","summary":"Give a comment in the workspace’s audience the creator’s heart, or remove it.","tags":["audience"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"commentId":{"type":"string","minLength":1},"on":{"type":"boolean"}},"required":["commentId","on"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.comment.hide":{"post":{"operationId":"audience.comment.hide","summary":"Hide a comment in the workspace’s audience from readers, or show it again.","tags":["audience"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"commentId":{"type":"string","minLength":1},"hidden":{"type":"boolean"}},"required":["commentId","hidden"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.filter.get":{"post":{"operationId":"audience.filter.get","summary":"Read the workspace’s keyword filters. Matching comments are hidden from readers until the creator shows them.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"words":{"type":"array","items":{"type":"string"}}},"required":["words"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.filter.set":{"post":{"operationId":"audience.filter.set","summary":"Replace the workspace’s keyword filters.","tags":["audience"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"words":{"type":"array","items":{"type":"string","minLength":1}}},"required":["words"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.review.moderate":{"post":{"operationId":"audience.review.moderate","summary":"List a work’s reviews in every edition, newest first, including hidden ones, a page at a time.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"workId":{"type":"string","minLength":1}},"required":["workId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"reviewId":{"type":"string","minLength":1},"workId":{"type":"string","minLength":1},"edition":{"type":"string","enum":["ja","en"]},"stars":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3}]},"body":{"type":["string","null"]},"spoiler":{"type":"boolean"},"author":{"type":"object","properties":{"name":{"type":["string","null"]},"handle":{"type":["string","null"]},"tag":{"type":"string"},"own":{"type":"boolean"}},"required":["name","handle","tag","own"],"additionalProperties":false},"hidden":{"anyOf":[{"type":"string","enum":["creator","staff"]},{"type":"null"}]},"at":{"type":"number","minimum":0}},"required":["reviewId","workId","edition","stars","body","spoiler","author","hidden","at"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.review.hide":{"post":{"operationId":"audience.review.hide","summary":"Hide a review of the work from readers, or show it again.","tags":["audience"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"reviewId":{"type":"string","minLength":1},"hidden":{"type":"boolean"}},"required":["workId","reviewId","hidden"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.followers.list":{"post":{"operationId":"audience.followers.list","summary":"List the people who follow the workspace, newest first, a page at a time.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"person":{"type":"object","properties":{"name":{"type":["string","null"]},"handle":{"type":["string","null"]},"tag":{"type":"string"},"own":{"type":"boolean"}},"required":["name","handle","tag","own"],"additionalProperties":false},"since":{"type":"number","minimum":0}},"required":["person","since"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/audience.analytics.work":{"post":{"operationId":"audience.analytics.work","summary":"Read a work’s audience analytics, per work and per episode: readers, completion, drop-offs, follows, next-episode rate, 応援, comments, ratings and earnings.","tags":["audience"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workId":{"type":"string","minLength":1}},"required":["workId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"source":{"type":"string","enum":["events","records"]},"countedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"sampled":{"type":"boolean"},"readers":{"type":"integer","minimum":0,"maximum":9007199254740991},"followers":{"type":"integer","minimum":0,"maximum":9007199254740991},"library":{"type":"object","properties":{"reading":{"type":"integer","minimum":0,"maximum":9007199254740991},"planned":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"dropped":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reading","planned","completed","dropped"],"additionalProperties":false},"cheers":{"type":"integer","minimum":0,"maximum":9007199254740991},"comments":{"type":"integer","minimum":0,"maximum":9007199254740991},"rating":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"mean":{"anyOf":[{"type":"number","minimum":1,"maximum":3},{"type":"null"}]},"byStars":{"type":"object","properties":{"1":{"type":"integer","minimum":0,"maximum":9007199254740991},"2":{"type":"integer","minimum":0,"maximum":9007199254740991},"3":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["1","2","3"],"additionalProperties":false}},"required":["count","mean","byStars"],"additionalProperties":false},"coins":{"type":"integer","minimum":0,"maximum":9007199254740991},"earnings":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","enum":["JPY","USD"]},"micros":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["currency","micros"],"additionalProperties":false}},"episodes":{"type":"array","items":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string"},"unit":{"type":"string","enum":["episode","chapter","post"]},"readers":{"type":"integer","minimum":0,"maximum":9007199254740991},"finished":{"type":"integer","minimum":0,"maximum":9007199254740991},"nextEpisodeRate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"dropOffs":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["page","paragraph","second","scroll"]},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"readers":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["unit","at","readers"],"additionalProperties":false}},"followsGained":{"type":"integer","minimum":0,"maximum":9007199254740991},"cheers":{"type":"integer","minimum":0,"maximum":9007199254740991},"comments":{"type":"integer","minimum":0,"maximum":9007199254740991},"coins":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["episodeId","number","title","unit","readers","finished","nextEpisodeRate","dropOffs","followsGained","cheers","comments","coins"],"additionalProperties":false}},"chatTurns":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"sources":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["home","continue","follows","ranking","section","search","work","episode","chat","share","external","direct"]},"views":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["source","views"],"additionalProperties":false}},{"type":"null"}]}},"required":["workId","source","countedAt","sampled","readers","followers","library","cheers","comments","rating","coins","earnings","episodes","chatTurns","sources"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/runs.run.get":{"post":{"operationId":"runs.run.get","summary":"Read one of the person’s runs, such as a publication or a video export: its state and what it waits for.","tags":["runs"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","minLength":1}},"required":["runId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["publication","export","join"]},"title":{"type":"string"},"state":{"type":"string","enum":["queued","running","waiting","done","failed","canceled"]},"waiting":{"type":"object","properties":{"kind":{"type":"string","enum":["time"]},"stepKey":{"type":"string"},"until":{"type":"number"}},"required":["kind","stepKey"],"additionalProperties":false},"startedAt":{"type":"number"},"completedAt":{"type":"number"}},"required":["runId","workspaceId","kind","title","state","startedAt"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/runs.run.steps":{"post":{"operationId":"runs.run.steps","summary":"List a run’s steps in order, with each step’s status and why it failed.","tags":["runs"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"after":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["runId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"seq":{"type":"integer","minimum":0,"maximum":9007199254740991},"stepKey":{"type":"string"},"kind":{"type":"string","enum":["operation","wait"]},"op":{"type":"string"},"status":{"type":"string","enum":["running","waiting","done","failed","skipped"]},"failure":{"type":"string"},"startedAt":{"type":"number"},"finishedAt":{"type":"number"}},"required":["seq","stepKey","kind","status","startedAt"],"additionalProperties":false}},"more":{"type":"boolean"}},"required":["steps","more"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/runs.run.listActive":{"post":{"operationId":"runs.run.listActive","summary":"List the person’s runs that are still working, for Needs you. A scheduled publication waiting for its time is left out.","tags":["runs"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"array","items":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["publication","export","join"]},"title":{"type":"string"},"state":{"type":"string","enum":["queued","running","waiting","done","failed","canceled"]},"waiting":{"type":"object","properties":{"kind":{"type":"string","enum":["time"]},"stepKey":{"type":"string"},"until":{"type":"number"}},"required":["kind","stepKey"],"additionalProperties":false},"startedAt":{"type":"number"},"completedAt":{"type":"number"}},"required":["runId","workspaceId","kind","title","state","startedAt"],"additionalProperties":false}},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/runs.run.cancel":{"post":{"operationId":"runs.run.cancel","summary":"Cancel a run, and return it. Results it already delivered stay. A run that ended first keeps its state.","tags":["runs"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","minLength":1}},"required":["runId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["publication","export","join"]},"title":{"type":"string"},"state":{"type":"string","enum":["queued","running","waiting","done","failed","canceled"]},"waiting":{"type":"object","properties":{"kind":{"type":"string","enum":["time"]},"stepKey":{"type":"string"},"until":{"type":"number"}},"required":["kind","stepKey"],"additionalProperties":false},"startedAt":{"type":"number"},"completedAt":{"type":"number"}},"required":["runId","workspaceId","kind","title","state","startedAt"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/conversations.session.list":{"post":{"operationId":"conversations.session.list","summary":"List the person’s sessions in a workspace that have a turn, latest turn first. A page is full unless the list has ended.","tags":["conversations"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1},"title":{"type":"string"},"started":{"type":"boolean"},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"mine":{"type":"boolean"}},"required":["sessionId","title","started","at","mine"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/conversations.session.get":{"post":{"operationId":"conversations.session.get","summary":"Read one session in the workspace: its title, whether it has a turn, and when it was last used.","tags":["conversations"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1}},"required":["sessionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1},"title":{"type":"string"},"started":{"type":"boolean"},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"mine":{"type":"boolean"}},"required":["sessionId","title","started","at","mine"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/conversations.session.cover":{"post":{"operationId":"conversations.session.cover","summary":"Read a session’s cover for lists: the newest ready image from its latest turns, or otherwise a video poster. Null for audio, or before anything is ready.","tags":["conversations"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1}},"required":["sessionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["image","video","audio","mesh","font","bundle"]},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"sha256":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"hasAudio":{"type":["boolean","null"]},"hasAlpha":{"type":["boolean","null"]},"placeholder":{"type":["string","null"]},"state":{"type":"string","enum":["waiting","uploading","processing","ready","failed","blocked"]},"uploadingUntil":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"failure":{"anyOf":[{"type":"string","enum":["notUploaded","sizeMismatch","checksumMismatch","unsupportedType","tooManyPixels","decodeFailed","verifyFailed"]},{"type":"null"}]},"moderation":{"type":"string","enum":["pending","passed","blocked","unchecked","none"]},"variants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["name","mediaType","bytes","width","height"],"additionalProperties":false}},"fileAccess":{"anyOf":[{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"grant":{"type":"string","pattern":"^m\\.[A-Za-z0-9_-]{8}\\.[A-Za-z0-9_-]{86}$"},"lentTo":{"type":"string","minLength":1}},"required":["baseUrl","grant"],"additionalProperties":false},{"type":"null"}]},"source":{"type":"string","enum":["upload","generation","render","join","fork","copy"]},"filename":{"type":["string","null"]},"madeFrom":{"anyOf":[{"type":"object","properties":{"runId":{"type":"string","minLength":1},"assetIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["runId","assetIds"],"additionalProperties":false},{"type":"null"}]},"drawnFrom":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"lang":{"type":"string","enum":["ja","en"]},"frameId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["documentId","revision","lang"],"additionalProperties":false},{"type":"null"}]},"favorite":{"type":"boolean"},"origin":{"type":"string","enum":["human","ai"]},"createdBy":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"creatorKind":{"type":"string","enum":["person","connection","system"]},"own":{"type":"boolean"},"deletable":{"type":"boolean"},"createdAt":{"type":"number","minimum":0},"deleted":{"anyOf":[{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"purgeAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["at","purgeAt"],"additionalProperties":false},{"type":"null"}]}},"required":["assetId","workspaceId","kind","mediaType","bytes","sha256","width","height","durationMs","hasAudio","hasAlpha","placeholder","state","uploadingUntil","failure","moderation","variants","fileAccess","source","filename","madeFrom","drawnFrom","favorite","origin","createdBy","creatorKind","own","deletable","createdAt","deleted"],"additionalProperties":false},{"type":"null"}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/conversations.session.turns":{"post":{"operationId":"conversations.session.turns","summary":"List a session’s turns a page at a time, newest last, each with its next steps. To page back, pass a page’s `earlier` as `before`.","tags":["conversations"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1},"before":{"type":"string","maxLength":4096}},"required":["sessionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"turns":{"type":"array","items":{"type":"object","properties":{"turnId":{"type":"string","minLength":1},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"generation":{"type":"object","properties":{"generation":{"type":"object","properties":{"generationId":{"type":"string","minLength":1},"capability":{"anyOf":[{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},{"type":"null"}]},"mediaKind":{"type":"string","enum":["image","video","audio","mesh","other"]},"quality":{"anyOf":[{"type":"string","enum":["fast","high"]},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","done","failed","canceled"]},"failureReason":{"anyOf":[{"type":"string","enum":["blocked","refused","unavailable","timedOut","failed"]},{"type":"null"}]},"count":{"type":"integer","minimum":1,"maximum":9007199254740991},"multiOutput":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"set"},"outputCount":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","outputCount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"layers"},"format":{"type":"string","enum":["pages","boxes"]},"outputCount":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","format","outputCount"],"additionalProperties":false}]},{"type":"null"}]},"outputs":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["pending","delivered","failed","blocked","canceled"]},"assetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"failureReason":{"anyOf":[{"type":"string","enum":["blocked","refused","unavailable","timedOut","failed"]},{"type":"null"}]},"effectFailure":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["threw","timeLimit","memory","crashed","drewNothing"]},"detail":{"type":"string"}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"progress":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"queued"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"generating"},"since":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","since"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"finishing"},"since":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","since"],"additionalProperties":false}]},{"type":"null"}]},"reported":{"type":"boolean"}},"required":["index","state","assetId","failureReason","effectFailure","progress","reported"],"additionalProperties":false}},"cancelable":{"type":"boolean"},"destination":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"recordId":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]}},"required":["documentId","recordId"],"additionalProperties":false},{"type":"null"}]},"modelId":{"anyOf":[{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},{"type":"null"}]},"prompt":{"type":"string"},"negativePrompt":{"type":["string","null"]},"othersApp":{"anyOf":[{"type":"object","properties":{"title":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"appId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"label":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"value":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"file"},"assetId":{"type":"string","minLength":1}},"required":["kind","assetId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text"},"text":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"entry"},"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["kind","entryId"],"additionalProperties":false}]}},"required":["label","value"],"additionalProperties":false}}},"required":["title","appId","versionId","runId","creator","fields"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"completedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["generationId","capability","mediaKind","quality","state","failureReason","count","multiOutput","outputs","cancelable","destination","modelId","prompt","negativePrompt","othersApp","createdAt","completedAt"],"additionalProperties":false},"intent":{"anyOf":[{"type":"object","properties":{"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":64000},"en":{"type":"string","maxLength":64000}},"additionalProperties":false},"mentions":{"default":[],"maxItems":15,"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"include":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"exclude":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"description":{"type":"string","maxLength":4000},"promptText":{"type":"string","maxLength":2000},"negativeText":{"type":"string","maxLength":2000}},"required":["entryId"],"additionalProperties":false}},"references":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},"role":{"type":"string","enum":["characterDesign","style","reference"]}},"required":["ref","role"],"additionalProperties":false}},"keyframes":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},"required":["atMs","ref"],"additionalProperties":false}},"aspect":{"type":"string","pattern":"^[1-9][0-9]?:[1-9][0-9]?$"},"negativePrompt":{"type":"string","maxLength":64000},"palette":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"weight":{"type":"number","exclusiveMinimum":0,"maximum":100}},"required":["color"],"additionalProperties":false}},"regions":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"left":{"type":"number","minimum":0,"maximum":1},"top":{"type":"number","minimum":0,"maximum":1},"right":{"type":"number","minimum":0,"maximum":1},"bottom":{"type":"number","minimum":0,"maximum":1},"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false}},"required":["left","top","right","bottom"],"additionalProperties":false}},"extend":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":2},"right":{"type":"number","minimum":0,"maximum":2},"bottom":{"type":"number","minimum":0,"maximum":2},"left":{"type":"number","minimum":0,"maximum":2}},"required":["top","right","bottom","left"],"additionalProperties":false},"details":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"seed":{"type":"integer","minimum":0,"maximum":9007199254740991},"loras":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"weight":{"type":"number","minimum":-4,"maximum":4}},"required":["model","weight"],"additionalProperties":false}},"params":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}}]}}}]}}},"additionalProperties":false}},"required":["prompt","mentions"],"additionalProperties":false},{"type":"null"}]},"model":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"by":{"anyOf":[{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["accountId","name"],"additionalProperties":false},{"type":"null"}]},"seconds":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"text":{"type":["string","null"]},"generating":{"type":"boolean"},"outputs":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"asset":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["image","video","audio","mesh","font","bundle"]},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"sha256":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"hasAudio":{"type":["boolean","null"]},"hasAlpha":{"type":["boolean","null"]},"placeholder":{"type":["string","null"]},"state":{"type":"string","enum":["waiting","uploading","processing","ready","failed","blocked"]},"uploadingUntil":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"failure":{"anyOf":[{"type":"string","enum":["notUploaded","sizeMismatch","checksumMismatch","unsupportedType","tooManyPixels","decodeFailed","verifyFailed"]},{"type":"null"}]},"moderation":{"type":"string","enum":["pending","passed","blocked","unchecked","none"]},"variants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["name","mediaType","bytes","width","height"],"additionalProperties":false}},"fileAccess":{"anyOf":[{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"grant":{"type":"string","pattern":"^m\\.[A-Za-z0-9_-]{8}\\.[A-Za-z0-9_-]{86}$"},"lentTo":{"type":"string","minLength":1}},"required":["baseUrl","grant"],"additionalProperties":false},{"type":"null"}]},"source":{"type":"string","enum":["upload","generation","render","join","fork","copy"]},"filename":{"type":["string","null"]},"madeFrom":{"anyOf":[{"type":"object","properties":{"runId":{"type":"string","minLength":1},"assetIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["runId","assetIds"],"additionalProperties":false},{"type":"null"}]},"drawnFrom":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"lang":{"type":"string","enum":["ja","en"]},"frameId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["documentId","revision","lang"],"additionalProperties":false},{"type":"null"}]},"favorite":{"type":"boolean"},"origin":{"type":"string","enum":["human","ai"]},"createdBy":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"creatorKind":{"type":"string","enum":["person","connection","system"]},"own":{"type":"boolean"},"deletable":{"type":"boolean"},"createdAt":{"type":"number","minimum":0},"deleted":{"anyOf":[{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"purgeAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["at","purgeAt"],"additionalProperties":false},{"type":"null"}]}},"required":["assetId","workspaceId","kind","mediaType","bytes","sha256","width","height","durationMs","hasAudio","hasAlpha","placeholder","state","uploadingUntil","failure","moderation","variants","fileAccess","source","filename","madeFrom","drawnFrom","favorite","origin","createdBy","creatorKind","own","deletable","createdAt","deleted"],"additionalProperties":false}},"required":["index","asset"],"additionalProperties":false}},"repeatable":{"type":"boolean"}},"required":["generation","intent","model","by","seconds","text","generating","outputs","repeatable"],"additionalProperties":false},"steps":{"type":"array","items":{"type":"object","properties":{"turnId":{"type":"string","minLength":1},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"generation":{"type":"object","properties":{"generation":{"type":"object","properties":{"generationId":{"type":"string","minLength":1},"capability":{"anyOf":[{"type":"string","pattern":"^[a-z]+\\.[a-z][A-Za-z]{1,31}$"},{"type":"null"}]},"mediaKind":{"type":"string","enum":["image","video","audio","mesh","other"]},"quality":{"anyOf":[{"type":"string","enum":["fast","high"]},{"type":"null"}]},"state":{"type":"string","enum":["queued","running","done","failed","canceled"]},"failureReason":{"anyOf":[{"type":"string","enum":["blocked","refused","unavailable","timedOut","failed"]},{"type":"null"}]},"count":{"type":"integer","minimum":1,"maximum":9007199254740991},"multiOutput":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"set"},"outputCount":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","outputCount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"layers"},"format":{"type":"string","enum":["pages","boxes"]},"outputCount":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","format","outputCount"],"additionalProperties":false}]},{"type":"null"}]},"outputs":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["pending","delivered","failed","blocked","canceled"]},"assetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"failureReason":{"anyOf":[{"type":"string","enum":["blocked","refused","unavailable","timedOut","failed"]},{"type":"null"}]},"effectFailure":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["threw","timeLimit","memory","crashed","drewNothing"]},"detail":{"type":"string"}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"progress":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"queued"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"generating"},"since":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","since"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"finishing"},"since":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","since"],"additionalProperties":false}]},{"type":"null"}]},"reported":{"type":"boolean"}},"required":["index","state","assetId","failureReason","effectFailure","progress","reported"],"additionalProperties":false}},"cancelable":{"type":"boolean"},"destination":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"recordId":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]}},"required":["documentId","recordId"],"additionalProperties":false},{"type":"null"}]},"modelId":{"anyOf":[{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},{"type":"null"}]},"prompt":{"type":"string"},"negativePrompt":{"type":["string","null"]},"othersApp":{"anyOf":[{"type":"object","properties":{"title":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"appId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"label":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"value":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"file"},"assetId":{"type":"string","minLength":1}},"required":["kind","assetId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text"},"text":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"entry"},"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["kind","entryId"],"additionalProperties":false}]}},"required":["label","value"],"additionalProperties":false}}},"required":["title","appId","versionId","runId","creator","fields"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"completedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["generationId","capability","mediaKind","quality","state","failureReason","count","multiOutput","outputs","cancelable","destination","modelId","prompt","negativePrompt","othersApp","createdAt","completedAt"],"additionalProperties":false},"intent":{"anyOf":[{"type":"object","properties":{"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":64000},"en":{"type":"string","maxLength":64000}},"additionalProperties":false},"mentions":{"default":[],"maxItems":15,"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"include":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"exclude":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"description":{"type":"string","maxLength":4000},"promptText":{"type":"string","maxLength":2000},"negativeText":{"type":"string","maxLength":2000}},"required":["entryId"],"additionalProperties":false}},"references":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},"role":{"type":"string","enum":["characterDesign","style","reference"]}},"required":["ref","role"],"additionalProperties":false}},"keyframes":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},"required":["atMs","ref"],"additionalProperties":false}},"aspect":{"type":"string","pattern":"^[1-9][0-9]?:[1-9][0-9]?$"},"negativePrompt":{"type":"string","maxLength":64000},"palette":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"weight":{"type":"number","exclusiveMinimum":0,"maximum":100}},"required":["color"],"additionalProperties":false}},"regions":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"left":{"type":"number","minimum":0,"maximum":1},"top":{"type":"number","minimum":0,"maximum":1},"right":{"type":"number","minimum":0,"maximum":1},"bottom":{"type":"number","minimum":0,"maximum":1},"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false}},"required":["left","top","right","bottom"],"additionalProperties":false}},"extend":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":2},"right":{"type":"number","minimum":0,"maximum":2},"bottom":{"type":"number","minimum":0,"maximum":2},"left":{"type":"number","minimum":0,"maximum":2}},"required":["top","right","bottom","left"],"additionalProperties":false},"details":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"seed":{"type":"integer","minimum":0,"maximum":9007199254740991},"loras":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"weight":{"type":"number","minimum":-4,"maximum":4}},"required":["model","weight"],"additionalProperties":false}},"params":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}}]}}}]}}},"additionalProperties":false}},"required":["prompt","mentions"],"additionalProperties":false},{"type":"null"}]},"model":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"by":{"anyOf":[{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["accountId","name"],"additionalProperties":false},{"type":"null"}]},"seconds":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"text":{"type":["string","null"]},"generating":{"type":"boolean"},"outputs":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"asset":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["image","video","audio","mesh","font","bundle"]},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"sha256":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"hasAudio":{"type":["boolean","null"]},"hasAlpha":{"type":["boolean","null"]},"placeholder":{"type":["string","null"]},"state":{"type":"string","enum":["waiting","uploading","processing","ready","failed","blocked"]},"uploadingUntil":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"failure":{"anyOf":[{"type":"string","enum":["notUploaded","sizeMismatch","checksumMismatch","unsupportedType","tooManyPixels","decodeFailed","verifyFailed"]},{"type":"null"}]},"moderation":{"type":"string","enum":["pending","passed","blocked","unchecked","none"]},"variants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"mediaType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["name","mediaType","bytes","width","height"],"additionalProperties":false}},"fileAccess":{"anyOf":[{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"grant":{"type":"string","pattern":"^m\\.[A-Za-z0-9_-]{8}\\.[A-Za-z0-9_-]{86}$"},"lentTo":{"type":"string","minLength":1}},"required":["baseUrl","grant"],"additionalProperties":false},{"type":"null"}]},"source":{"type":"string","enum":["upload","generation","render","join","fork","copy"]},"filename":{"type":["string","null"]},"madeFrom":{"anyOf":[{"type":"object","properties":{"runId":{"type":"string","minLength":1},"assetIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["runId","assetIds"],"additionalProperties":false},{"type":"null"}]},"drawnFrom":{"anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"lang":{"type":"string","enum":["ja","en"]},"frameId":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["documentId","revision","lang"],"additionalProperties":false},{"type":"null"}]},"favorite":{"type":"boolean"},"origin":{"type":"string","enum":["human","ai"]},"createdBy":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"creatorKind":{"type":"string","enum":["person","connection","system"]},"own":{"type":"boolean"},"deletable":{"type":"boolean"},"createdAt":{"type":"number","minimum":0},"deleted":{"anyOf":[{"type":"object","properties":{"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"purgeAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["at","purgeAt"],"additionalProperties":false},{"type":"null"}]}},"required":["assetId","workspaceId","kind","mediaType","bytes","sha256","width","height","durationMs","hasAudio","hasAlpha","placeholder","state","uploadingUntil","failure","moderation","variants","fileAccess","source","filename","madeFrom","drawnFrom","favorite","origin","createdBy","creatorKind","own","deletable","createdAt","deleted"],"additionalProperties":false}},"required":["index","asset"],"additionalProperties":false}},"repeatable":{"type":"boolean"}},"required":["generation","intent","model","by","seconds","text","generating","outputs","repeatable"],"additionalProperties":false}},"required":["turnId","at","generation"],"additionalProperties":false}}},"required":["turnId","at","generation","steps"],"additionalProperties":false}},"earlier":{"type":["string","null"]}},"required":["turns","earlier"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/conversations.session.results":{"post":{"operationId":"conversations.session.results","summary":"List the outputs of a session’s turns in thread order, as Open as a canvas lays them out.","tags":["conversations"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1}},"required":["sessionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"assetIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["assetIds"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/conversations.session.delete":{"post":{"operationId":"conversations.session.delete","summary":"Delete a session. It can be restored for a day, and the outputs of its turns stay in Create.","tags":["conversations"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1}},"required":["sessionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/conversations.session.restore":{"post":{"operationId":"conversations.session.restore","summary":"Restore a deleted session as it was, before it is purged.","tags":["conversations"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1}},"required":["sessionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/conversations.chat.list":{"post":{"operationId":"conversations.chat.list","summary":"List the reader’s chats, newest first, a page at a time, each with the point where the characters’ knowledge stops.","tags":["conversations"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"conversationId":{"type":"string","minLength":1},"title":{"type":"string"},"view":{"type":"string","enum":["reader","author"]},"characters":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1}},"required":["entryId"],"additionalProperties":false}},"work":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]}},"required":["workId","medium"],"additionalProperties":false},"personaId":{"type":"string"},"spoilerCutoff":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"number":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["episodeId","number"],"additionalProperties":false},"nextEpisode":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"number":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["episodeId","number"],"additionalProperties":false},"lastMessageAt":{"type":"number"}},"required":["conversationId","title","view","characters","lastMessageAt"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/conversations.chat.open":{"post":{"operationId":"conversations.chat.open","summary":"Open one of the reader’s chats with a page of messages, newest last.","tags":["conversations"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string","minLength":1},"before":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["conversationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"chat":{"type":"object","properties":{"conversationId":{"type":"string","minLength":1},"title":{"type":"string"},"view":{"type":"string","enum":["reader","author"]},"characters":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"names":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"thumbnailAssetId":{"type":"string","minLength":1}},"required":["entryId","names"],"additionalProperties":false}},"work":{"type":"object","properties":{"workId":{"type":"string","minLength":1},"medium":{"type":"string","enum":["manga","webtoon","novel","video","audio","art"]}},"required":["workId","medium"],"additionalProperties":false},"personaId":{"type":"string"},"spoilerCutoff":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"number":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["episodeId","number"],"additionalProperties":false},"nextEpisode":{"type":"object","properties":{"episodeId":{"type":"string","minLength":1},"number":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["episodeId","number"],"additionalProperties":false},"lastMessageAt":{"type":"number"}},"required":["conversationId","title","view","characters","lastMessageAt"],"additionalProperties":false},"messages":{"type":"array","items":{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"seq":{"type":"integer","minimum":0,"maximum":9007199254740991},"author":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"reader"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"character"},"entryId":{"type":"string","minLength":1}},"required":["kind","entryId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"notice"},"notice":{"type":"string","enum":["disclosure","break","crisisHelp"]}},"required":["kind","notice"],"additionalProperties":false}]},"text":{"type":"string"},"state":{"type":"string","enum":["done","stopped"]},"alternatives":{"type":"array","items":{"type":"string","minLength":1}},"at":{"type":"number"}},"required":["messageId","seq","author","text","state","alternatives","at"],"additionalProperties":false}},"more":{"type":"boolean"}},"required":["chat","messages","more"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/conversations.chat.exists":{"post":{"operationId":"conversations.chat.exists","summary":"Check whether an id names one of the reader’s chats that they may open. Any string is accepted, and one that names no chat returns false.","tags":["conversations"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string"}},"required":["conversationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"exists":{"type":"boolean"}},"required":["exists"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/conversations.chat.memory":{"post":{"operationId":"conversations.chat.memory","summary":"Read what the characters remember from one chat. The reader can see and edit it.","tags":["conversations"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string","minLength":1}},"required":["conversationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"memoryId":{"type":"string","minLength":1},"text":{"type":"string"},"at":{"type":"number"}},"required":["memoryId","text","at"],"additionalProperties":false}}},"required":["entries"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/renders.export.estimate":{"post":{"operationId":"renders.export.estimate","summary":"Estimate exporting a storyboard for a preset, as video or as its sound alone: the duration, size and cost in coins, or the run of that export already made or rendering.","tags":["renders"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"presetId":{"type":"string","pattern":"^[a-z][A-Za-z0-9]*\\.[a-z0-9][A-Za-z0-9.-]{0,47}$"},"lang":{"type":"string","enum":["ja","en"]},"captions":{"type":"boolean"}},"required":["documentId","presetId","lang","captions"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"ready"},"durationMs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"coins":{"type":"integer","minimum":0,"maximum":9007199254740991},"blocked":{"anyOf":[{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}},{"type":"null"}]},"failed":{"type":"boolean"}},"required":["kind","durationMs","width","height","coins","blocked","failed"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"existing"},"durationMs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"runId":{"type":"string","minLength":1}},"required":["kind","durationMs","width","height","runId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"failed"},"error":{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}}},"required":["kind","error"],"additionalProperties":false}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/renders.export.start":{"post":{"operationId":"renders.export.start","summary":"Export a storyboard for a preset, as video or as its sound alone (builtIn.audio, M4A). The file becomes an asset. An unchanged edit returns the earlier run and charges nothing.","tags":["renders"],"x-qmoon-action":"charge","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"presetId":{"type":"string","pattern":"^[a-z][A-Za-z0-9]*\\.[a-z0-9][A-Za-z0-9.-]{0,47}$"},"lang":{"type":"string","enum":["ja","en"]},"captions":{"type":"boolean"},"requestId":{"type":"string","pattern":"^[0-9A-Za-z_-]{8,64}$"}},"required":["documentId","presetId","lang","captions","requestId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"runId":{"type":"string","minLength":1}},"required":["runId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/renders.export.get":{"post":{"operationId":"renders.export.get","summary":"Read a storyboard export: render progress, the file once it is ready, and the issues the preset found.","tags":["renders"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1}},"required":["documentId","runId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"state":{"type":"string","enum":["rendering","done","failed","canceled"]},"progress":{"type":"number","minimum":0,"maximum":1},"assetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"findings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"output":{"type":"string"},"fix":{"type":["string","null"]}},"required":["code","output","fix"],"additionalProperties":false}},"startedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["runId","state","progress","assetId","findings","startedAt"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/renders.join.estimate":{"post":{"operationId":"renders.join.estimate","summary":"Estimate joining clips, in order, with a voice, music or both into one video: its duration, size, frame rate and cost in coins, and whether the voice runs longer than the clips.","tags":["renders"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clips":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"voice":{"type":"string","minLength":1},"music":{"type":"string","minLength":1},"settings":{"type":"object","properties":{"ending":{"type":"string","enum":["lastClip","voice"]},"fit":{"type":"string","enum":["fill","fit"]},"size":{"type":"string","enum":["first","9:16","16:9","1:1"]},"volumes":{"type":"object","properties":{"clips":{"type":"number","minimum":0,"maximum":4},"voice":{"type":"number","minimum":0,"maximum":4},"music":{"type":"number","minimum":0,"maximum":4}},"required":["clips","voice","music"],"additionalProperties":false}},"required":["ending","fit","size","volumes"],"additionalProperties":false}},"required":["clips","settings"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"ready"},"durationMs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"fps":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"coins":{"type":"integer","minimum":0,"maximum":9007199254740991},"blocked":{"anyOf":[{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}},{"type":"null"}]},"voiceLonger":{"type":"boolean"}},"required":["kind","durationMs","width","height","fps","coins","blocked","voiceLonger"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"failed"},"error":{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}}},"required":["kind","error"],"additionalProperties":false}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/renders.join.start":{"post":{"operationId":"renders.join.start","summary":"Join clips, in order, with a voice, music or both into one video, rendered on qmoon’s servers. Charges coins. The video becomes an asset of the workspace.","tags":["renders"],"x-qmoon-action":"charge","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clips":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"voice":{"type":"string","minLength":1},"music":{"type":"string","minLength":1},"settings":{"type":"object","properties":{"ending":{"type":"string","enum":["lastClip","voice"]},"fit":{"type":"string","enum":["fill","fit"]},"size":{"type":"string","enum":["first","9:16","16:9","1:1"]},"volumes":{"type":"object","properties":{"clips":{"type":"number","minimum":0,"maximum":4},"voice":{"type":"number","minimum":0,"maximum":4},"music":{"type":"number","minimum":0,"maximum":4}},"required":["clips","voice","music"],"additionalProperties":false}},"required":["ending","fit","size","volumes"],"additionalProperties":false},"requestId":{"type":"string","pattern":"^[0-9A-Za-z_-]{8,64}$"}},"required":["clips","settings","requestId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"runId":{"type":"string","minLength":1}},"required":["runId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/renders.join.get":{"post":{"operationId":"renders.join.get","summary":"Read a join: render progress, and the video once it is ready.","tags":["renders"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","minLength":1}},"required":["runId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"state":{"type":"string","enum":["rendering","done","failed","canceled"]},"progress":{"type":"number","minimum":0,"maximum":1},"assetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"startedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["runId","state","progress","assetId","startedAt"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.canvas.create":{"post":{"operationId":"documents.canvas.create","summary":"Create a canvas of up to 96 nodes, each with your own ID: 64 steps, 8 choices, 8 results and slots. A media slot needs its file. Results become the end of its app. Returns its document ID.","tags":["documents"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"nodes":{"minItems":1,"maxItems":96,"type":"array","items":{"oneOf":[{"type":"object","properties":{"name":{"default":"","type":"string","maxLength":60},"kind":{"type":"string","enum":["image","video","audio","text","option","entry"]},"assetId":{"type":"string","minLength":1},"text":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false},"entry":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["entryId"],"additionalProperties":false},"options":{"description":"An option slot's options, each with an id of its own. It runs with 2 or more, none empty.","maxItems":12,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"text":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false,"description":"The option's text by language, placed exactly as written. It can't contain @{, and an @ in it is never a mention."},"label":{"description":"What a published app's form shows for the option, by language, in place of its text, which the model still receives. Absent to show the text.","type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false}},"required":["id","text"],"additionalProperties":false}},"chosen":{"description":"The id of the option that fills an option slot now.","type":"string","pattern":"^[0-9A-Za-z]{16}$"},"type":{"type":"string","const":"slot"},"id":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"at":{"type":"object","properties":{"x":{"type":"number","minimum":-100000,"maximum":100000},"y":{"type":"number","minimum":-100000,"maximum":100000}},"required":["x","y"],"additionalProperties":false}},"required":["kind","type","id"],"additionalProperties":false},{"type":"object","properties":{"name":{"default":"","type":"string","maxLength":60},"capability":{"type":"string","enum":["image.generate","image.edit","image.extend","image.removeBackground","image.upscale","image.tryOn","video.generate","video.extend","video.upscale","video.restyle","video.lipSync","video.interpolate","video.addSound","video.extractFrame","audio.speech","audio.designVoice","audio.music","audio.soundEffect","mesh.generate","image.applyEffect","video.applyEffect","text.write","video.join"]},"intent":{"type":"object","properties":{"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false,"description":"The prompt, by language. @{id} of a text slot or an edit choice places its text there, @{id} of an option slot its chosen option, and @{id} of an entry slot names its entry: with a text slot whose id is titleText0000001, { \"en\": \"a poster of @{titleText0000001} in neon\" }."},"mentions":{"default":[],"maxItems":15,"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"include":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"exclude":{"maxItems":24,"type":"array","items":{"type":"string","minLength":1}},"description":{"type":"string","maxLength":4000},"promptText":{"type":"string","maxLength":2000},"negativeText":{"type":"string","maxLength":2000}},"required":["entryId"],"additionalProperties":false}},"references":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},"role":{"type":"string","enum":["characterDesign","style","reference"]}},"required":["ref","role"],"additionalProperties":false}},"keyframes":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"ref":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},"required":["atMs","ref"],"additionalProperties":false}},"aspect":{"type":"string","pattern":"^[1-9][0-9]?:[1-9][0-9]?$"},"negativePrompt":{"type":"string","maxLength":64000},"palette":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"weight":{"type":"number","exclusiveMinimum":0,"maximum":100}},"required":["color"],"additionalProperties":false}},"regions":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"left":{"type":"number","minimum":0,"maximum":1},"top":{"type":"number","minimum":0,"maximum":1},"right":{"type":"number","minimum":0,"maximum":1},"bottom":{"type":"number","minimum":0,"maximum":1},"prompt":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false}},"required":["left","top","right","bottom"],"additionalProperties":false}},"extend":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":2},"right":{"type":"number","minimum":0,"maximum":2},"bottom":{"type":"number","minimum":0,"maximum":2},"left":{"type":"number","minimum":0,"maximum":2}},"required":["top","right","bottom","left"],"additionalProperties":false},"details":{"type":"object","properties":{"modelId":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"seed":{"type":"integer","minimum":0,"maximum":9007199254740991},"loras":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"weight":{"type":"number","minimum":-4,"maximum":4}},"required":["model","weight"],"additionalProperties":false}},"params":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}}]}}}]}}},"additionalProperties":false}},"required":["prompt"],"additionalProperties":false},"count":{"type":"integer","minimum":1,"maximum":4},"quality":{"type":"string","enum":["fast","high"]},"seconds":{"type":"number","exclusiveMinimum":0,"maximum":300},"text":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false},"writes":{"type":"string","enum":["text","list"]},"inputs":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"from":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"all":{"type":"boolean","const":true}},"required":["role","from"],"additionalProperties":false}},"canonFrom":{"maxItems":15,"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"type":{"type":"string","const":"step"},"id":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"at":{"type":"object","properties":{"x":{"type":"number","minimum":-100000,"maximum":100000},"y":{"type":"number","minimum":-100000,"maximum":100000}},"required":["x","y"],"additionalProperties":false}},"required":["capability","intent","count","quality","inputs","type","id"],"additionalProperties":false},{"type":"object","properties":{"name":{"default":"","type":"string","maxLength":60},"kind":{"type":"string","enum":["pick","approve","edit"]},"from":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"count":{"type":"integer","minimum":1,"maximum":16},"type":{"type":"string","const":"choice"},"id":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"at":{"type":"object","properties":{"x":{"type":"number","minimum":-100000,"maximum":100000},"y":{"type":"number","minimum":-100000,"maximum":100000}},"required":["x","y"],"additionalProperties":false}},"required":["kind","from","type","id"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"type":{"type":"string","const":"result"},"id":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"at":{"type":"object","properties":{"x":{"type":"number","minimum":-100000,"maximum":100000},"y":{"type":"number","minimum":-100000,"maximum":100000}},"required":["x","y"],"additionalProperties":false}},"required":["type","id"],"additionalProperties":false}]}},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["title","nodes"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"documentId":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.app.copy":{"post":{"operationId":"apps.app.copy","summary":"Copy an app the maker lets others copy onto a new canvas of the workspace, as the maker laid it out, with the workspace’s own copies of the files. Returns the canvas’s document ID.","tags":["apps"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["appId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"documentId":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.run.estimate":{"post":{"operationId":"apps.run.estimate","summary":"Price a run of an app or a canvas without starting it: its coins, whether it can start, and each problem, by step or, for another workspace’s app, by field. Charges nothing.","tags":["apps"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"description":"The canvas, in its own workspace. Give documentId or appId, not both.","type":"string","minLength":1},"appId":{"description":"The app, as apps.app.get names it, for a run of one of its published versions.","type":"string","minLength":1},"versionId":{"description":"A published version to run, as apps.app.get gives it. Without one, the canvas runs as it is now, which only its own workspace can.","type":"string","minLength":1},"keep":{"default":true,"description":"Keep an earlier run’s result for each step that would send exactly what it sent. False generates every step again.","type":"boolean"},"fields":{"default":[],"description":"Values for a published version’s fields, each by its field id from apps.app.get. A canvas’s own run takes none: it runs with what its nodes hold. A field left out runs with its default. A value is what the field’s accepts takes: { assetId } of a file of this workspace, uploaded with media.upload.begin and finished; { text: { en: \"…\" } }; { entryId } of a character, location or item of this workspace; { option } with one of accepts.options’ values; { number }; or { toggle }.","maxItems":16,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"value":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false}},"required":["text"],"additionalProperties":false},{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["entryId"],"additionalProperties":false},{"type":"object","properties":{"option":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["option"],"additionalProperties":false},{"type":"object","properties":{"number":{"type":"number"}},"required":["number"],"additionalProperties":false},{"type":"object","properties":{"toggle":{"type":"boolean"}},"required":["toggle"],"additionalProperties":false}]}},"required":["field","value"],"additionalProperties":false}},"targets":{"default":[],"description":"Steps to run, each with what it needs upstream; nothing else runs. Empty runs the whole canvas, as a run of another workspace’s app always does.","maxItems":64,"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"rerun":{"default":false,"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"steps"},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"coins":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"exact":{"type":"boolean"},"generations":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"kept":{"type":"integer","minimum":0,"maximum":9007199254740991},"keptOutputs":{"type":"integer","minimum":0,"maximum":9007199254740991},"voiceLengthUnknown":{"type":"boolean","const":true},"problems":{"type":"array","items":{"type":"object","properties":{"node":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]},"code":{"type":"string","enum":["empty","cycle","unknownCapability","slotEmpty","optionNotChosen","tooFewOptions","optionEmpty","noModel","noPrompt","inputMissing","roleNotAccepted","wrongKind","tooManyInputs","missingNode","manyLists","tooManyItems","tooManyListItems","resultUnconnected","mentionUnread","placedInText","listNotPaired","listLimit","textTooLong","entryUnavailable","cannotRunNow","notTextSlot","effectUnavailable","effectOutput","effectSetting","joinSetting","joinSettingUnknown","tooManyClips","oneSound","joinTooLong","fieldTarget","fieldAllowed","fieldDefault","priceNeedsFile","aspectNotOffered","stepRunning","priceNeedsEntry","fileChecking","recordUnreadable","tooManyFileInputs","inputTextTooLong","tooManyRunItems"]},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"setting":{"type":"string"},"items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"chars":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"seconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"runId":{"type":"string","minLength":1}},"required":["node","code"],"additionalProperties":false}},"error":{"anyOf":[{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}},{"type":"null"}]},"blockedBy":{"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"outputs":{"type":"array","items":{"type":"string","minLength":1}},"filesCursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"checked":{"type":"boolean"},"texts":{"type":"array","items":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"rerunCoins":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"rerunExact":{"type":"boolean"},"written":{"type":"integer","minimum":0,"maximum":9007199254740991},"textsCursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"current":{"type":"boolean"}},"required":["step","coins","exact","generations","kept","keptOutputs","problems","error","blockedBy","outputs","filesCursor","checked","texts","rerunCoins","rerunExact","written","textsCursor","current"],"additionalProperties":false}},"problems":{"type":"array","items":{"type":"object","properties":{"node":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]},"code":{"type":"string","enum":["empty","cycle","unknownCapability","slotEmpty","optionNotChosen","tooFewOptions","optionEmpty","noModel","noPrompt","inputMissing","roleNotAccepted","wrongKind","tooManyInputs","missingNode","manyLists","tooManyItems","tooManyListItems","resultUnconnected","mentionUnread","placedInText","listNotPaired","listLimit","textTooLong","entryUnavailable","cannotRunNow","notTextSlot","effectUnavailable","effectOutput","effectSetting","joinSetting","joinSettingUnknown","tooManyClips","oneSound","joinTooLong","fieldTarget","fieldAllowed","fieldDefault","priceNeedsFile","aspectNotOffered","stepRunning","priceNeedsEntry","fileChecking","recordUnreadable","tooManyFileInputs","inputTextTooLong","tooManyRunItems"]},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"setting":{"type":"string"},"items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"chars":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"seconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"runId":{"type":"string","minLength":1}},"required":["node","code"],"additionalProperties":false}},"coins":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"mayKeep":{"type":"boolean"},"blocked":{"anyOf":[{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}},{"type":"null"}]},"prompts":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"prompt":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"parts":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"string"},"mention":{"type":"object","properties":{"slot":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"part":{"type":"string","enum":["name","description"]}},"required":["slot","part"],"additionalProperties":false}},"required":["text","mention"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"string"},"placed":{"type":"object","properties":{"node":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"pending":{"type":"boolean","const":true}},"required":["node"],"additionalProperties":false}},"required":["text","placed"],"additionalProperties":false}]}},"edits":{"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}}},"required":["text","parts","edits"],"additionalProperties":false},{"type":"null"}]},"text":{"type":"object","properties":{"text":{"type":"string"},"parts":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"string"},"mention":{"type":"object","properties":{"slot":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"part":{"type":"string","enum":["name","description"]}},"required":["slot","part"],"additionalProperties":false}},"required":["text","mention"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"string"},"placed":{"type":"object","properties":{"node":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"pending":{"type":"boolean","const":true}},"required":["node"],"additionalProperties":false}},"required":["text","placed"],"additionalProperties":false}]}},"edits":{"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"lang":{"type":"string","enum":["ja","en"]}},"required":["text","parts","edits","lang"],"additionalProperties":false},"waitsOn":{"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}}},"required":["step","prompt","waitsOn"],"additionalProperties":false}},"promptsCursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"remainingPrompts":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","steps","problems","coins","mayKeep","blocked","prompts","promptsCursor","remainingPrompts"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"form"},"coins":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"exact":{"type":"boolean"},"canRun":{"type":"boolean"},"blocked":{"anyOf":[{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}},{"type":"null"}],"description":"The money error that stops the run now, such as too few coins (noCoins) or a spend limit (spendLimit), or null. A run started anyway stops at the step it can’t pay for, after the steps before it were charged."},"problems":{"type":"array","items":{"type":"object","properties":{"node":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]},"code":{"type":"string","enum":["empty","cycle","unknownCapability","slotEmpty","optionNotChosen","tooFewOptions","optionEmpty","noModel","noPrompt","inputMissing","roleNotAccepted","wrongKind","tooManyInputs","missingNode","manyLists","tooManyItems","tooManyListItems","resultUnconnected","mentionUnread","placedInText","listNotPaired","listLimit","textTooLong","entryUnavailable","cannotRunNow","notTextSlot","effectUnavailable","effectOutput","effectSetting","joinSetting","joinSettingUnknown","tooManyClips","oneSound","joinTooLong","fieldTarget","fieldAllowed","fieldDefault","priceNeedsFile","aspectNotOffered","stepRunning","priceNeedsEntry","fileChecking","recordUnreadable","tooManyFileInputs","inputTextTooLong","tooManyRunItems"]},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"setting":{"type":"string"},"items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"chars":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"seconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"runId":{"type":"string","minLength":1}},"required":["node","code"],"additionalProperties":false},"description":"Each problem names its field’s id in node: slotEmpty, a required field with no value; fileChecking, a file still being checked, so estimate again until it clears; priceNeedsFile or priceNeedsEntry, a price that shows once that field has its file or its character; aspectNotOffered, an aspect ratio no step makes with the other values; entryUnavailable, a character, location or item that can’t be read; textTooLong, a text a step speaks that is chars characters longer than its model speaks. cannotRunNow, on no field, is something inside the app only its creator can fix. Start the run only once canRun is true, problems is empty and blocked is null."}},"required":["kind","coins","exact","canRun","blocked","problems"],"additionalProperties":false}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.run.create":{"post":{"operationId":"apps.run.create","summary":"Run an app or a canvas in a workspace, which is charged and owns the run and its files. Price it with apps.run.estimate first, then wait for it with apps.run.get.","tags":["apps"],"x-qmoon-action":"charge","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"description":"The canvas, in its own workspace. Give documentId or appId, not both.","type":"string","minLength":1},"appId":{"description":"The app, as apps.app.get names it, for a run of one of its published versions.","type":"string","minLength":1},"versionId":{"description":"A published version to run, as apps.app.get gives it. Without one, the canvas runs as it is now, which only its own workspace can.","type":"string","minLength":1},"keep":{"default":true,"description":"Keep an earlier run’s result for each step that would send exactly what it sent. False generates every step again.","type":"boolean"},"fields":{"default":[],"description":"Values for a published version’s fields, each by its field id from apps.app.get. A canvas’s own run takes none: it runs with what its nodes hold. A field left out runs with its default. A value is what the field’s accepts takes: { assetId } of a file of this workspace, uploaded with media.upload.begin and finished; { text: { en: \"…\" } }; { entryId } of a character, location or item of this workspace; { option } with one of accepts.options’ values; { number }; or { toggle }.","maxItems":16,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"value":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false}},"required":["text"],"additionalProperties":false},{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["entryId"],"additionalProperties":false},{"type":"object","properties":{"option":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["option"],"additionalProperties":false},{"type":"object","properties":{"number":{"type":"number"}},"required":["number"],"additionalProperties":false},{"type":"object","properties":{"toggle":{"type":"boolean"}},"required":["toggle"],"additionalProperties":false}]}},"required":["field","value"],"additionalProperties":false}},"targets":{"default":[],"description":"Steps to run, each with what it needs upstream; nothing else runs. Empty runs the whole canvas, as a run of another workspace’s app always does.","maxItems":64,"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"rerun":{"default":false,"type":"boolean"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"},"maxCoins":{"description":"The most coins the run may charge, such as the price apps.run.estimate gave and the person saw. A step that would take the run past it doesn’t start, and the run fails there with runBudget.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["requestId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"runId":{"type":"string","minLength":1}},"required":["runId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.run.get":{"post":{"operationId":"apps.run.get","summary":"Read a run of an app or a canvas: its state, items and files. It waits up to wait_seconds while the run works. Answer a waiting run with apps.run.answer, or the person answers it in qmoon.","tags":["apps"],"x-qmoon-action":"read","x-qmoon-scope":"read","parameters":[{"name":"Prefer","in":"header","required":false,"description":"wait=n keeps the read open for up to n seconds (at most 25) until the result settles. Without it, the read responds immediately.","schema":{"type":"string","examples":["wait=20"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"description":"The canvas, in its own workspace. Give documentId or appId, not both.","type":"string","minLength":1},"appId":{"description":"The app, as apps.app.get names it, for a run of one of its published versions.","type":"string","minLength":1},"runId":{"type":"string","minLength":1}},"required":["runId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done. `settled` says whether the result had settled. Preference-Applied says how long the read waited.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"documentId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"versionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"rev":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"state":{"type":"string","enum":["running","waiting","done","failed","canceled"]},"failure":{"anyOf":[{"type":"object","properties":{"step":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]},"error":{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}}},"required":["step","error"],"additionalProperties":false},{"type":"null"}]},"targets":{"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"rerun":{"type":"boolean"},"cancelReason":{"type":"string","enum":["removed","expired","nodeRemoved","stalled"]},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"generation"},"item":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["queued","running","done","failed","canceled"]},"kept":{"type":"boolean"},"generationId":{"type":"string","minLength":1},"assetIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["kind","item","state","kept","generationId","assetIds"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text"},"item":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["queued","running","done","failed","canceled"]},"kept":{"type":"boolean"},"written":{"type":"integer","minimum":0,"maximum":9007199254740991},"texts":{"type":"array","items":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}}},"required":["kind","item","state","kept","written","texts"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"run"},"item":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["queued","running","done","failed","canceled"]},"kept":{"type":"boolean"},"runId":{"type":"string","minLength":1},"assetIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["kind","item","state","kept","runId","assetIds"],"additionalProperties":false}]}},"filesCursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"textsCursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]}},"required":["step","items","filesCursor","textsCursor"],"additionalProperties":false}},"choices":{"type":"array","items":{"type":"object","properties":{"choice":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"name":{"type":"string"},"kind":{"type":"string","enum":["pick","approve","edit"]},"count":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"How many outputs a pick takes: null takes one, and when it offers fewer, it takes them all."},"asking":{"type":"boolean"},"result":{"type":"boolean","description":"Whether a result shows what this choice passes on. If so, the outputs it offers stay the runner's files, whichever are picked."},"offered":{"type":"array","items":{"type":"string","minLength":1},"description":"The outputs a pick or an approval asks about, by asset id. Answer a pick with apps.run.answer, giving count of these ids."},"text":{"anyOf":[{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false},{"type":"null"}]},"answer":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"pick"},"assetIds":{"maxItems":16,"type":"array","items":{"type":"string","minLength":1}}},"required":["kind","assetIds"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"approve"},"approved":{"type":"boolean"}},"required":["kind","approved"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"edit"},"text":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false}},"required":["kind","text"],"additionalProperties":false}]},{"type":"null"}]},"offeredCursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"textsCursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]}},"required":["choice","name","kind","count","asking","result","offered","text","answer","offeredCursor","textsCursor"],"additionalProperties":false}},"results":{"type":"array","items":{"type":"object","properties":{"result":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string","enum":["image","video","audio","text","mesh"]},{"type":"null"}]},"assetIds":{"type":"array","items":{"type":"string","minLength":1}},"filesCursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]}},"required":["result","kind","assetIds","filesCursor"],"additionalProperties":false},"description":"Each result’s files, once made. Get their files with media.asset.files. A canvas’s own run lists none: its steps hold its files."},"waiting":{"anyOf":[{"type":"object","properties":{"choices":{"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"by":{"type":"string","const":"person"},"answerUrl":{"type":"string"},"cancelsAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["choices","by","answerUrl","cancelsAt"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"completedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["runId","documentId","versionId","rev","state","failure","targets","rerun","steps","choices","results","waiting","createdAt","completedAt"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output","settled"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.run.texts":{"post":{"operationId":"apps.run.texts","summary":"Read the texts past those a run or an estimate gives, from a textsCursor: a Write text step’s, a page at a time, or an edit’s text and its answer.","tags":["apps"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"description":"The canvas, in its own workspace. Give documentId or appId, not both.","type":"string","minLength":1},"appId":{"description":"The app, as apps.app.get names it, for a run of one of its published versions.","type":"string","minLength":1},"cursor":{"type":"string","maxLength":4096}},"required":["cursor"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"item":{"type":"integer","minimum":0,"maximum":9007199254740991},"texts":{"type":"array","items":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}}},"required":["step","item","texts"],"additionalProperties":false}},"choice":{"anyOf":[{"type":"object","properties":{"choice":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"text":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false},"answer":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"pick"},"assetIds":{"maxItems":16,"type":"array","items":{"type":"string","minLength":1}}},"required":["kind","assetIds"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"approve"},"approved":{"type":"boolean"}},"required":["kind","approved"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"edit"},"text":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false}},"required":["kind","text"],"additionalProperties":false}]},{"type":"null"}]}},"required":["choice","text","answer"],"additionalProperties":false},{"type":"null"}]},"textsCursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]}},"required":["items","choice","textsCursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.run.files":{"post":{"operationId":"apps.run.files","summary":"Read the files past those an estimate or a run gives in one MCP result, from a filesCursor of a step, a result or a choice, a page at a time.","tags":["apps"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"description":"The canvas, in its own workspace. Give documentId or appId, not both.","type":"string","minLength":1},"appId":{"description":"The app, as apps.app.get names it, for a run of one of its published versions.","type":"string","minLength":1},"cursor":{"type":"string","maxLength":4096}},"required":["cursor"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"integer","minimum":0,"maximum":9007199254740991},"files":{"type":"array","items":{"type":"string","minLength":1}}},"required":["item","files"],"additionalProperties":false}},"filesCursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]}},"required":["items","filesCursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.run.prompts":{"post":{"operationId":"apps.run.prompts","summary":"Read the step prompts past those an estimate gives, from the estimate’s promptsCursor, with the same input as the estimate. Charges nothing.","tags":["apps"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"description":"The canvas, in its own workspace. Give documentId or appId, not both.","type":"string","minLength":1},"appId":{"description":"The app, as apps.app.get names it, for a run of one of its published versions.","type":"string","minLength":1},"versionId":{"description":"A published version to run, as apps.app.get gives it. Without one, the canvas runs as it is now, which only its own workspace can.","type":"string","minLength":1},"keep":{"default":true,"description":"Keep an earlier run’s result for each step that would send exactly what it sent. False generates every step again.","type":"boolean"},"fields":{"default":[],"description":"Values for a published version’s fields, each by its field id from apps.app.get. A canvas’s own run takes none: it runs with what its nodes hold. A field left out runs with its default. A value is what the field’s accepts takes: { assetId } of a file of this workspace, uploaded with media.upload.begin and finished; { text: { en: \"…\" } }; { entryId } of a character, location or item of this workspace; { option } with one of accepts.options’ values; { number }; or { toggle }.","maxItems":16,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"value":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false}},"required":["text"],"additionalProperties":false},{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["entryId"],"additionalProperties":false},{"type":"object","properties":{"option":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["option"],"additionalProperties":false},{"type":"object","properties":{"number":{"type":"number"}},"required":["number"],"additionalProperties":false},{"type":"object","properties":{"toggle":{"type":"boolean"}},"required":["toggle"],"additionalProperties":false}]}},"required":["field","value"],"additionalProperties":false}},"targets":{"default":[],"description":"Steps to run, each with what it needs upstream; nothing else runs. Empty runs the whole canvas, as a run of another workspace’s app always does.","maxItems":64,"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"rerun":{"default":false,"type":"boolean"},"cursor":{"type":"string","maxLength":4096}},"required":["cursor"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"prompts":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"prompt":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"parts":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"string"},"mention":{"type":"object","properties":{"slot":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"part":{"type":"string","enum":["name","description"]}},"required":["slot","part"],"additionalProperties":false}},"required":["text","mention"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"string"},"placed":{"type":"object","properties":{"node":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"pending":{"type":"boolean","const":true}},"required":["node"],"additionalProperties":false}},"required":["text","placed"],"additionalProperties":false}]}},"edits":{"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}}},"required":["text","parts","edits"],"additionalProperties":false},{"type":"null"}]},"text":{"type":"object","properties":{"text":{"type":"string"},"parts":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"string"},"mention":{"type":"object","properties":{"slot":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"part":{"type":"string","enum":["name","description"]}},"required":["slot","part"],"additionalProperties":false}},"required":["text","mention"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"string"},"placed":{"type":"object","properties":{"node":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"pending":{"type":"boolean","const":true}},"required":["node"],"additionalProperties":false}},"required":["text","placed"],"additionalProperties":false}]}},"edits":{"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"lang":{"type":"string","enum":["ja","en"]}},"required":["text","parts","edits","lang"],"additionalProperties":false},"waitsOn":{"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}}},"required":["step","prompt","waitsOn"],"additionalProperties":false}},"tooLarge":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"chars":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["step","chars"],"additionalProperties":false}},"promptsCursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]}},"required":["prompts","tooLarge","promptsCursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.run.list":{"post":{"operationId":"apps.run.list","summary":"List a canvas’s or an app’s runs in a workspace, newest first, a page at a time, each with its state, why it failed, and the steps it was asked to run. With versionId, only that version’s runs.","tags":["apps"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"documentId":{"description":"The canvas, in its own workspace. Give documentId or appId, not both.","type":"string","minLength":1},"appId":{"description":"The app, as apps.app.get names it, for a run of one of its published versions.","type":"string","minLength":1},"versionId":{"type":"string","minLength":1}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"versionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"rev":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"state":{"type":"string","enum":["running","waiting","done","failed","canceled"]},"failure":{"anyOf":[{"type":"object","properties":{"step":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]},"error":{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}}},"required":["step","error"],"additionalProperties":false},{"type":"null"}]},"cancelReason":{"type":"string","enum":["removed","expired","nodeRemoved","stalled"]},"targets":{"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"rerun":{"type":"boolean"},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"completedAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["runId","versionId","rev","state","failure","targets","rerun","createdAt","completedAt"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.run.cancel":{"post":{"operationId":"apps.run.cancel","summary":"Cancel a run of an app or a canvas: no more steps start, and generations not yet sent are canceled. Files already made stay.","tags":["apps"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"description":"The canvas, in its own workspace. Give documentId or appId, not both.","type":"string","minLength":1},"appId":{"description":"The app, as apps.app.get names it, for a run of one of its published versions.","type":"string","minLength":1},"runId":{"type":"string","minLength":1}},"required":["runId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"state":{"type":"string","enum":["running","waiting","done","failed","canceled"]}},"required":["state"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.run.answer":{"post":{"operationId":"apps.run.answer","summary":"Answer a choice a run asks: pick some of the outputs it shows, approve or decline, or edit the text.","tags":["apps"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"description":"The canvas, in its own workspace. Give documentId or appId, not both.","type":"string","minLength":1},"appId":{"description":"The app, as apps.app.get names it, for a run of one of its published versions.","type":"string","minLength":1},"runId":{"type":"string","minLength":1},"choice":{"type":"string","pattern":"^[0-9A-Za-z]{16}$","description":"The choice’s id, from the run’s choices in apps.run.get."},"answer":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"pick"},"assetIds":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","minLength":1}}},"required":["kind","assetIds"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"approve"},"approved":{"type":"boolean"}},"required":["kind","approved"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"edit"},"text":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false}},"required":["kind","text"],"additionalProperties":false}],"description":"For a pick, { kind: \"pick\", assetIds } with count of the choice’s offered asset ids; for an approval, { kind: \"approve\", approved }; for an edit, { kind: \"edit\", text: { en: \"…\" } }."}},"required":["runId","choice","answer"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"state":{"type":"string","enum":["running","waiting","done","failed","canceled"]}},"required":["state"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.run.listAsking":{"post":{"operationId":"apps.run.listAsking","summary":"List a workspace’s runs that are asking a person to choose, longest waiting first.","tags":["apps"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"array","items":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"documentId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"versionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"appId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"title":{"type":"string"},"choices":{"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"askedAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["runId","documentId","versionId","appId","title","choices","askedAt"],"additionalProperties":false}},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.canvas.save":{"post":{"operationId":"documents.canvas.save","summary":"Save how a generated result was made on a new canvas: each generation becomes a step, and the uploads, first prompts and mentioned entries become its inputs. Returns the canvas’s document ID.","tags":["documents"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["assetId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"documentId":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/documents.canvas.canSave":{"post":{"operationId":"documents.canvas.canSave","summary":"Check whether a generated result can be saved as a canvas, without saving it.","tags":["documents"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"problem":{"anyOf":[{"type":"string","enum":["notCanvas","cannotRun","cannotRunNow","coinsRanOut","spendLimitReached","fieldValue","fileChecking","fieldRequired","notRunning","tooManyItems","notAsking","nodeRemoved","answerKind","notGenerated","othersApp","publishedVersion","notLiftable","tooLong","keyframes","promptTooLong","nothingToPick","descriptionTooLong","listNotWritten","listItemEmpty","listTooLong","textCutOff","textRefused","textEmpty","textUnavailable","fileBlocked","fileUnavailable","operationFailed","operationCanceled","cannotPublish","storageFull","textBlocked","nothingToJoin","tooManyFiles","suspended","removed","endsRemoved","stepRunning","tooManyRuns","filesChanged","tooManyPublished","notCopyable","runTooLarge"]},{"type":"null"}]}},"required":["problem"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.app.checkPublish":{"post":{"operationId":"apps.app.checkPublish","summary":"Check what publishing one of a canvas’s apps would hand out, writing nothing: the files and styles that go with it, the inputs others fill themselves, and what stops it.","tags":["apps"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"app":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]},"ends":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}}},"required":["id","ends"],"additionalProperties":false}},"required":["documentId","app"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"runnable":{"type":"boolean"},"problems":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","const":"namedEntry"},"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"entryId":{"type":"string","minLength":1}},"required":["code","step","entryId"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"styleMissing"},"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["code","step"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"privateModel"},"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"model":{"type":"string"}},"required":["code","step","model"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"privateEffect"},"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"programId":{"type":"string","minLength":1}},"required":["code","step","programId"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"fileUnusable"},"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"assetId":{"type":"string","minLength":1}},"required":["code","step","assetId"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"unreadable"},"node":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]}},"required":["code","node"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"inputFileUnusable"},"slot":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"assetId":{"type":"string","minLength":1}},"required":["code","slot","assetId"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"fixedEntry"},"slot":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["code","slot"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"inputEmpty"},"slot":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["code","slot"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"paintedMask"},"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["code","step"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"endMissing"},"node":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["code","node"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"tooManyFields"},"fields":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["code","fields","limit"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"fieldSetting"},"field":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["code","field","step"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"tooManyFiles"},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["code","count"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"tooManyFileUses"},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["code","count"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"tooManyStyles"},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["code","count"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"runLimit"},"problem":{"type":"object","properties":{"node":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]},"code":{"type":"string","enum":["empty","cycle","unknownCapability","slotEmpty","optionNotChosen","tooFewOptions","optionEmpty","noModel","noPrompt","inputMissing","roleNotAccepted","wrongKind","tooManyInputs","missingNode","manyLists","tooManyItems","tooManyListItems","resultUnconnected","mentionUnread","placedInText","listNotPaired","listLimit","textTooLong","entryUnavailable","cannotRunNow","notTextSlot","effectUnavailable","effectOutput","effectSetting","joinSetting","joinSettingUnknown","tooManyClips","oneSound","joinTooLong","fieldTarget","fieldAllowed","fieldDefault","priceNeedsFile","aspectNotOffered","stepRunning","priceNeedsEntry","fileChecking","recordUnreadable","tooManyFileInputs","inputTextTooLong","tooManyRunItems"]},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"setting":{"type":"string"},"items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"chars":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"seconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"runId":{"type":"string","minLength":1}},"required":["node","code"],"additionalProperties":false}},"required":["code","problem"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","const":"endsRemoved"},"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["code","reason"],"additionalProperties":false}]}},"files":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"assetId":{"type":"string","minLength":1},"use":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"reference"},"role":{"type":"string","enum":["characterDesign","style","reference"]}},"required":["kind","role"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"keyframe"},"atMs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","atMs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"setting"},"setting":{"type":"string"}},"required":["kind","setting"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"style"}},"required":["kind"],"additionalProperties":false}]}},"required":["step","assetId","use"],"additionalProperties":false}},"styles":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"style":{"type":"object","properties":{"title":{"type":"string"},"model":{"type":["string","null"]},"loras":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"weight":{"type":"number","minimum":-4,"maximum":4}},"required":["model","weight"],"additionalProperties":false}},"references":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","minLength":1},"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"label":{"type":"string","minLength":1,"maxLength":40}},"required":["assetId","role"],"additionalProperties":false}},"promptText":{"type":"string","maxLength":2000},"negativeText":{"type":"string","maxLength":2000},"description":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"modelSettings":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$"},"additionalProperties":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","maxLength":64000},{"type":"number"},{"type":"boolean"}]}},{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"asset"},"id":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false}}]}}}]}}},"palette":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"weight":{"type":"number","exclusiveMinimum":0,"maximum":100}},"required":["color"],"additionalProperties":false}}},"required":["title","model","loras","references","promptText","negativeText","description"],"additionalProperties":false}},"required":["step","style"],"additionalProperties":false}},"fixedInputs":{"type":"array","items":{"type":"object","properties":{"slot":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"name":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","text","option","entry"]},"value":{"anyOf":[{"type":"object","properties":{"text":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false}},"required":["text"],"additionalProperties":false},{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false}]}},"required":["slot","name","kind","value"],"additionalProperties":false}},"emptied":{"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"publishing":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string","minLength":1},"visibility":{"type":"string","enum":["private","public"]},"forkable":{"type":"boolean"},"versionId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"publishedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"group":{"anyOf":[{"type":"string","enum":["characters","lineAndColor","manga","backgrounds","goods","finishing","imageToVideo"]},{"type":"null"}]},"title":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":120},"en":{"type":"string","maxLength":120}},"additionalProperties":false},"suspended":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["reason"],"additionalProperties":false},{"type":"null"}]},"removed":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["reason"],"additionalProperties":false},{"type":"null"}]},"unreadable":{"type":"boolean"},"changed":{"type":"boolean"}},"required":["appId","visibility","forkable","versionId","number","publishedAt","group","title","description","suspended","removed","unreadable","changed"],"additionalProperties":false},{"type":"null"}]},"thumbnail":{"type":"object","properties":{"assetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"check":{"anyOf":[{"type":"string","enum":["pending","passed","failed"]},{"type":"null"}]}},"required":["assetId","check"],"additionalProperties":false},"exampleInput":{"type":"object","properties":{"assetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"shown":{"type":"boolean"},"check":{"anyOf":[{"type":"string","enum":["pending","passed","failed"]},{"type":"null"}]}},"required":["assetId","shown","check"],"additionalProperties":false}},"required":["runnable","problems","files","styles","fixedInputs","emptied","publishing","thumbnail","exampleInput"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.app.publish":{"post":{"operationId":"apps.app.publish","summary":"Publish a canvas’s app as it is now, as a new version anyone can run from a form that shows none of its steps. The app’s files go as copies, and others fill the required fields.","tags":["apps"],"x-qmoon-action":"publish","x-qmoon-scope":"publish","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"app":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},{"type":"null"}]},"ends":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}}},"required":["id","ends"],"additionalProperties":false},"title":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":120},"en":{"type":"string","maxLength":120}},"additionalProperties":false},"forkable":{"type":"boolean"},"group":{"type":"string","enum":["characters","lineAndColor","manga","backgrounds","goods","finishing","imageToVideo"]},"thumbnail":{"type":"string","minLength":1},"exampleInput":{"type":"boolean"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["documentId","app","forkable"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"app":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"versionId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["appId","app","versionId","number"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.app.unpublish":{"post":{"operationId":"apps.app.unpublish","summary":"Stop publishing an app: nobody else can open it or start a run of it. Runs already started finish on their version, and its copies of the fixed files are deleted once none is working.","tags":["apps"],"x-qmoon-action":"publish","x-qmoon-scope":"publish","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1}},"required":["documentId","appId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.app.listPublished":{"post":{"operationId":"apps.app.listPublished","summary":"List a canvas’s published apps: those on the canvas, in its order, then those no longer on it, newest first.","tags":["apps"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"array","items":{"type":"object","properties":{"app":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"title":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"onCanvas":{"type":"boolean"},"ends":{"type":"array","items":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"publishing":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"visibility":{"type":"string","enum":["private","public"]},"forkable":{"type":"boolean"},"versionId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"publishedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"group":{"anyOf":[{"type":"string","enum":["characters","lineAndColor","manga","backgrounds","goods","finishing","imageToVideo"]},{"type":"null"}]},"title":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":120},"en":{"type":"string","maxLength":120}},"additionalProperties":false},"suspended":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["reason"],"additionalProperties":false},{"type":"null"}]},"removed":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["reason"],"additionalProperties":false},{"type":"null"}]},"unreadable":{"type":"boolean"},"changed":{"type":"boolean"}},"required":["appId","visibility","forkable","versionId","number","publishedAt","group","title","description","suspended","removed","unreadable","changed"],"additionalProperties":false}},"required":["app","title","onCanvas","ends","publishing"],"additionalProperties":false}},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.app.list":{"post":{"operationId":"apps.app.list","summary":"List the workspace’s published apps, newest first, with when each was first published and whether staff suspended it. Read one’s form with apps.app.get.","tags":["apps"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"title":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"publishedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"thumbnailAssetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"suspended":{"type":"boolean"}},"required":["appId","title","publishedAt","thumbnailAssetId","suspended"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.app.get":{"post":{"operationId":"apps.app.get","summary":"Read an app’s form by the id at the end of the app’s address (qmoon.ai/apps/<id>) or from apps.site.list: the version to run, and each field with what it takes.","tags":["apps"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1}},"required":["appId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":120},"en":{"type":"string","maxLength":120}},"additionalProperties":false},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"forkable":{"type":"boolean"},"publishedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"fields":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"label":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":{"type":"boolean"},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"content"},"node":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["kind","node"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"step"},"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"setting":{"type":"string","enum":["aspect","seconds","count"]}},"required":["kind","step","setting"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"model"},"step":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"setting":{"type":"string","maxLength":128,"pattern":"^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)*$"}},"required":["kind","step","setting"],"additionalProperties":false}]},"value":{"anyOf":[{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false}},"required":["text"],"additionalProperties":false},{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["entryId"],"additionalProperties":false},{"type":"object","properties":{"option":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["option"],"additionalProperties":false},{"type":"object","properties":{"number":{"type":"number"}},"required":["number"],"additionalProperties":false},{"type":"object","properties":{"toggle":{"type":"boolean"}},"required":["toggle"],"additionalProperties":false}]},{"type":"null"}]},"accepts":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"file"},"media":{"type":"string","enum":["image","video","audio"]}},"required":["kind","media"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text"},"maxChars":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","maxChars"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"entry"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"choice"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":["string","number","boolean"]},"label":{"anyOf":[{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},{"type":"null"}]}},"required":["value","label"],"additionalProperties":false}}},"required":["kind","options"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"number"},"min":{"type":["number","null"]},"max":{"type":["number","null"]},"step":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]}},"required":["kind","min","max","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"toggle"}},"required":["kind"],"additionalProperties":false}]}},"required":["field","label","order","required","target","value","accepts"],"additionalProperties":false}},{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"label":{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"order":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":{"type":"boolean"},"value":{"anyOf":[{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false}},"required":["text"],"additionalProperties":false},{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["entryId"],"additionalProperties":false},{"type":"object","properties":{"option":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["option"],"additionalProperties":false},{"type":"object","properties":{"number":{"type":"number"}},"required":["number"],"additionalProperties":false},{"type":"object","properties":{"toggle":{"type":"boolean"}},"required":["toggle"],"additionalProperties":false}]},{"type":"null"}]},"accepts":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"file"},"media":{"type":"string","enum":["image","video","audio"]}},"required":["kind","media"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text"},"maxChars":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","maxChars"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"entry"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"choice"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":["string","number","boolean"]},"label":{"anyOf":[{"type":"object","properties":{"ja":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},{"type":"null"}]}},"required":["value","label"],"additionalProperties":false}}},"required":["kind","options"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"number"},"min":{"type":["number","null"]},"max":{"type":["number","null"]},"step":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]}},"required":["kind","min","max","step"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"toggle"}},"required":["kind"],"additionalProperties":false}]}},"required":["field","label","order","required","value","accepts"],"additionalProperties":false}}]},"own":{"type":"boolean"},"documentId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runnable":{"type":"boolean"},"unreadable":{"type":"boolean"},"suspended":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["reason"],"additionalProperties":false},{"type":"null"}]},"removed":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["reason"],"additionalProperties":false},{"type":"null"}]}},"required":["appId","versionId","number","title","description","creator","forkable","publishedAt","fields","own","documentId","runnable","unreadable","suspended","removed"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.app.formImages":{"post":{"operationId":"apps.app.formImages","summary":"Get short-lived links to the images an app’s form starts with, by field, and to its live version’s example under `example`, for that version or the one a workspace’s run runs.","tags":["apps"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1}},"required":["appId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"images":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"image":{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false}},"required":["key","image"],"additionalProperties":false}},"expiresIn":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["images","expiresIn"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.site.list":{"post":{"operationId":"apps.site.list","summary":"List the apps published on qmoon, newest first: every one, or those that make images, video, audio or text. Read one’s form with apps.app.get.","tags":["apps"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"tab":{"type":"string","enum":["all","images","video","audio","text"]},"group":{"type":"string","enum":["characters","lineAndColor","manga","backgrounds","goods","finishing","imageToVideo"]}},"required":["tab"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"title":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":120},"en":{"type":"string","maxLength":120}},"additionalProperties":false},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"made":{"type":"array","items":{"type":"string","enum":["image","video","audio","text","mesh"]}},"publishedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"thumbnail":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"input":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"needs":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["image","video","audio","text","entry"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","count"],"additionalProperties":false}},"coins":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["appId","title","description","creator","workspaceId","made","publishedAt","thumbnail","input","needs","coins"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.site.search":{"post":{"operationId":"apps.site.search","summary":"Search the apps published on qmoon by what they are called, who made them or what they make, best match first. Read one’s form with apps.app.get.","tags":["apps"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"query":{"type":"string","minLength":1,"maxLength":200}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"title":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":120},"en":{"type":"string","maxLength":120}},"additionalProperties":false},"creator":{"anyOf":[{"type":"object","properties":{"handle":{"type":"string"},"name":{"type":"object","properties":{"ja":{"type":"string","maxLength":200},"en":{"type":"string","maxLength":200}},"additionalProperties":false}},"required":["handle","name"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string","minLength":1},"made":{"type":"array","items":{"type":"string","enum":["image","video","audio","text","mesh"]}},"publishedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"thumbnail":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"input":{"anyOf":[{"type":"object","properties":{"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["url","width"],"additionalProperties":false}},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"placeholder":{"type":["string","null"]}},"required":["sources","width","height","placeholder"],"additionalProperties":false},{"type":"null"}]},"needs":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["image","video","audio","text","entry"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","count"],"additionalProperties":false}},"coins":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["appId","title","description","creator","workspaceId","made","publishedAt","thumbnail","input","needs","coins"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.batch.estimate":{"post":{"operationId":"apps.batch.estimate","summary":"Estimate how many rows and coins a canvas batch will take before running, counting kept rows at zero coins.","tags":["apps"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"rows":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"rowId":{"type":"string","minLength":1,"maxLength":64},"label":{"default":"","type":"string","maxLength":120},"fills":{"default":[],"maxItems":16,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"value":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false}},"required":["text"],"additionalProperties":false},{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["entryId"],"additionalProperties":false},{"type":"object","properties":{"option":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["option"],"additionalProperties":false},{"type":"object","properties":{"number":{"type":"number"}},"required":["number"],"additionalProperties":false},{"type":"object","properties":{"toggle":{"type":"boolean"}},"required":["toggle"],"additionalProperties":false}]}},"required":["field","value"],"additionalProperties":false}}},"required":["rowId"],"additionalProperties":false}},"keep":{"default":true,"type":"boolean"}},"required":["documentId","rows"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"rowCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalCoins":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"exact":{"type":"boolean"},"canRun":{"type":"boolean"},"hasSteps":{"type":"boolean"},"rows":{"type":"array","items":{"type":"object","properties":{"rowId":{"type":"string"},"coins":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"exact":{"type":"boolean"},"kept":{"type":"boolean"},"canRun":{"type":"boolean"},"error":{"type":["string","null"]}},"required":["rowId","coins","exact","kept","canRun","error"],"additionalProperties":false}}},"required":["rowCount","totalCoins","exact","canRun","hasSteps","rows"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.batch.start":{"post":{"operationId":"apps.batch.start","summary":"Start a canvas batch by running each row with its filled values.","tags":["apps"],"x-qmoon-action":"charge","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","minLength":1},"source":{"default":{"kind":"manual"},"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"manual"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"collection"},"collectionId":{"type":"string","minLength":1}},"required":["kind","collectionId"],"additionalProperties":false}]},"rows":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"rowId":{"type":"string","minLength":1,"maxLength":64},"label":{"default":"","type":"string","maxLength":120},"fills":{"default":[],"maxItems":16,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"},"value":{"anyOf":[{"type":"object","properties":{"assetId":{"type":"string","minLength":1}},"required":["assetId"],"additionalProperties":false},{"type":"object","properties":{"text":{"type":"object","properties":{"ja":{"type":"string","maxLength":4000},"en":{"type":"string","maxLength":4000}},"additionalProperties":false}},"required":["text"],"additionalProperties":false},{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"variant":{"type":"string","pattern":"^[0-9A-Za-z]{16}$"}},"required":["entryId"],"additionalProperties":false},{"type":"object","properties":{"option":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["option"],"additionalProperties":false},{"type":"object","properties":{"number":{"type":"number"}},"required":["number"],"additionalProperties":false},{"type":"object","properties":{"toggle":{"type":"boolean"}},"required":["toggle"],"additionalProperties":false}]}},"required":["field","value"],"additionalProperties":false}}},"required":["rowId"],"additionalProperties":false}},"keep":{"default":true,"type":"boolean"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["documentId","rows"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"batchRunId":{"type":"string","minLength":1},"rowCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedCoins":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"runIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["batchRunId","rowCount","estimatedCoins","runIds"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/apps.batch.list":{"post":{"operationId":"apps.batch.list","summary":"List recent batch runs for a canvas and each row’s status.","tags":["apps"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"documentId":{"type":"string","minLength":1}},"required":["documentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"batchRunId":{"type":"string","minLength":1},"documentId":{"type":"string","minLength":1},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"manual"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"collection"},"collectionId":{"type":"string","minLength":1}},"required":["kind","collectionId"],"additionalProperties":false}]},"keep":{"type":"boolean"},"estimatedCoins":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows":{"type":"array","items":{"type":"object","properties":{"rowId":{"type":"string"},"label":{"type":"string"},"runId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"state":{"type":"string","enum":["running","waiting","done","failed","canceled","error"]},"error":{"type":["string","null"]},"assetIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["rowId","label","runId","state","error","assetIds"],"additionalProperties":false}}},"required":["batchRunId","documentId","source","keep","estimatedCoins","createdAt","rows"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.program.create":{"post":{"operationId":"programs.program.create","summary":"Create a program, such as an effect, from its files: a qmoon.json manifest, code as text or base64, and media as asset IDs. Returns its first version, or what stops it.","tags":["programs"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"files":{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"object","properties":{"path":{"type":"string","maxLength":200},"text":{"type":"string"}},"required":["path","text"],"additionalProperties":false},{"type":"object","properties":{"path":{"type":"string","maxLength":200},"base64":{"type":"string","format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$"}},"required":["path","base64"],"additionalProperties":false},{"type":"object","properties":{"path":{"type":"string","maxLength":200},"assetId":{"type":"string","minLength":1}},"required":["path","assetId"],"additionalProperties":false}]}},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["files"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"stored"},"programId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"created":{"type":"boolean"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["sinHash","intPrecision"]},"path":{"type":"string","maxLength":200,"pattern":"^(?!\\.{1,2}(?:\\/|$))(?!.*\\/\\.{1,2}(?:\\/|$))[0-9A-Za-z_.-]+(?:\\/[0-9A-Za-z_.-]+)*$"}},"required":["code","path"],"additionalProperties":false}}},"required":["kind","programId","versionId","number","hash","created","warnings"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"problems"},"problems":{"minItems":1,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["manifestMissing","manifestInvalid","pathInvalid","entryMissing","pathDuplicate","fileType","fileTooLarge","tooManyFiles","codeTooLarge","assetUnusable"]},"path":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"detail":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}},"required":["code","path","detail"],"additionalProperties":false}}},"required":["kind","problems"],"additionalProperties":false}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.version.create":{"post":{"operationId":"programs.version.create","summary":"Push a new version of a program: every file, as for program.create. The same files as an existing version return that version. Versions never change.","tags":["programs"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"programId":{"type":"string","minLength":1},"files":{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"object","properties":{"path":{"type":"string","maxLength":200},"text":{"type":"string"}},"required":["path","text"],"additionalProperties":false},{"type":"object","properties":{"path":{"type":"string","maxLength":200},"base64":{"type":"string","format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$"}},"required":["path","base64"],"additionalProperties":false},{"type":"object","properties":{"path":{"type":"string","maxLength":200},"assetId":{"type":"string","minLength":1}},"required":["path","assetId"],"additionalProperties":false}]}},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["programId","files"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"stored"},"programId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"created":{"type":"boolean"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["sinHash","intPrecision"]},"path":{"type":"string","maxLength":200,"pattern":"^(?!\\.{1,2}(?:\\/|$))(?!.*\\/\\.{1,2}(?:\\/|$))[0-9A-Za-z_.-]+(?:\\/[0-9A-Za-z_.-]+)*$"}},"required":["code","path"],"additionalProperties":false}}},"required":["kind","programId","versionId","number","hash","created","warnings"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"problems"},"problems":{"minItems":1,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["manifestMissing","manifestInvalid","pathInvalid","entryMissing","pathDuplicate","fileType","fileTooLarge","tooManyFiles","codeTooLarge","assetUnusable"]},"path":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"detail":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}},"required":["code","path","detail"],"additionalProperties":false}}},"required":["kind","problems"],"additionalProperties":false}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.program.get":{"post":{"operationId":"programs.program.get","summary":"Read a program of the workspace, or a public one: the name, contracts, sharing, any suspension or removal, and the latest version with its files.","tags":["programs"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"programId":{"type":"string","minLength":1}},"required":["programId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"programId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"name":{"type":"string"},"description":{"type":["string","null"]},"contracts":{"type":"array","items":{"type":"string","enum":["apply"]}},"visibility":{"type":"string","enum":["private","public"]},"forkable":{"type":"boolean"},"forkedFrom":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"original":{"anyOf":[{"type":"object","properties":{"programId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1}},"required":["programId","versionId"],"additionalProperties":false},{"type":"null"}]}},"required":["name","original"],"additionalProperties":false},{"type":"null"}]},"latest":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"programId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string"},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"manifest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":500},"sdk":{"anyOf":[{"type":"number","const":1}]},"runtime":{"type":"string","enum":["web"]},"apply":{"type":"object","properties":{"entry":{"type":"string","maxLength":200,"pattern":"^(?!\\.{1,2}(?:\\/|$))(?!.*\\/\\.{1,2}(?:\\/|$))[0-9A-Za-z_.-]+(?:\\/[0-9A-Za-z_.-]+)*$"},"inputs":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"kinds":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["image","video"]}}},"required":["role","kinds"],"additionalProperties":false}},"settings":{"default":[],"maxItems":24,"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":60},"en":{"type":"string","maxLength":60}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false},"kind":{"type":"string","enum":["number","integer"]},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"default":{"type":"number"}},"required":["name","kind","min","max","default"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":60},"en":{"type":"string","maxLength":60}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false},"kind":{"type":"string","const":"boolean"},"default":{"type":"boolean"}},"required":["name","kind","default"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":60},"en":{"type":"string","maxLength":60}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false},"kind":{"type":"string","const":"choice"},"options":{"minItems":2,"maxItems":32,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":60},"en":{"type":"string","maxLength":60}},"additionalProperties":false}},"required":["value"],"additionalProperties":false}},"default":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"}},"required":["name","kind","options","default"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":60},"en":{"type":"string","maxLength":60}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false},"kind":{"type":"string","const":"color"},"default":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"}},"required":["name","kind","default"],"additionalProperties":false}]}},"outputs":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["image","video"]}}},"required":["entry","inputs","settings","outputs"],"additionalProperties":false}},"required":["name","sdk","runtime"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","maxLength":200,"pattern":"^(?!\\.{1,2}(?:\\/|$))(?!.*\\/\\.{1,2}(?:\\/|$))[0-9A-Za-z_.-]+(?:\\/[0-9A-Za-z_.-]+)*$"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"mediaType":{"type":"string","minLength":1,"maxLength":100},"assetId":{"type":"string","minLength":1}},"required":["path","sha256","bytes","mediaType"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["sinHash","intPrecision"]},"path":{"type":"string","maxLength":200,"pattern":"^(?!\\.{1,2}(?:\\/|$))(?!.*\\/\\.{1,2}(?:\\/|$))[0-9A-Za-z_.-]+(?:\\/[0-9A-Za-z_.-]+)*$"}},"required":["code","path"],"additionalProperties":false}}},"required":["versionId","programId","number","hash","name","createdAt","manifest","files","warnings"],"additionalProperties":false},"versions":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"suspended":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["reason"],"additionalProperties":false},{"type":"null"}]},"removed":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["minorSafety","sexual","violence","harassment","selfHarm","realPerson","impersonation","spam","other","takeItDown","copyright"]}},"required":["reason"],"additionalProperties":false},{"type":"null"}]}},"required":["programId","workspaceId","name","description","contracts","visibility","forkable","forkedFrom","latest","versions","createdAt","updatedAt","suspended","removed"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.program.list":{"post":{"operationId":"programs.program.list","summary":"List the workspace’s programs, most recently updated first, a page at a time.","tags":["programs"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"programId":{"type":"string","minLength":1},"name":{"type":"string"},"contracts":{"type":"array","items":{"type":"string","enum":["apply"]}},"visibility":{"type":"string","enum":["private","public"]},"versions":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"forkedFrom":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false},{"type":"null"}]},"latest":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"programId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string"},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["versionId","programId","number","hash","name","createdAt"],"additionalProperties":false},"accepts":{"type":"array","items":{"type":"string","enum":["image","video"]}},"makes":{"type":"array","items":{"type":"string","enum":["image","video"]}},"inputs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["programId","name","contracts","visibility","versions","updatedAt","forkedFrom","latest","accepts","makes","inputs"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.kit.list":{"post":{"operationId":"programs.kit.list","summary":"List qmoon’s kits, starter programs anyone can read and fork such as the shader kit, a page at a time. Read a kit’s README.md before you fork it.","tags":["programs"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"programId":{"type":"string","minLength":1},"name":{"type":"string"},"contracts":{"type":"array","items":{"type":"string","enum":["apply"]}},"visibility":{"type":"string","enum":["private","public"]},"versions":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"updatedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"forkedFrom":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false},{"type":"null"}]},"latest":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"programId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string"},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["versionId","programId","number","hash","name","createdAt"],"additionalProperties":false},"accepts":{"type":"array","items":{"type":"string","enum":["image","video"]}},"makes":{"type":"array","items":{"type":"string","enum":["image","video"]}},"inputs":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["programId","name","contracts","visibility","versions","updatedAt","forkedFrom","latest","accepts","makes","inputs"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.program.update":{"post":{"operationId":"programs.program.update","summary":"Change who can use a program: private or public, and whether others may fork it. Making it public says whether they may.","tags":["programs"],"x-qmoon-action":"publish","x-qmoon-scope":"publish","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"programId":{"type":"string","minLength":1},"visibility":{"type":"string","enum":["private","public"]},"forkable":{"type":"boolean"}},"required":["programId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"visibility":{"type":"string","enum":["private","public"]},"forkable":{"type":"boolean"}},"required":["visibility","forkable"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.program.delete":{"post":{"operationId":"programs.program.delete","summary":"Move a program to Recently deleted, where it can be restored for 30 days. Meanwhile it is hidden and takes no new versions, forks or generations. Results already made keep naming their version.","tags":["programs"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"programId":{"type":"string","minLength":1}},"required":["programId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.program.restore":{"post":{"operationId":"programs.program.restore","summary":"Restore a program from Recently deleted.","tags":["programs"],"x-qmoon-action":"delete","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"programId":{"type":"string","minLength":1}},"required":["programId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.program.fork":{"post":{"operationId":"programs.program.fork","summary":"Fork a version of a program into the workspace as a new program, which always names the original it came from; a fork of a fork names the first. Without a version, forks the latest.","tags":["programs"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"programId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["programId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"programId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1}},"required":["programId","versionId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.version.get":{"post":{"operationId":"programs.version.get","summary":"Read one version of a program: the manifest, every file with its hash, and what the checks noted.","tags":["programs"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string","minLength":1}},"required":["versionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"programId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string"},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"manifest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":500},"sdk":{"anyOf":[{"type":"number","const":1}]},"runtime":{"type":"string","enum":["web"]},"apply":{"type":"object","properties":{"entry":{"type":"string","maxLength":200,"pattern":"^(?!\\.{1,2}(?:\\/|$))(?!.*\\/\\.{1,2}(?:\\/|$))[0-9A-Za-z_.-]+(?:\\/[0-9A-Za-z_.-]+)*$"},"inputs":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"kinds":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["image","video"]}}},"required":["role","kinds"],"additionalProperties":false}},"settings":{"default":[],"maxItems":24,"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":60},"en":{"type":"string","maxLength":60}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false},"kind":{"type":"string","enum":["number","integer"]},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"default":{"type":"number"}},"required":["name","kind","min","max","default"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":60},"en":{"type":"string","maxLength":60}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false},"kind":{"type":"string","const":"boolean"},"default":{"type":"boolean"}},"required":["name","kind","default"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":60},"en":{"type":"string","maxLength":60}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false},"kind":{"type":"string","const":"choice"},"options":{"minItems":2,"maxItems":32,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":60},"en":{"type":"string","maxLength":60}},"additionalProperties":false}},"required":["value"],"additionalProperties":false}},"default":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"}},"required":["name","kind","options","default"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":60},"en":{"type":"string","maxLength":60}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false},"kind":{"type":"string","const":"color"},"default":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"}},"required":["name","kind","default"],"additionalProperties":false}]}},"outputs":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["image","video"]}}},"required":["entry","inputs","settings","outputs"],"additionalProperties":false}},"required":["name","sdk","runtime"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","maxLength":200,"pattern":"^(?!\\.{1,2}(?:\\/|$))(?!.*\\/\\.{1,2}(?:\\/|$))[0-9A-Za-z_.-]+(?:\\/[0-9A-Za-z_.-]+)*$"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"mediaType":{"type":"string","minLength":1,"maxLength":100},"assetId":{"type":"string","minLength":1}},"required":["path","sha256","bytes","mediaType"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["sinHash","intPrecision"]},"path":{"type":"string","maxLength":200,"pattern":"^(?!\\.{1,2}(?:\\/|$))(?!.*\\/\\.{1,2}(?:\\/|$))[0-9A-Za-z_.-]+(?:\\/[0-9A-Za-z_.-]+)*$"}},"required":["code","path"],"additionalProperties":false}}},"required":["versionId","programId","number","hash","name","createdAt","manifest","files","warnings"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.version.find":{"post":{"operationId":"programs.version.find","summary":"Find a version of a program the workspace may read by the version’s number, with the program’s name and the number of its latest version.","tags":["programs"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"programId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["programId","number"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"ready"},"name":{"type":"string"},"latest":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"version":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"programId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string"},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"manifest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":500},"sdk":{"anyOf":[{"type":"number","const":1}]},"runtime":{"type":"string","enum":["web"]},"apply":{"type":"object","properties":{"entry":{"type":"string","maxLength":200,"pattern":"^(?!\\.{1,2}(?:\\/|$))(?!.*\\/\\.{1,2}(?:\\/|$))[0-9A-Za-z_.-]+(?:\\/[0-9A-Za-z_.-]+)*$"},"inputs":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["source","mask","characterDesign","style","reference","person","garment","firstFrame","lastFrame","keyframe","motion","speech","voice","music"]},"kinds":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["image","video"]}}},"required":["role","kinds"],"additionalProperties":false}},"settings":{"default":[],"maxItems":24,"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":60},"en":{"type":"string","maxLength":60}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false},"kind":{"type":"string","enum":["number","integer"]},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"default":{"type":"number"}},"required":["name","kind","min","max","default"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":60},"en":{"type":"string","maxLength":60}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false},"kind":{"type":"string","const":"boolean"},"default":{"type":"boolean"}},"required":["name","kind","default"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":60},"en":{"type":"string","maxLength":60}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false},"kind":{"type":"string","const":"choice"},"options":{"minItems":2,"maxItems":32,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":60},"en":{"type":"string","maxLength":60}},"additionalProperties":false}},"required":["value"],"additionalProperties":false}},"default":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"}},"required":["name","kind","options","default"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"label":{"type":"object","properties":{"ja":{"type":"string","maxLength":60},"en":{"type":"string","maxLength":60}},"additionalProperties":false},"description":{"type":"object","properties":{"ja":{"type":"string","maxLength":500},"en":{"type":"string","maxLength":500}},"additionalProperties":false},"kind":{"type":"string","const":"color"},"default":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"}},"required":["name","kind","default"],"additionalProperties":false}]}},"outputs":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["image","video"]}}},"required":["entry","inputs","settings","outputs"],"additionalProperties":false}},"required":["name","sdk","runtime"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","maxLength":200,"pattern":"^(?!\\.{1,2}(?:\\/|$))(?!.*\\/\\.{1,2}(?:\\/|$))[0-9A-Za-z_.-]+(?:\\/[0-9A-Za-z_.-]+)*$"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"mediaType":{"type":"string","minLength":1,"maxLength":100},"assetId":{"type":"string","minLength":1}},"required":["path","sha256","bytes","mediaType"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["sinHash","intPrecision"]},"path":{"type":"string","maxLength":200,"pattern":"^(?!\\.{1,2}(?:\\/|$))(?!.*\\/\\.{1,2}(?:\\/|$))[0-9A-Za-z_.-]+(?:\\/[0-9A-Za-z_.-]+)*$"}},"required":["code","path"],"additionalProperties":false}}},"required":["versionId","programId","number","hash","name","createdAt","manifest","files","warnings"],"additionalProperties":false}},"required":["kind","name","latest","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"failed"},"error":{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}}},"required":["kind","error"],"additionalProperties":false}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.version.list":{"post":{"operationId":"programs.version.list","summary":"List a program’s versions, newest first, a page at a time: your own program’s, or a public one’s, such as a kit.","tags":["programs"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"programId":{"type":"string","minLength":1}},"required":["programId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"programId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string"},"createdAt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["versionId","programId","number","hash","name","createdAt"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.file.get":{"post":{"operationId":"programs.file.get","summary":"Read one file of a version: code as text, WebAssembly as base64, or a media file’s asset ID.","tags":["programs"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"path":{"type":"string","maxLength":200,"pattern":"^(?!\\.{1,2}(?:\\/|$))(?!.*\\/\\.{1,2}(?:\\/|$))[0-9A-Za-z_.-]+(?:\\/[0-9A-Za-z_.-]+)*$"}},"required":["versionId","path"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"anyOf":[{"type":"object","properties":{"path":{"type":"string","maxLength":200,"pattern":"^(?!\\.{1,2}(?:\\/|$))(?!.*\\/\\.{1,2}(?:\\/|$))[0-9A-Za-z_.-]+(?:\\/[0-9A-Za-z_.-]+)*$"},"mediaType":{"type":"string"},"text":{"type":"string"}},"required":["path","mediaType","text"],"additionalProperties":false},{"type":"object","properties":{"path":{"type":"string","maxLength":200,"pattern":"^(?!\\.{1,2}(?:\\/|$))(?!.*\\/\\.{1,2}(?:\\/|$))[0-9A-Za-z_.-]+(?:\\/[0-9A-Za-z_.-]+)*$"},"mediaType":{"type":"string"},"base64":{"type":"string"}},"required":["path","mediaType","base64"],"additionalProperties":false},{"type":"object","properties":{"path":{"type":"string","maxLength":200,"pattern":"^(?!\\.{1,2}(?:\\/|$))(?!.*\\/\\.{1,2}(?:\\/|$))[0-9A-Za-z_.-]+(?:\\/[0-9A-Za-z_.-]+)*$"},"mediaType":{"type":"string"},"assetId":{"type":"string","minLength":1}},"required":["path","mediaType","assetId"],"additionalProperties":false}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.effect.estimate":{"post":{"operationId":"programs.effect.estimate","summary":"Estimate applying a version of your own effect, or a public one such as a kit, to an image or video in the workspace: the output’s kind, size and length, and the coins. Charges nothing.","tags":["programs"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"sourceAssetId":{"type":"string","minLength":1},"settings":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"additionalProperties":{"anyOf":[{"type":"number"},{"type":"boolean"},{"type":"string","maxLength":64}]}},"seed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["versionId","sourceAssetId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"ready"},"mediaKind":{"type":"string","enum":["image","video"]},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"seconds":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"coins":{"type":"integer","minimum":0,"maximum":9007199254740991},"blocked":{"anyOf":[{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}},{"type":"null"}]}},"required":["kind","mediaKind","width","height","seconds","coins","blocked"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"failed"},"error":{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}}},"required":["kind","error"],"additionalProperties":false}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.effect.apply":{"post":{"operationId":"programs.effect.apply","summary":"Apply a version of your own effect, or a public one such as a kit, to an image or video in the workspace. Charges coins. The result lands in Create; read it with generation_get.","tags":["programs"],"x-qmoon-action":"charge","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"sourceAssetId":{"type":"string","minLength":1},"settings":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"additionalProperties":{"anyOf":[{"type":"number"},{"type":"boolean"},{"type":"string","maxLength":64}]}},"seed":{"type":"integer","minimum":0,"maximum":9007199254740991},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["versionId","sourceAssetId","requestId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"generationId":{"type":"string","minLength":1}},"required":["generationId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.version.preview":{"post":{"operationId":"programs.version.preview","summary":"Render a version of your effect on an image or video of the workspace at chosen times, in seconds: PNG frames, its console and timings. Charges coins. Read it with preview_get.","tags":["programs"],"x-qmoon-action":"charge","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string","minLength":1},"sourceAssetId":{"type":"string","minLength":1},"times":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"number","minimum":0,"maximum":10}},"settings":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,31}$"},"additionalProperties":{"anyOf":[{"type":"number"},{"type":"boolean"},{"type":"string","maxLength":64}]}},"seed":{"type":"integer","minimum":0,"maximum":9007199254740991},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["versionId","sourceAssetId","times","requestId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"previewId":{"type":"string","minLength":1}},"required":["previewId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/programs.preview.get":{"post":{"operationId":"programs.preview.get","summary":"Read a preview: its state, a short-lived URL for each frame drawn, what the effect’s console printed, the error that stopped it and the timings.","tags":["programs"],"x-qmoon-action":"read","x-qmoon-scope":"read","parameters":[{"name":"Prefer","in":"header","required":false,"description":"wait=n keeps the read open for up to n seconds (at most 25) until the result settles. Without it, the read responds immediately.","schema":{"type":"string","examples":["wait=20"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"previewId":{"type":"string","minLength":1}},"required":["previewId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done. `settled` says whether the result had settled. Preference-Applied says how long the read waited.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"previewId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"state":{"type":"string","enum":["rendering","done","failed"]},"coins":{"type":"integer","minimum":0,"maximum":9007199254740991},"frames":{"type":"array","items":{"type":"object","properties":{"t":{"type":"number","minimum":0},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"ms":{"type":"number","minimum":0}},"required":["t","url","expiresAt","width","height","ms"],"additionalProperties":false}},"console":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string"},"text":{"type":"string"}},"required":["level","text"],"additionalProperties":false}},"failure":{"anyOf":[{"type":"object","properties":{"message":{"type":["string","null"]},"effect":{"type":"object","properties":{"kind":{"type":"string","enum":["threw","timeLimit","memory","crashed","drewNothing"]},"detail":{"type":"string"}},"required":["kind"],"additionalProperties":false}},"required":["message","effect"],"additionalProperties":false},{"type":"null"}]},"loadMs":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"setupMs":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["previewId","versionId","state","coins","frames","console","failure","loadMs","setupMs"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output","settled"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/builds.build.estimate":{"post":{"operationId":"builds.build.estimate","summary":"Estimate a build: the most it can cost, which its hold reserves, with the error that stops it now, or null. Charges nothing.","tags":["builds"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"ready"},"coins":{"type":"integer","minimum":0,"maximum":9007199254740991},"blocked":{"anyOf":[{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"}},"required":["area","code"],"additionalProperties":{"type":["string","number","boolean","null"]}},{"type":"null"}]}},"required":["kind","coins","blocked"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unavailable"}},"required":["kind"],"additionalProperties":false}]},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/builds.build.start":{"post":{"operationId":"builds.build.start","summary":"Start a build: an agent builds a new effect from the request, or changes the effect named. Holds its price, and charges what it uses.","tags":["builds"],"x-qmoon-action":"charge","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"request":{"type":"string","maxLength":4000},"programId":{"type":"string","minLength":1},"assetIds":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","minLength":1}},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["request","requestId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"buildId":{"type":"string","minLength":1}},"required":["buildId"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/builds.build.message":{"post":{"operationId":"builds.build.message","summary":"Tell a waiting build what to change. Only the person who started it can.","tags":["builds"],"x-qmoon-action":"create","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"buildId":{"type":"string","minLength":1},"text":{"type":"string","maxLength":4000},"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["buildId","text"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/builds.build.stop":{"post":{"operationId":"builds.build.stop","summary":"Stop a build. It charges what it used and releases the rest of its hold. Its person, an owner or an admin can.","tags":["builds"],"x-qmoon-action":"edit","x-qmoon-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"buildId":{"type":"string","minLength":1}},"required":["buildId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"null"},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/builds.build.get":{"post":{"operationId":"builds.build.get","summary":"Read a build of the workspace: the request, its state, the effect and what it has cost.","tags":["builds"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"buildId":{"type":"string","minLength":1}},"required":["buildId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"buildId":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"startedBy":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["accountId","name"],"additionalProperties":false},"own":{"type":"boolean"},"request":{"type":"string"},"programId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"assetIds":{"type":"array","items":{"type":"string","minLength":1}},"context":{"type":"string"},"state":{"type":"string","enum":["working","waiting","stopped","failed","ended"]},"coins":{"type":"object","properties":{"hold":{"type":"integer","minimum":0,"maximum":9007199254740991},"agent":{"type":"integer","minimum":0,"maximum":9007199254740991},"renders":{"type":"integer","minimum":0,"maximum":9007199254740991},"used":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["hold","agent","renders","used"],"additionalProperties":false},"startedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"activeAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"settledAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["buildId","workspaceId","startedBy","own","request","programId","assetIds","context","state","coins","startedAt","activeAt","settledAt"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/builds.event.list":{"post":{"operationId":"builds.event.list","summary":"List a build’s log, newest first, a page at a time.","tags":["builds"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"buildId":{"type":"string","minLength":1}},"required":["buildId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"eventId":{"type":"string","minLength":1},"at":{"type":"integer","minimum":0,"maximum":9007199254740991},"event":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"message"},"from":{"type":"string","enum":["person","builder"]},"text":{"type":"string"}},"required":["kind","from","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"forked"},"programId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"kit":{"type":["string","null"]}},"required":["kind","programId","versionId","kit"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"created"},"programId":{"type":"string","minLength":1}},"required":["kind","programId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"pushed"},"versionId":{"type":"string","minLength":1},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","versionId","number"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"tool"},"name":{"type":"string","maxLength":100},"qmoon":{"type":"boolean"}},"required":["kind","name","qmoon"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"declined"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"measured"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"leftOpen"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"failed"},"reason":{"type":"string","enum":["start","error","approval","ended"]}},"required":["kind","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"ended"},"reason":{"type":"string","enum":["stopped","budget","idle","deleted","membership"]}},"required":["kind","reason"],"additionalProperties":false}]}},"required":["eventId","at","event"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/builds.build.list":{"post":{"operationId":"builds.build.list","summary":"List the workspace’s builds, or one effect’s, newest first, a page at a time.","tags":["builds"],"x-qmoon-action":"read","x-qmoon-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"limit":{"type":"integer","minimum":1,"maximum":100},"programId":{"type":"string","minLength":1}},"additionalProperties":false}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"done"},"output":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"buildId":{"type":"string","minLength":1},"startedBy":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["accountId","name"],"additionalProperties":false},"own":{"type":"boolean"},"request":{"type":"string"},"programId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"state":{"type":"string","enum":["working","waiting","stopped","failed","ended"]},"coins":{"type":"object","properties":{"hold":{"type":"integer","minimum":0,"maximum":9007199254740991},"agent":{"type":"integer","minimum":0,"maximum":9007199254740991},"renders":{"type":"integer","minimum":0,"maximum":9007199254740991},"used":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["hold","agent","renders","used"],"additionalProperties":false},"startedAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"activeAt":{"type":"integer","minimum":0,"maximum":9007199254740991},"settledAt":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["buildId","startedBy","own","request","programId","state","coins","startedAt","activeAt","settledAt"],"additionalProperties":false}},"cursor":{"type":["string","null"]}},"required":["items","cursor"],"additionalProperties":false},"settled":{"type":"boolean"}},"required":["status","output"],"additionalProperties":false}}}},"400":{"description":"The input does not match the operation’s schema. `issue` says where.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"The bearer token does not belong to an active connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"The call is over a spend limit or out of coins, and `code` says which. For a spend limit, `limit` names the limit, and `remaining` and `needed` give the coins remaining and the coins the request needs. `resetsAt` is when the limit resets. It is null, with `retryable` false, when waiting will not help and only coins, a plan or a higher limit will. No Retry-After header is sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The connection’s scope or its permissions do not allow the call, or the operation is not in the public API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The target or the operation does not exist, or the connection is not allowed to see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The request id was used for another request, or a call with it is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than the API accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The operation’s rules do not allow the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many calls from this connection. Retry-After and `retryAfterMs` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The call failed. `errorId` identifies the failure in qmoon’s logs. The response contains no other details of the failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"A service the operation needs is not set up on this deployment. Trying again does not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"A service the operation needs is set up but not answering now (`down`). Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"securitySchemes":{"connection":{"type":"http","scheme":"bearer","description":"A connection's credential: an API key's secret."}},"schemas":{"ErrorResponse":{"description":"A failed call. `area` and `code` say why, with scalar details, and `retryable` says whether trying again later can succeed. Errors from the entry point itself have the area `request`.","type":"object","properties":{"status":{"type":"string","const":"failed"},"error":{"type":"object","properties":{"area":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"code":{"type":"string","pattern":"^[a-z][A-Za-z0-9]{0,63}$"},"retryable":{"type":"boolean","description":"Whether the same call can succeed if it is tried again later."},"help":{"type":"string","description":"What happened and what to do, in one or two sentences in English, for the agent that reads it."}},"required":["area","code","retryable","help"],"additionalProperties":{"type":["string","number","boolean","null"]}}},"required":["status","error"],"additionalProperties":false}}}}