@deepraxis/sdk 0.1.1-dev.6b385c0 → 0.1.1-dev.6c28f93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/METHODS.md +47 -2
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +106 -16
- package/dist/generated/sdk.gen.js +305 -31
- package/dist/generated/types.gen.d.ts +1708 -405
- package/dist/helpers/browser-documentation.d.ts +1 -1
- package/dist/helpers/browser-documentation.js +1 -1
- package/dist/operations.generated.js +682 -104
- package/dist/resources.generated.d.ts +36 -9
- package/dist/resources.generated.js +26 -1
- package/package.json +1 -1
|
@@ -1322,7 +1322,7 @@ export const fileRetrieveUpload = (options) => (options.client ?? client).get({
|
|
|
1322
1322
|
/**
|
|
1323
1323
|
* Create a one-time upload URL
|
|
1324
1324
|
*
|
|
1325
|
-
* Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide basename, exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid, wrong-action or cross-organization URLs return 404. URL lifetime defaults to 900 seconds for single PUT or 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {"filename":"photo.png","bytes":2048,"content_type":"image/png"}.
|
|
1325
|
+
* Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide filename (the stored basename), exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid, wrong-action or cross-organization URLs return 404. URL lifetime defaults to 900 seconds for single PUT or 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {"filename":"photo.png","bytes":2048,"content_type":"image/png"}.
|
|
1326
1326
|
*/
|
|
1327
1327
|
export const fileCreateSignedUpload = (options) => (options.client ?? client).post({
|
|
1328
1328
|
security: [{
|
|
@@ -2381,6 +2381,46 @@ export const getObservedProcessOutput = (options) => (options.client ?? client).
|
|
|
2381
2381
|
url: '/sandbox/v1/sandboxes/{sandboxID}/processes/{processID}/output',
|
|
2382
2382
|
...options
|
|
2383
2383
|
});
|
|
2384
|
+
/**
|
|
2385
|
+
* Start a task whose output is pushed off the machine while it runs
|
|
2386
|
+
*
|
|
2387
|
+
* Run a long command whose output you will read back afterwards, including after the sandbox is deleted, instead of holding one connection open. Use this for builds, test runs and batch jobs; use commands.run for a short command whose output you want inline. The machine's resident daemon pushes the task's stdout/stderr to Praxis storage as it is produced, so the log survives the sandbox (seven days) and can be read in ranges with sandboxes.tasks.log; no vendor exec channel is involved. The command and the shipping credential travel to the daemon in its process environment, never in argv, so neither appears in the machine's process list. Only a full sandbox whose daemon advertises log-ship can run a task; any other machine returns PROVIDER_UNSUPPORTED with the reason. Returns 201 with the task id; starting is not waiting — poll the log to follow the task, and the final marker's exitCode for how it ended.
|
|
2388
|
+
*/
|
|
2389
|
+
export const startSandboxTask = (options) => (options.client ?? client).post({
|
|
2390
|
+
security: [{
|
|
2391
|
+
key: 'BearerAuth',
|
|
2392
|
+
scheme: 'bearer',
|
|
2393
|
+
type: 'http'
|
|
2394
|
+
}, {
|
|
2395
|
+
key: 'ApiKeyAuth',
|
|
2396
|
+
name: 'X-API-Key',
|
|
2397
|
+
type: 'apiKey'
|
|
2398
|
+
}],
|
|
2399
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/tasks',
|
|
2400
|
+
...options,
|
|
2401
|
+
headers: {
|
|
2402
|
+
'Content-Type': 'application/json',
|
|
2403
|
+
...options.headers
|
|
2404
|
+
}
|
|
2405
|
+
});
|
|
2406
|
+
/**
|
|
2407
|
+
* Read a range of a task's pushed output
|
|
2408
|
+
*
|
|
2409
|
+
* Follow a task started with sandboxes.tasks.start, or read it long after its sandbox is gone. This reads Praxis storage and never the machine, so the answer is the same whether the sandbox is running, paused or deleted; the log is kept for seven days. Read in ranges: pass the previous answer's nextOffset as offset to continue, and stop when done is true. done means the final marker exists and the whole stream has been read, and only then do exitCode and size carry the task's outcome. text is UTF-8 decoded by bytes and backs up to a whole character when a cut would split one, so a page never ends mid-character; size, offset and nextOffset all count bytes. Ownership comes from the sandbox's index row while it exists and from the record written when the task started once it does not, so a sandbox id you own keeps answering after the sandbox is deleted. A task that was never started, or one belonging to another organization, returns NOT_FOUND.
|
|
2410
|
+
*/
|
|
2411
|
+
export const getSandboxTaskLog = (options) => (options.client ?? client).get({
|
|
2412
|
+
security: [{
|
|
2413
|
+
key: 'BearerAuth',
|
|
2414
|
+
scheme: 'bearer',
|
|
2415
|
+
type: 'http'
|
|
2416
|
+
}, {
|
|
2417
|
+
key: 'ApiKeyAuth',
|
|
2418
|
+
name: 'X-API-Key',
|
|
2419
|
+
type: 'apiKey'
|
|
2420
|
+
}],
|
|
2421
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/tasks/{taskID}/log',
|
|
2422
|
+
...options
|
|
2423
|
+
});
|
|
2384
2424
|
/**
|
|
2385
2425
|
* Kill sandbox
|
|
2386
2426
|
*
|
|
@@ -7601,6 +7641,24 @@ export const devopsProjectsGet = (options) => (options.client ?? client).get({
|
|
|
7601
7641
|
url: '/devops/v1/projects/{id}',
|
|
7602
7642
|
...options
|
|
7603
7643
|
});
|
|
7644
|
+
/**
|
|
7645
|
+
* Update a project
|
|
7646
|
+
*
|
|
7647
|
+
* Change a project's name, description, labels or delivery settings. Send the new values inside project and name the fields to write in updateMask (name, description, labels, settings); a field not named is left alone, and a mask naming a field this operation cannot change is refused. settings is merged into the current settings rather than replacing them, so a body naming one setting leaves the others as they were. settings.executor decides who publishes the project: absent or mise reads as the Mise pipeline, and devops means that, once the merge is done, the DevOps pipeline releases it. Changing executor changes which pipeline the next release uses, not what already ran. A new name must be kebab-case and unused in the organization, otherwise PROJECT_NAME_TAKEN. Read the project first to know what you are leaving unchanged.
|
|
7648
|
+
*/
|
|
7649
|
+
export const devopsProjectsUpdate = (options) => (options.client ?? client).patch({
|
|
7650
|
+
security: [{
|
|
7651
|
+
key: 'devops-bearerAuth',
|
|
7652
|
+
scheme: 'bearer',
|
|
7653
|
+
type: 'http'
|
|
7654
|
+
}],
|
|
7655
|
+
url: '/devops/v1/projects/{id}',
|
|
7656
|
+
...options,
|
|
7657
|
+
headers: {
|
|
7658
|
+
'Content-Type': 'application/json',
|
|
7659
|
+
...options.headers
|
|
7660
|
+
}
|
|
7661
|
+
});
|
|
7604
7662
|
/**
|
|
7605
7663
|
* List releases
|
|
7606
7664
|
*
|
|
@@ -7821,6 +7879,24 @@ export const devopsEnvironmentsList = (options) => (options.client ?? client).ge
|
|
|
7821
7879
|
url: '/devops/v1/projects/{project}/environments',
|
|
7822
7880
|
...options
|
|
7823
7881
|
});
|
|
7882
|
+
/**
|
|
7883
|
+
* Update an environment
|
|
7884
|
+
*
|
|
7885
|
+
* Change an environment's name, position, approval requirement, observation time, blocking behaviour or domain suffix. Send the new values inside environment and name the fields to write in updateMask (name, order, requireApproval, observeMinutes, blocksLater, domainSuffix); a field not named is left alone. requireApproval true makes every later promotion into this environment stop in awaiting_approval until promotions.approve lets it proceed; promotions already running are not stopped. order moves the environment within the promotion sequence and renumbers its neighbours, and a value that would break the 1..n sequence is refused with ENVIRONMENT_ORDER_INVALID. Read the environment list first to know what you are leaving unchanged.
|
|
7886
|
+
*/
|
|
7887
|
+
export const devopsEnvironmentsUpdate = (options) => (options.client ?? client).patch({
|
|
7888
|
+
security: [{
|
|
7889
|
+
key: 'devops-bearerAuth',
|
|
7890
|
+
scheme: 'bearer',
|
|
7891
|
+
type: 'http'
|
|
7892
|
+
}],
|
|
7893
|
+
url: '/devops/v1/environments/{id}',
|
|
7894
|
+
...options,
|
|
7895
|
+
headers: {
|
|
7896
|
+
'Content-Type': 'application/json',
|
|
7897
|
+
...options.headers
|
|
7898
|
+
}
|
|
7899
|
+
});
|
|
7824
7900
|
/**
|
|
7825
7901
|
* List environment checkpoints
|
|
7826
7902
|
*
|
|
@@ -8145,6 +8221,88 @@ export const devopsTofuStateLock = (options) => (options.client ?? client).post(
|
|
|
8145
8221
|
...options.headers
|
|
8146
8222
|
}
|
|
8147
8223
|
});
|
|
8224
|
+
/**
|
|
8225
|
+
* List changes
|
|
8226
|
+
*
|
|
8227
|
+
* List the project's changes, newest first, each with its derived stage and one cell per environment. Use it to see what is in flight before opening another change, or to find the id (the branch name) of a change you want to read. filter narrows the list: stage is derived from the facts, so it is applied after derivation, while type, owner and ended narrow on stored columns. Leaving a filter field out, or sending an empty array, does not narrow that field. ended=true lists changes that are done or abandoned, ended=false lists the rest. totalSize is answered on the first page only and counts what the filter leaves.
|
|
8228
|
+
*/
|
|
8229
|
+
export const devopsChangesList = (options) => (options.client ?? client).get({
|
|
8230
|
+
security: [{
|
|
8231
|
+
key: 'devops-bearerAuth',
|
|
8232
|
+
scheme: 'bearer',
|
|
8233
|
+
type: 'http'
|
|
8234
|
+
}],
|
|
8235
|
+
url: '/devops/v1/projects/{project}/changes',
|
|
8236
|
+
...options
|
|
8237
|
+
});
|
|
8238
|
+
/**
|
|
8239
|
+
* Create a change
|
|
8240
|
+
*
|
|
8241
|
+
* Open a change: the unit that carries one piece of work from a branch to production. A change has no separate id — its id is its branch name, <type>/<slug> (for example feat/run-page-v2), and the branch is cut from main as part of this call. type says what the work is and slug names it; both together are the id, so the same pair sent again answers the change the first call made instead of creating a second. A change with a flag also creates a release flag whose key is the slug, off in every environment, so opening one changes no runtime behaviour; withFlag defaults to true for feat and false for every other type, and you may override it either way. Requesting a change opens it at once — there is no approval step — and the caller becomes its owner. A slug already used by another type in the project is refused with CHANGE_SLUG_TAKEN because both would need the same branch name. The stage in the answer is derived from facts such as pull requests and promotions; it is never something you set.
|
|
8242
|
+
*/
|
|
8243
|
+
export const devopsChangesCreate = (options) => (options.client ?? client).post({
|
|
8244
|
+
security: [{
|
|
8245
|
+
key: 'devops-bearerAuth',
|
|
8246
|
+
scheme: 'bearer',
|
|
8247
|
+
type: 'http'
|
|
8248
|
+
}],
|
|
8249
|
+
url: '/devops/v1/projects/{project}/changes',
|
|
8250
|
+
...options,
|
|
8251
|
+
headers: {
|
|
8252
|
+
'Content-Type': 'application/json',
|
|
8253
|
+
...options.headers
|
|
8254
|
+
}
|
|
8255
|
+
});
|
|
8256
|
+
/**
|
|
8257
|
+
* Retrieve a change
|
|
8258
|
+
*
|
|
8259
|
+
* Read one change in full: its derived stage, its pull requests (one per slice, oldest first), its flag, its workspace, and one cell per environment showing the version it rode and how far its flag has been rolled out there. The id is the branch name and contains a slash, so it must be percent-encoded in the path: feat/run-page-v2 is sent as feat%2Frun-page-v2. The stage is derived, not stored — with several pull requests it shows the slice that is furthest behind, so a change already in production that opens a new slice goes back to reviewing. When suspectedIn is set, the latest verification in that environment failed and this change is listed among the suspects until a later verification succeeds.
|
|
8260
|
+
*/
|
|
8261
|
+
export const devopsChangesGet = (options) => (options.client ?? client).get({
|
|
8262
|
+
security: [{
|
|
8263
|
+
key: 'devops-bearerAuth',
|
|
8264
|
+
scheme: 'bearer',
|
|
8265
|
+
type: 'http'
|
|
8266
|
+
}],
|
|
8267
|
+
url: '/devops/v1/changes/{id}',
|
|
8268
|
+
...options
|
|
8269
|
+
});
|
|
8270
|
+
/**
|
|
8271
|
+
* Abandon a change
|
|
8272
|
+
*
|
|
8273
|
+
* Stop a change for good: it no longer moves forward and its stage becomes abandoned. reason is required and is kept with the change. Pull requests that were already merged are not undone — the system cleans them up, or a new change reverts them — so abandoning is a statement about the change, not a rollback of code. The id is the branch name and its slash must be percent-encoded in the path (feat%2Frun-page-v2). A change that is already abandoned is refused with INVALID_ARGUMENT, which is how a caller tells an earlier abandon apart from a call that had no effect.
|
|
8274
|
+
*/
|
|
8275
|
+
export const devopsChangesAbandon = (options) => (options.client ?? client).post({
|
|
8276
|
+
security: [{
|
|
8277
|
+
key: 'devops-bearerAuth',
|
|
8278
|
+
scheme: 'bearer',
|
|
8279
|
+
type: 'http'
|
|
8280
|
+
}],
|
|
8281
|
+
url: '/devops/v1/changes/{id}:abandon',
|
|
8282
|
+
...options,
|
|
8283
|
+
headers: {
|
|
8284
|
+
'Content-Type': 'application/json',
|
|
8285
|
+
...options.headers
|
|
8286
|
+
}
|
|
8287
|
+
});
|
|
8288
|
+
/**
|
|
8289
|
+
* Mark the last slice
|
|
8290
|
+
*
|
|
8291
|
+
* Say whether the pull request being merged is the last slice of the change. A change defaults to yes; until it is marked as the last slice it cannot reach rolling out or done, because rolling out a container that may still grow would roll out the wrong thing. Send lastSlice=false before merging a pull request when more slices will follow, and true again on the final one. The id is the branch name and its slash must be percent-encoded in the path (feat%2Frun-page-v2).
|
|
8292
|
+
*/
|
|
8293
|
+
export const devopsChangesMarkLastSlice = (options) => (options.client ?? client).post({
|
|
8294
|
+
security: [{
|
|
8295
|
+
key: 'devops-bearerAuth',
|
|
8296
|
+
scheme: 'bearer',
|
|
8297
|
+
type: 'http'
|
|
8298
|
+
}],
|
|
8299
|
+
url: '/devops/v1/changes/{id}:markLastSlice',
|
|
8300
|
+
...options,
|
|
8301
|
+
headers: {
|
|
8302
|
+
'Content-Type': 'application/json',
|
|
8303
|
+
...options.headers
|
|
8304
|
+
}
|
|
8305
|
+
});
|
|
8148
8306
|
/**
|
|
8149
8307
|
* List knowledge bases
|
|
8150
8308
|
*
|
|
@@ -8960,7 +9118,7 @@ export const mediaGetAssetLineage = (options) => (options.client ?? client).get(
|
|
|
8960
9118
|
/**
|
|
8961
9119
|
* Generate image
|
|
8962
9120
|
*
|
|
8963
|
-
* Generate one or more images from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. The request body is the image request itself: prompt is required, and n, size, background, output_format, output, references, seed, model, asset_folder and understanding are optional. Set output to sticker for a cut-out with a transparent background. references attach existing assets with a role — edit_target, style, structure or subject — and a model that cannot honour a role returns REFERENCE_TYPE_MISMATCH. Aspect ratio is not accepted for images; name size instead. Generation is billed by the model usage it consumes, at the same prices as the model API, and the job
|
|
9121
|
+
* Generate one or more images from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. The request body is the image request itself: prompt is required, and n, size, background, output_format, output, references, seed, model, asset_folder and understanding are optional. Set output to sticker for a cut-out with a transparent background. references attach existing assets with a role — edit_target, style, structure or subject — and a model that cannot honour a role returns REFERENCE_TYPE_MISMATCH. Aspect ratio is not accepted for images; name size instead. Generation is billed by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals, final once the job is completed or failed) and each produced asset carries its own part in provenance.cost; nothing is charged for a request refused before it starts. When the job is done, tell the person the usage amount and give them each output’s viewer_url, which opens the asset in the Console. The response is 202 with a queued Job whose type is image and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/images/generations with {"prompt":"A red kite above a calm sea at sunrise","n":1,"output":"sticker"}.
|
|
8964
9122
|
*/
|
|
8965
9123
|
export const mediaGenerateImage = (options) => (options.client ?? client).post({
|
|
8966
9124
|
security: [{
|
|
@@ -8978,7 +9136,7 @@ export const mediaGenerateImage = (options) => (options.client ?? client).post({
|
|
|
8978
9136
|
/**
|
|
8979
9137
|
* Generate video
|
|
8980
9138
|
*
|
|
8981
|
-
* Generate one or more videos from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. mode says what the video is anchored to: text needs only a prompt, image animates the existing image named by first_frame, and first_last interpolates between first_frame and last_frame. The frames must be image or sticker assets of the same library; a fetchable URL for each is sent to the model and recorded in the produced asset’s provenance. mode reference and output gif are refused with OPERATION_NOT_SUPPORTED in this release, and negative_prompt, references and an unknown mode are refused before anything is charged. Every output lands in the library as a video asset as soon as it is ready — there is no candidate state and nothing expires, so outputs.save is not part of this lane. Generation is billed per second by the model usage it consumes, at the same prices as the model API, and the job
|
|
9139
|
+
* Generate one or more videos from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. mode says what the video is anchored to: text needs only a prompt, image animates the existing image named by first_frame, and first_last interpolates between first_frame and last_frame. The frames must be image or sticker assets of the same library; a fetchable URL for each is sent to the model and recorded in the produced asset’s provenance. mode reference and output gif are refused with OPERATION_NOT_SUPPORTED in this release, and negative_prompt, references and an unknown mode are refused before anything is charged. Every output lands in the library as a video asset as soon as it is ready — there is no candidate state and nothing expires, so outputs.save is not part of this lane. Generation is billed per second by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals) and each produced asset carries its own part in provenance.cost; a refused request costs nothing. When the job is done, tell the person the usage amount and give them each output’s viewer_url. The response is 202 with a queued Job whose type is video and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/videos/generations with {"prompt":"A red kite above a calm sea at sunrise","mode":"text","n":1}.
|
|
8982
9140
|
*/
|
|
8983
9141
|
export const mediaGenerateVideo = (options) => (options.client ?? client).post({
|
|
8984
9142
|
security: [{
|
|
@@ -8996,7 +9154,7 @@ export const mediaGenerateVideo = (options) => (options.client ?? client).post({
|
|
|
8996
9154
|
/**
|
|
8997
9155
|
* Edit asset
|
|
8998
9156
|
*
|
|
8999
|
-
* Edit an existing asset and store the result as a new asset. Use library_id from creation or listing and asset_id from asset creation or listing; library_id also accepts the literal default, which resolves to the organization’s default library before the credential check. The source asset is never overwritten: the new asset hangs under it in the edit chain, records it in derived_from, and reads back with assets.lineage, so earlier steps stay reachable. The body is operation plus the optional model, asset_folder, understanding and idempotency_key; operation.type selects the edit and carries that operation’s own fields. This release performs variations, inpaint, erase, replace_object, recolor, remove_background and replace_background on images; every other type in the operation vocabulary — the video and audio edits — is refused with OPERATION_NOT_SUPPORTED. inpaint takes mask, a PNG File identifier beginning with file- whose transparent area marks the region to replace, plus the prompt describing what belongs there. Aspects beyond the source asset’s material type return REFERENCE_TYPE_MISMATCH. Editing is billed by the model usage it consumes, at the same prices as the model API, and the job
|
|
9157
|
+
* Edit an existing asset and store the result as a new asset. Use library_id from creation or listing and asset_id from asset creation or listing; library_id also accepts the literal default, which resolves to the organization’s default library before the credential check. The source asset is never overwritten: the new asset hangs under it in the edit chain, records it in derived_from, and reads back with assets.lineage, so earlier steps stay reachable. The body is operation plus the optional model, asset_folder, understanding and idempotency_key; operation.type selects the edit and carries that operation’s own fields. This release performs variations, inpaint, erase, replace_object, recolor, remove_background and replace_background on images; every other type in the operation vocabulary — the video and audio edits — is refused with OPERATION_NOT_SUPPORTED. inpaint takes mask, a PNG File identifier beginning with file- whose transparent area marks the region to replace, plus the prompt describing what belongs there. Aspects beyond the source asset’s material type return REFERENCE_TYPE_MISMATCH. Editing is billed by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals) and the new asset carries it in provenance.cost; when the job is done, tell the person the usage amount and give them the output’s viewer_url. The response is 202 with a queued Job whose type is image, whose operation is the edit applied, and whose source_asset_id is the asset edited; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until it is completed or failed, then read the produced asset. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/edits with {"operation":{"type":"variations","strength":"subtle"}}.
|
|
9000
9158
|
*/
|
|
9001
9159
|
export const mediaEditAsset = (options) => (options.client ?? client).post({
|
|
9002
9160
|
security: [{
|
|
@@ -9014,7 +9172,7 @@ export const mediaEditAsset = (options) => (options.client ?? client).post({
|
|
|
9014
9172
|
/**
|
|
9015
9173
|
* Create speech
|
|
9016
9174
|
*
|
|
9017
|
-
* Synthesise speech from text and store the recording straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still synthesise. input is the text to speak. voice is optional and may be omitted, in which case the model’s default voice is used; when it is given it must be one of the voices of the model being used — read them from the types.speech list of GET /media/v1/generation/capabilities, which gives each voice an id, a name, a gender, a language and a style, or pass a voice material id of this same library — and a voice that is neither is refused with INVALID_PARAMS in the voice field before any job exists, so a wrong name is free to try but reading the capabilities first is free without trying. Do not use OpenAI voice names such as alloy or aura: they are not valid here. speed is passed to the provider unchanged, and instructions and language are refused with OPERATION_NOT_SUPPORTED in this release. Cloning a voice from recordings is not available yet. The provider caps one request at a short stretch of text, so a long input is cut into segments at paragraph and sentence boundaries and synthesised in order, then joined into the single recording the library receives: nothing is spoken twice and nothing is dropped. Because the segments are joined byte for byte, a multi-segment input accepts only response_format mp3 (the default) or pcm; opus is available for a single-segment input. A speech job has one result however many segments it took. Synthesis is billed by the model usage it consumes, at the same prices as the model API, and the job
|
|
9175
|
+
* Synthesise speech from text and store the recording straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still synthesise. input is the text to speak. voice is optional and may be omitted, in which case the model’s default voice is used; when it is given it must be one of the voices of the model being used — read them from the types.speech list of GET /media/v1/generation/capabilities, which gives each voice an id, a name, a gender, a language and a style, or pass a voice material id of this same library — and a voice that is neither is refused with INVALID_PARAMS in the voice field before any job exists, so a wrong name is free to try but reading the capabilities first is free without trying. Do not use OpenAI voice names such as alloy or aura: they are not valid here. speed is passed to the provider unchanged, and instructions and language are refused with OPERATION_NOT_SUPPORTED in this release. Cloning a voice from recordings is not available yet. The provider caps one request at a short stretch of text, so a long input is cut into segments at paragraph and sentence boundaries and synthesised in order, then joined into the single recording the library receives: nothing is spoken twice and nothing is dropped. Because the segments are joined byte for byte, a multi-segment input accepts only response_format mp3 (the default) or pcm; opus is available for a single-segment input. A speech job has one result however many segments it took. Synthesis is billed by the model usage it consumes, at the same prices as the model API, and the job reports the charge in usage (US dollars, six decimals, the sum over every segment) and the recording carries it in provenance.cost; a request refused before it starts costs nothing. When the job is done, tell the person the usage amount and give them the output’s viewer_url. The response is 202 with a queued Job whose type is speech and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced asset from the library — the recording carries material_type audio, audio_role voice, ai_generated true, and provenance naming this job, the text spoken and the model. Send Idempotency-Key, or idempotency_key in the body, to retry without synthesising and charging twice. Example: POST /media/v1/libraries/default/audio/speech with {"input":"A red kite above a calm sea at sunrise."}, or with {"input":"A red kite above a calm sea at sunrise.","voice":"zh_female_wenroumama_uranus_bigtts"} for a gentle female voice.
|
|
9018
9176
|
*/
|
|
9019
9177
|
export const mediaCreateSpeech = (options) => (options.client ?? client).post({
|
|
9020
9178
|
security: [{
|
|
@@ -9060,7 +9218,7 @@ export const mediaListUnderstandingsByLibrary = (options) => (options.client ??
|
|
|
9060
9218
|
/**
|
|
9061
9219
|
* List jobs
|
|
9062
9220
|
*
|
|
9063
|
-
* List batch and generation jobs in a library. Filter by status and continue with next_cursor. Poll a generation Job until terminal; every produced output is already a library asset.
|
|
9221
|
+
* List batch and generation jobs in a library. Filter by status or by pipeline_run_id (the jobs one automation run started) and continue with next_cursor. Poll a generation Job until terminal; every produced output is already a library asset.
|
|
9064
9222
|
*/
|
|
9065
9223
|
export const mediaListJobs = (options) => (options.client ?? client).get({
|
|
9066
9224
|
security: [{
|
|
@@ -9074,7 +9232,7 @@ export const mediaListJobs = (options) => (options.client ?? client).get({
|
|
|
9074
9232
|
/**
|
|
9075
9233
|
* Cancel job
|
|
9076
9234
|
*
|
|
9077
|
-
* Cancel a queued or running generation job. Outputs already produced remain in the library; poll or read the returned Job to confirm its status.
|
|
9235
|
+
* Cancel a queued or running generation job. Outputs already produced remain in the library; poll or read the returned Job to confirm its status. A video cannot be cancelled once the provider has started generating it: the call answers 409 JOB_INVALID_STATE (details VIDEO_ALREADY_RUNNING), and the task still finishes, is saved to the library and is charged.
|
|
9078
9236
|
*/
|
|
9079
9237
|
export const mediaCancelJob = (options) => (options.client ?? client).post({
|
|
9080
9238
|
security: [{
|
|
@@ -9088,7 +9246,7 @@ export const mediaCancelJob = (options) => (options.client ?? client).post({
|
|
|
9088
9246
|
/**
|
|
9089
9247
|
* Get generation capabilities
|
|
9090
9248
|
*
|
|
9091
|
-
* Read what Praxis offers for each kind of generation — image, video and speech — before asking for one, and read a speech model’s voices here before naming one. Every type answers the models available for it, the model it uses when a request names none, and what each model costs per unit; a speech model the platform publishes voices for also carries default_voice and voices there, each voice with an id, a name, a gender, a language and a style — so a request for "a gentle female voice" is answered by matching the style and gender rather than by guessing an identifier. Pass a voice id back verbatim as voice, or omit voice to take default_voice; a voice that is neither one of those nor a voice material of the library is refused with INVALID_PARAMS before any job is created. OpenAI voice names such as alloy and aura are not valid here. The video fields beside the types keep their original meaning (intents, default model, duration and aspect-ratio limits, per-library concurrency). The models come from the platform model catalogue, and an id listed here is accepted verbatim as the model field of that type’s generation request. price.amount is a decimal string with its currency; video models that charge by resolution also carry price.by_resolution, whose amount is then the cheapest tier. A model the catalogue cannot route right now is still listed, with available false, so a caller can show it as temporarily unavailable instead of hiding it. When the catalogue cannot be read the endpoint still answers: every type comes back with an empty models list and its real default_model, and the voices a speech model carries are absent rather than empty, because the voices come from the platform and not from the catalogue. Generation is charged per unit and every output is stored in the library.
|
|
9249
|
+
* Read what Praxis offers for each kind of generation — image, video and speech — before asking for one, and read a speech model’s voices here before naming one. Every type answers the models available for it, the model it uses when a request names none, and what each model costs per unit; a speech model the platform publishes voices for also carries default_voice and voices there, each voice with an id, a name, a gender, a language and a style — so a request for "a gentle female voice" is answered by matching the style and gender rather than by guessing an identifier. Pass a voice id back verbatim as voice, or omit voice to take default_voice; a voice that is neither one of those nor a voice material of the library is refused with INVALID_PARAMS before any job is created. OpenAI voice names such as alloy and aura are not valid here. The video fields beside the types keep their original meaning (intents, default model, duration and aspect-ratio limits, per-library concurrency). The models come from the platform model catalogue, and an id listed here is accepted verbatim as the model field of that type’s generation request. A video model additionally carries the modes it can be driven in and the durations, aspect ratios and resolutions the catalogue has registered for it — modes, duration_seconds, aspect_ratios and resolutions — so read them before requesting video and choose a mode and a value this model lists; an empty list means the platform has not registered that option yet, and then omit the field rather than assume a value. price.amount is a decimal string with its currency; video models that charge by resolution also carry price.by_resolution, whose amount is then the cheapest tier. A model the catalogue cannot route right now is still listed, with available false, so a caller can show it as temporarily unavailable instead of hiding it. When the catalogue cannot be read the endpoint still answers: every type comes back with an empty models list and its real default_model, and the voices a speech model carries are absent rather than empty, because the voices come from the platform and not from the catalogue. Generation is charged per unit and every output is stored in the library.
|
|
9092
9250
|
*/
|
|
9093
9251
|
export const mediaGetGenerationCapabilities = (options) => (options?.client ?? client).get({
|
|
9094
9252
|
security: [{
|
|
@@ -10554,7 +10712,7 @@ export const studioWorksList = (options) => (options?.client ?? client).get({
|
|
|
10554
10712
|
/**
|
|
10555
10713
|
* Create a work with its goal
|
|
10556
10714
|
*
|
|
10557
|
-
* Create a work: one deliverable piece plus everything around it. Pass the goal the writing serves
|
|
10715
|
+
* Create a work: one deliverable piece plus everything around it. Pass the goal the writing serves: the reader, what that reader should get or do, and the one-sentence message. The work holds the goal only; the requirement for one piece (the person's text, its points, a length, banned wording) belongs to that draft and is given with the drafts create call, so a novel's plot points and length never bind the promotion derived from it. A slug is derived from the title unless you pass one. The work starts with no drafts; create the first one with the drafts create call, because the genre decides the structure. A reference library belongs to the work and is created with it, so the setting written later stays this work's own; pass based_on to start from another work and have its setting and styles copied in as your own.
|
|
10558
10716
|
*/
|
|
10559
10717
|
export const studioWorksCreate = (options) => (options.client ?? client).post({
|
|
10560
10718
|
security: [{
|
|
@@ -10631,28 +10789,6 @@ export const studioWorksUpdate = (options) => (options.client ?? client).patch({
|
|
|
10631
10789
|
...options.headers
|
|
10632
10790
|
}
|
|
10633
10791
|
});
|
|
10634
|
-
/**
|
|
10635
|
-
* Add to or correct the original brief
|
|
10636
|
-
*
|
|
10637
|
-
* Extend the original brief: append text, attach files, add points taken from an outline, edit one point, or drop a point. Points are how the software checks that every requirement landed in a written unit, so split the person's outline into points here rather than burying them in prose. The brief carries its own revision, separate from the work and from each draft.
|
|
10638
|
-
*/
|
|
10639
|
-
export const studioWorksUpdateBrief = (options) => (options.client ?? client).patch({
|
|
10640
|
-
security: [{
|
|
10641
|
-
key: 'BearerAuth',
|
|
10642
|
-
scheme: 'bearer',
|
|
10643
|
-
type: 'http'
|
|
10644
|
-
}, {
|
|
10645
|
-
key: 'ApiKeyAuth',
|
|
10646
|
-
name: 'X-API-Key',
|
|
10647
|
-
type: 'apiKey'
|
|
10648
|
-
}],
|
|
10649
|
-
url: '/studio/v1/works/{work}/brief',
|
|
10650
|
-
...options,
|
|
10651
|
-
headers: {
|
|
10652
|
-
'Content-Type': 'application/json',
|
|
10653
|
-
...options.headers
|
|
10654
|
-
}
|
|
10655
|
-
});
|
|
10656
10792
|
/**
|
|
10657
10793
|
* List the drafts a work carries
|
|
10658
10794
|
*
|
|
@@ -10733,6 +10869,28 @@ export const studioDraftsUpdate = (options) => (options.client ?? client).patch(
|
|
|
10733
10869
|
...options.headers
|
|
10734
10870
|
}
|
|
10735
10871
|
});
|
|
10872
|
+
/**
|
|
10873
|
+
* Add to or correct a draft's brief
|
|
10874
|
+
*
|
|
10875
|
+
* Extend the brief of one draft: append text, attach files, replace its constraints, add points taken from an outline, edit one point, or drop a point. The brief belongs to the draft, not the work: the length and plot points of a novel do not bind the promotion derived from it. Points are how the software checks that every requirement landed in a written unit, so split the person's outline into points here rather than burying them in prose; the constraints (a length such as 3000 字以内, banned wording) are what the length check and the context pack read. The brief carries its own revision, separate from the draft's.
|
|
10876
|
+
*/
|
|
10877
|
+
export const studioDraftsUpdateBrief = (options) => (options.client ?? client).patch({
|
|
10878
|
+
security: [{
|
|
10879
|
+
key: 'BearerAuth',
|
|
10880
|
+
scheme: 'bearer',
|
|
10881
|
+
type: 'http'
|
|
10882
|
+
}, {
|
|
10883
|
+
key: 'ApiKeyAuth',
|
|
10884
|
+
name: 'X-API-Key',
|
|
10885
|
+
type: 'apiKey'
|
|
10886
|
+
}],
|
|
10887
|
+
url: '/studio/v1/works/{work}/drafts/{draft}/brief',
|
|
10888
|
+
...options,
|
|
10889
|
+
headers: {
|
|
10890
|
+
'Content-Type': 'application/json',
|
|
10891
|
+
...options.headers
|
|
10892
|
+
}
|
|
10893
|
+
});
|
|
10736
10894
|
/**
|
|
10737
10895
|
* Read the whole unit outline as Markdown
|
|
10738
10896
|
*
|
|
@@ -10751,6 +10909,122 @@ export const studioDraftsOutline = (options) => (options.client ?? client).get({
|
|
|
10751
10909
|
url: '/studio/v1/works/{work}/drafts/{draft}/outline',
|
|
10752
10910
|
...options
|
|
10753
10911
|
});
|
|
10912
|
+
/**
|
|
10913
|
+
* List the foreshadows of a draft
|
|
10914
|
+
*
|
|
10915
|
+
* List the threads this draft sets up and pays off: each foreshadow names the unit that plants it, the unit that pays it off (or null while it is still open) and a note on what was planted. The foreshadow_paid check reports every open one in the draft's status and review, so a mystery or serial that plants a clue in chapter 2 is reminded until a later chapter answers it.
|
|
10916
|
+
*/
|
|
10917
|
+
export const studioForeshadowsList = (options) => (options.client ?? client).get({
|
|
10918
|
+
security: [{
|
|
10919
|
+
key: 'BearerAuth',
|
|
10920
|
+
scheme: 'bearer',
|
|
10921
|
+
type: 'http'
|
|
10922
|
+
}, {
|
|
10923
|
+
key: 'ApiKeyAuth',
|
|
10924
|
+
name: 'X-API-Key',
|
|
10925
|
+
type: 'apiKey'
|
|
10926
|
+
}],
|
|
10927
|
+
url: '/studio/v1/works/{work}/drafts/{draft}/foreshadows',
|
|
10928
|
+
...options
|
|
10929
|
+
});
|
|
10930
|
+
/**
|
|
10931
|
+
* Drop a foreshadow
|
|
10932
|
+
*
|
|
10933
|
+
* Remove a thread that is no longer in the story. Deleting a key that does not exist answers the same as deleting one that did.
|
|
10934
|
+
*/
|
|
10935
|
+
export const studioForeshadowsDelete = (options) => (options.client ?? client).delete({
|
|
10936
|
+
security: [{
|
|
10937
|
+
key: 'BearerAuth',
|
|
10938
|
+
scheme: 'bearer',
|
|
10939
|
+
type: 'http'
|
|
10940
|
+
}, {
|
|
10941
|
+
key: 'ApiKeyAuth',
|
|
10942
|
+
name: 'X-API-Key',
|
|
10943
|
+
type: 'apiKey'
|
|
10944
|
+
}],
|
|
10945
|
+
url: '/studio/v1/works/{work}/drafts/{draft}/foreshadows/{key}',
|
|
10946
|
+
...options
|
|
10947
|
+
});
|
|
10948
|
+
/**
|
|
10949
|
+
* Plant or pay off a foreshadow
|
|
10950
|
+
*
|
|
10951
|
+
* Record a thread under a key of your choice: the unit that plants it and, once written, the unit that pays it off. Call it when you write the setup (payoff left out or null) and again with the same key when a later unit answers it. Both units must belong to this draft. An open foreshadow is reported by the foreshadow_paid check until it has a payoff, and a unit's context pack does not need to be asked for it.
|
|
10952
|
+
*/
|
|
10953
|
+
export const studioForeshadowsUpsert = (options) => (options.client ?? client).put({
|
|
10954
|
+
security: [{
|
|
10955
|
+
key: 'BearerAuth',
|
|
10956
|
+
scheme: 'bearer',
|
|
10957
|
+
type: 'http'
|
|
10958
|
+
}, {
|
|
10959
|
+
key: 'ApiKeyAuth',
|
|
10960
|
+
name: 'X-API-Key',
|
|
10961
|
+
type: 'apiKey'
|
|
10962
|
+
}],
|
|
10963
|
+
url: '/studio/v1/works/{work}/drafts/{draft}/foreshadows/{key}',
|
|
10964
|
+
...options,
|
|
10965
|
+
headers: {
|
|
10966
|
+
'Content-Type': 'application/json',
|
|
10967
|
+
...options.headers
|
|
10968
|
+
}
|
|
10969
|
+
});
|
|
10970
|
+
/**
|
|
10971
|
+
* List the setting changes of a work
|
|
10972
|
+
*
|
|
10973
|
+
* List the recorded changes, all of them or those of one entry. Use it to check what a character has been through before writing the next unit, or to find a progression to delete.
|
|
10974
|
+
*/
|
|
10975
|
+
export const studioProgressionsList = (options) => (options.client ?? client).get({
|
|
10976
|
+
security: [{
|
|
10977
|
+
key: 'BearerAuth',
|
|
10978
|
+
scheme: 'bearer',
|
|
10979
|
+
type: 'http'
|
|
10980
|
+
}, {
|
|
10981
|
+
key: 'ApiKeyAuth',
|
|
10982
|
+
name: 'X-API-Key',
|
|
10983
|
+
type: 'apiKey'
|
|
10984
|
+
}],
|
|
10985
|
+
url: '/studio/v1/works/{work}/progressions',
|
|
10986
|
+
...options
|
|
10987
|
+
});
|
|
10988
|
+
/**
|
|
10989
|
+
* Record how a setting entry changes at a unit
|
|
10990
|
+
*
|
|
10991
|
+
* Record that an entry changes as of one unit: a character is injured in chapter 6, a shop moves in chapter 9, a secret becomes known. The library keeps what an entry is from the start; a progression keeps what becomes true later. A unit's context pack shows an entry's changes up to and including that unit (截至本单元的设定变化) and withholds the later ones, so chapter 3 is not written with chapter 6's injury. Name the entry by its name, an alias or its ent_ identifier, and the unit by its number.
|
|
10992
|
+
*/
|
|
10993
|
+
export const studioProgressionsCreate = (options) => (options.client ?? client).post({
|
|
10994
|
+
security: [{
|
|
10995
|
+
key: 'BearerAuth',
|
|
10996
|
+
scheme: 'bearer',
|
|
10997
|
+
type: 'http'
|
|
10998
|
+
}, {
|
|
10999
|
+
key: 'ApiKeyAuth',
|
|
11000
|
+
name: 'X-API-Key',
|
|
11001
|
+
type: 'apiKey'
|
|
11002
|
+
}],
|
|
11003
|
+
url: '/studio/v1/works/{work}/progressions',
|
|
11004
|
+
...options,
|
|
11005
|
+
headers: {
|
|
11006
|
+
'Content-Type': 'application/json',
|
|
11007
|
+
...options.headers
|
|
11008
|
+
}
|
|
11009
|
+
});
|
|
11010
|
+
/**
|
|
11011
|
+
* Delete a setting change
|
|
11012
|
+
*
|
|
11013
|
+
* Remove one recorded change, by the prg_ identifier the list returns; to correct a change, delete it and record the new one.
|
|
11014
|
+
*/
|
|
11015
|
+
export const studioProgressionsDelete = (options) => (options.client ?? client).delete({
|
|
11016
|
+
security: [{
|
|
11017
|
+
key: 'BearerAuth',
|
|
11018
|
+
scheme: 'bearer',
|
|
11019
|
+
type: 'http'
|
|
11020
|
+
}, {
|
|
11021
|
+
key: 'ApiKeyAuth',
|
|
11022
|
+
name: 'X-API-Key',
|
|
11023
|
+
type: 'apiKey'
|
|
11024
|
+
}],
|
|
11025
|
+
url: '/studio/v1/works/{work}/progressions/{id}',
|
|
11026
|
+
...options
|
|
11027
|
+
});
|
|
10754
11028
|
/**
|
|
10755
11029
|
* Read the computed todo list of a draft
|
|
10756
11030
|
*
|