@deepraxis/sdk 0.1.1-dev.bff06da → 0.1.1-dev.c1d925b
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.
|
@@ -3514,7 +3514,7 @@ export declare const devopsChangesMarkLastSlice: <ThrowOnError extends boolean =
|
|
|
3514
3514
|
/**
|
|
3515
3515
|
* Open a change's pull request
|
|
3516
3516
|
*
|
|
3517
|
-
* Open the pull request for a change: its branch into the project's default branch, opened by DevOps's own GitHub App. A cloud workspace holds no GitHub credential, so this is how work pushed with the unit push becomes a pull request; `praxis devops change pr` calls it from the workspace. Push first: a branch with no commits beyond the default branch is refused with PULL_REQUEST_REFUSED and GitHub's words. A branch that already has an open pull request answers that one with created=false, so calling again is safe. The pull request then appears on the change and runs its merge gate as usual. The id is the branch name and its slash must be percent-encoded in the path (fix%2Fexpired-links).
|
|
3517
|
+
* Open the pull request for a change: its branch into the project's default branch, opened by DevOps's own GitHub App. A cloud workspace holds no GitHub credential, so this is how work pushed with the unit push becomes a pull request; `praxis devops change pr` calls it from the workspace. Push first: a branch with no commits beyond the default branch is refused with PULL_REQUEST_REFUSED and GitHub's words. A branch that already has an open pull request answers that one with created=false, so calling again is safe; when the call passes a title or a body, those fields are written onto that pull request (GitHub PATCH /pulls/{number}) and the answer says updated=true, while a field not passed is left as it is — which is how a wrong or missing description is corrected, and how the merge gate's exposure-declared check is re-evaluated from the new body. The pull request then appears on the change and runs its merge gate as usual. The id is the branch name and its slash must be percent-encoded in the path (fix%2Fexpired-links).
|
|
3518
3518
|
*/
|
|
3519
3519
|
export declare const devopsChangesOpenPullRequest: <ThrowOnError extends boolean = false>(options: Options<DevopsChangesOpenPullRequestData, ThrowOnError>) => RequestResult<DevopsChangesOpenPullRequestResponses, DevopsChangesOpenPullRequestErrors, ThrowOnError>;
|
|
3520
3520
|
/**
|
|
@@ -3976,7 +3976,7 @@ export declare const mediaBatchAssets: <ThrowOnError extends boolean = false>(op
|
|
|
3976
3976
|
/**
|
|
3977
3977
|
* Get job
|
|
3978
3978
|
*
|
|
3979
|
-
* Read
|
|
3979
|
+
* Read a generation, edit or batch Job; poll it after every generation or edit until status is terminal, every few seconds (an image takes seconds, a video one to three minutes). status: queued is waiting (queue_reason says why, queue_position its place in line); in_progress or running is generating; completed means every output succeeded; completed_with_errors means some did; failed means none did; canceled or cancelled means it was stopped. Read the result output by output. A succeeded entry of outputs[] has asset_id and viewer_url, because the output is already a library asset: give viewer_url to the person. Its seed is present only when the model reports one (Doubao Seedance 2.x neither takes nor reports a seed); where present, send it back as seed with an adjusted prompt to vary that take. A failed entry has its reason in the failures[] entry with the same index: code is the error to branch on, for example CONTENT_REJECTED when the model's moderation refused an input or the result (a real human face in a reference is one cause; change the prompt or the reference, because retrying unchanged fails again) or GENERATION_FAILED when the model call failed (retrying may succeed); detail_code is the model's finer reason and model_request_id the model call to trace. usage is what the job has cost so far and is final at a terminal status; failed and refused outputs are not charged, so usage counts succeeded outputs only, and it is absent when nothing was charged.
|
|
3980
3980
|
*/
|
|
3981
3981
|
export declare const mediaGetJob: <ThrowOnError extends boolean = false>(options: Options<MediaGetJobData, ThrowOnError>) => RequestResult<MediaGetJobResponses, MediaGetJobErrors, ThrowOnError>;
|
|
3982
3982
|
/**
|
|
@@ -4012,19 +4012,19 @@ export declare const mediaGetAssetLineage: <ThrowOnError extends boolean = false
|
|
|
4012
4012
|
/**
|
|
4013
4013
|
* Generate image
|
|
4014
4014
|
*
|
|
4015
|
-
* Generate
|
|
4015
|
+
* Generate images into a library from a prompt, optionally guided by existing pictures. {library_id} also accepts default, the organization’s default library. prompt is required; n (1 to 10), size, background, output_format, output, references, seed, model, asset_folder and understanding are optional. Name size, not an aspect ratio. Set output to sticker for a cut-out with a transparent background. references attach pictures of the same library with a role: subject keeps a person, product or scene consistent (several subjects put several characters in one picture), edit_target is the picture to change, style is the look to follow, structure the composition. Only a model whose modes in GET /media/v1/generation/capabilities include image takes references; any other answers INVALID_PARAMS naming the models that do, and a role a model cannot honour answers REFERENCE_TYPE_MISMATCH, both before anything is charged. A reference may be an element id (a character, product, scene or brand from the materials endpoints), which expands into its pictures and appends its description to the prompt. To draw several candidates of one key frame, send n and keep the ones you want; delete the rest. Charges are per image at the model API prices and appear in the Job’s usage; a refused or failed image costs nothing. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} for each output’s asset and viewer_url, give viewer_url to the person and tell them usage. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice.
|
|
4016
4016
|
*/
|
|
4017
4017
|
export declare const mediaGenerateImage: <ThrowOnError extends boolean = false>(options: Options<MediaGenerateImageData, ThrowOnError>) => RequestResult<MediaGenerateImageResponses, MediaGenerateImageErrors, ThrowOnError>;
|
|
4018
4018
|
/**
|
|
4019
4019
|
* Generate video
|
|
4020
4020
|
*
|
|
4021
|
-
* Generate
|
|
4021
|
+
* Generate videos into a library: from a prompt, from frames, from reference pictures or videos, or by editing an existing video. {library_id} also accepts default, the organization’s default library. mode picks the anchor: text (prompt only); image (animates first_frame); first_last (between first_frame and last_frame); reference (1 to 9 references: pictures with role subject or style keep a person, product or look consistent, and video assets with role video give the camera and motion to follow; an element id expands into its pictures and description); edit (keeps the video named by source, at least 4 s, and changes what the prompt says, such as replacing its person with a subject picture; the output is as long as the source). Frames and references are assets of the same library; in the prompt call them @video1 and @image1, @image2… in request order. Read GET /media/v1/generation/capabilities first: a model takes only the modes it lists. To draw several takes of one shot and keep the best, send n (1 to 4); 480p is the cheapest way to compare takes. Charges are per output second at the model API prices and appear in the Job’s usage; a job with an input video is metered on input plus output seconds, so it can cost more than the output length suggests; a refused or failed output costs nothing, and so does a request refused before the job starts. A real human face in a source or reference is refused by the model with CONTENT_REJECTED. Refused before any charge: output gif (OPERATION_NOT_SUPPORTED), negative_prompt, references outside reference and edit, and an unknown mode. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} for each output’s asset and viewer_url, give viewer_url to the person and tell them usage. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice.
|
|
4022
4022
|
*/
|
|
4023
4023
|
export declare const mediaGenerateVideo: <ThrowOnError extends boolean = false>(options: Options<MediaGenerateVideoData, ThrowOnError>) => RequestResult<MediaGenerateVideoResponses, MediaGenerateVideoErrors, ThrowOnError>;
|
|
4024
4024
|
/**
|
|
4025
4025
|
* Edit asset
|
|
4026
4026
|
*
|
|
4027
|
-
*
|
|
4027
|
+
* Change an existing asset and store the result as a new asset; the source is never overwritten. {library_id} also accepts default, the organization’s default library. The body is operation (its type selects the edit and carries that edit’s own fields) plus optional model, asset_folder, understanding and idempotency_key. Edits by material: on an image, variations (near copies of a take you like), inpaint (mask, a PNG File id beginning with file-, whose transparent area is replaced by what prompt describes), erase, replace_object, recolor, replace_background, remove_background and upscale; on a video, upscale, reframe, redact, trim, mute, crop, erase (removes burned-in subtitles, captions and corner watermarks, found automatically or inside the boxes given), replace_person (puts the person of an image of the same library in place of the video’s person) and remove_background; on a recording or a video’s audio, enhance_voice; and to_video, frame and resynthesize on the material each takes. Any other type answers OPERATION_NOT_SUPPORTED, and an edit that does not fit the source’s material answers REFERENCE_TYPE_MISMATCH. Video and audio edits take their model from the platform catalogue (override with operation.model); an edit whose catalogue is empty answers OPERATION_NOT_SUPPORTED, 尚未上架. remove_background on a video makes a portrait matte: output mask is a small black-and-white video to use as a Cut track mask (the choice for compositing), output alpha (the default) a transparent ProRes 4444 file of about 870 MB per 15 s of 1080p, for when the transparent file itself is the deliverable; pick model from types.matting.models of the generation capabilities. output and model on an image source answer INVALID_PARAMS. The new asset records the source in derived_from; assets.lineage reads the whole edit chain. Charges are at the model API prices (video and audio edits per second of input) and appear in the Job’s usage; repeating the same edit of the same source answers the asset already made instead of paying again. The response is 202 with a queued Job whose source_asset_id is the edited asset; poll GET /media/v1/libraries/{library_id}/jobs/{job_id}, give the output’s viewer_url to the person and tell them usage.
|
|
4028
4028
|
*/
|
|
4029
4029
|
export declare const mediaEditAsset: <ThrowOnError extends boolean = false>(options: Options<MediaEditAssetData, ThrowOnError>) => RequestResult<MediaEditAssetResponses, MediaEditAssetErrors, ThrowOnError>;
|
|
4030
4030
|
/**
|
|
@@ -4066,13 +4066,13 @@ export declare const mediaListUnderstandingsByLibrary: <ThrowOnError extends boo
|
|
|
4066
4066
|
/**
|
|
4067
4067
|
* List jobs
|
|
4068
4068
|
*
|
|
4069
|
-
* List batch and generation jobs
|
|
4069
|
+
* List the batch and generation jobs of a library, newest first, to find a job whose id you lost or to watch several takes at once. Filter by status or by pipeline_run_id (the jobs one automation run started) and continue with next_cursor. Each entry is the same Job that GET /media/v1/libraries/{library_id}/jobs/{job_id} returns, with outputs, failures and usage.
|
|
4070
4070
|
*/
|
|
4071
4071
|
export declare const mediaListJobs: <ThrowOnError extends boolean = false>(options: Options<MediaListJobsData, ThrowOnError>) => RequestResult<MediaListJobsResponses, MediaListJobsErrors, ThrowOnError>;
|
|
4072
4072
|
/**
|
|
4073
4073
|
* Cancel job
|
|
4074
4074
|
*
|
|
4075
|
-
*
|
|
4075
|
+
* Stop a generation job you no longer need, for example after the first takes of a draw show the prompt is wrong. Outputs that are queued are cancelled and never charged; outputs already produced stay in the library and stay charged. A video cannot be stopped once the provider has started generating it: the call answers 409 JOB_INVALID_STATE (details VIDEO_ALREADY_RUNNING), and that output still finishes, is saved to the library and is charged. Read the returned Job, or poll it, to see which outputs ended.
|
|
4076
4076
|
*/
|
|
4077
4077
|
export declare const mediaCancelJob: <ThrowOnError extends boolean = false>(options: Options<MediaCancelJobData, ThrowOnError>) => RequestResult<MediaCancelJobResponses, MediaCancelJobErrors, ThrowOnError>;
|
|
4078
4078
|
/**
|
|
@@ -9997,7 +9997,7 @@ export const devopsChangesMarkLastSlice = (options) => (options.client ?? client
|
|
|
9997
9997
|
/**
|
|
9998
9998
|
* Open a change's pull request
|
|
9999
9999
|
*
|
|
10000
|
-
* Open the pull request for a change: its branch into the project's default branch, opened by DevOps's own GitHub App. A cloud workspace holds no GitHub credential, so this is how work pushed with the unit push becomes a pull request; `praxis devops change pr` calls it from the workspace. Push first: a branch with no commits beyond the default branch is refused with PULL_REQUEST_REFUSED and GitHub's words. A branch that already has an open pull request answers that one with created=false, so calling again is safe. The pull request then appears on the change and runs its merge gate as usual. The id is the branch name and its slash must be percent-encoded in the path (fix%2Fexpired-links).
|
|
10000
|
+
* Open the pull request for a change: its branch into the project's default branch, opened by DevOps's own GitHub App. A cloud workspace holds no GitHub credential, so this is how work pushed with the unit push becomes a pull request; `praxis devops change pr` calls it from the workspace. Push first: a branch with no commits beyond the default branch is refused with PULL_REQUEST_REFUSED and GitHub's words. A branch that already has an open pull request answers that one with created=false, so calling again is safe; when the call passes a title or a body, those fields are written onto that pull request (GitHub PATCH /pulls/{number}) and the answer says updated=true, while a field not passed is left as it is — which is how a wrong or missing description is corrected, and how the merge gate's exposure-declared check is re-evaluated from the new body. The pull request then appears on the change and runs its merge gate as usual. The id is the branch name and its slash must be percent-encoded in the path (fix%2Fexpired-links).
|
|
10001
10001
|
*/
|
|
10002
10002
|
export const devopsChangesOpenPullRequest = (options) => (options.client ?? client).post({
|
|
10003
10003
|
security: [{
|
|
@@ -11195,7 +11195,7 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
|
11195
11195
|
/**
|
|
11196
11196
|
* Get job
|
|
11197
11197
|
*
|
|
11198
|
-
* Read
|
|
11198
|
+
* Read a generation, edit or batch Job; poll it after every generation or edit until status is terminal, every few seconds (an image takes seconds, a video one to three minutes). status: queued is waiting (queue_reason says why, queue_position its place in line); in_progress or running is generating; completed means every output succeeded; completed_with_errors means some did; failed means none did; canceled or cancelled means it was stopped. Read the result output by output. A succeeded entry of outputs[] has asset_id and viewer_url, because the output is already a library asset: give viewer_url to the person. Its seed is present only when the model reports one (Doubao Seedance 2.x neither takes nor reports a seed); where present, send it back as seed with an adjusted prompt to vary that take. A failed entry has its reason in the failures[] entry with the same index: code is the error to branch on, for example CONTENT_REJECTED when the model's moderation refused an input or the result (a real human face in a reference is one cause; change the prompt or the reference, because retrying unchanged fails again) or GENERATION_FAILED when the model call failed (retrying may succeed); detail_code is the model's finer reason and model_request_id the model call to trace. usage is what the job has cost so far and is final at a terminal status; failed and refused outputs are not charged, so usage counts succeeded outputs only, and it is absent when nothing was charged.
|
|
11199
11199
|
*/
|
|
11200
11200
|
export const mediaGetJob = (options) => (options.client ?? client).get({
|
|
11201
11201
|
security: [{
|
|
@@ -11287,7 +11287,7 @@ export const mediaGetAssetLineage = (options) => (options.client ?? client).get(
|
|
|
11287
11287
|
/**
|
|
11288
11288
|
* Generate image
|
|
11289
11289
|
*
|
|
11290
|
-
* Generate
|
|
11290
|
+
* Generate images into a library from a prompt, optionally guided by existing pictures. {library_id} also accepts default, the organization’s default library. prompt is required; n (1 to 10), size, background, output_format, output, references, seed, model, asset_folder and understanding are optional. Name size, not an aspect ratio. Set output to sticker for a cut-out with a transparent background. references attach pictures of the same library with a role: subject keeps a person, product or scene consistent (several subjects put several characters in one picture), edit_target is the picture to change, style is the look to follow, structure the composition. Only a model whose modes in GET /media/v1/generation/capabilities include image takes references; any other answers INVALID_PARAMS naming the models that do, and a role a model cannot honour answers REFERENCE_TYPE_MISMATCH, both before anything is charged. A reference may be an element id (a character, product, scene or brand from the materials endpoints), which expands into its pictures and appends its description to the prompt. To draw several candidates of one key frame, send n and keep the ones you want; delete the rest. Charges are per image at the model API prices and appear in the Job’s usage; a refused or failed image costs nothing. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} for each output’s asset and viewer_url, give viewer_url to the person and tell them usage. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice.
|
|
11291
11291
|
*/
|
|
11292
11292
|
export const mediaGenerateImage = (options) => (options.client ?? client).post({
|
|
11293
11293
|
security: [{
|
|
@@ -11305,7 +11305,7 @@ export const mediaGenerateImage = (options) => (options.client ?? client).post({
|
|
|
11305
11305
|
/**
|
|
11306
11306
|
* Generate video
|
|
11307
11307
|
*
|
|
11308
|
-
* Generate
|
|
11308
|
+
* Generate videos into a library: from a prompt, from frames, from reference pictures or videos, or by editing an existing video. {library_id} also accepts default, the organization’s default library. mode picks the anchor: text (prompt only); image (animates first_frame); first_last (between first_frame and last_frame); reference (1 to 9 references: pictures with role subject or style keep a person, product or look consistent, and video assets with role video give the camera and motion to follow; an element id expands into its pictures and description); edit (keeps the video named by source, at least 4 s, and changes what the prompt says, such as replacing its person with a subject picture; the output is as long as the source). Frames and references are assets of the same library; in the prompt call them @video1 and @image1, @image2… in request order. Read GET /media/v1/generation/capabilities first: a model takes only the modes it lists. To draw several takes of one shot and keep the best, send n (1 to 4); 480p is the cheapest way to compare takes. Charges are per output second at the model API prices and appear in the Job’s usage; a job with an input video is metered on input plus output seconds, so it can cost more than the output length suggests; a refused or failed output costs nothing, and so does a request refused before the job starts. A real human face in a source or reference is refused by the model with CONTENT_REJECTED. Refused before any charge: output gif (OPERATION_NOT_SUPPORTED), negative_prompt, references outside reference and edit, and an unknown mode. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} for each output’s asset and viewer_url, give viewer_url to the person and tell them usage. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice.
|
|
11309
11309
|
*/
|
|
11310
11310
|
export const mediaGenerateVideo = (options) => (options.client ?? client).post({
|
|
11311
11311
|
security: [{
|
|
@@ -11323,7 +11323,7 @@ export const mediaGenerateVideo = (options) => (options.client ?? client).post({
|
|
|
11323
11323
|
/**
|
|
11324
11324
|
* Edit asset
|
|
11325
11325
|
*
|
|
11326
|
-
*
|
|
11326
|
+
* Change an existing asset and store the result as a new asset; the source is never overwritten. {library_id} also accepts default, the organization’s default library. The body is operation (its type selects the edit and carries that edit’s own fields) plus optional model, asset_folder, understanding and idempotency_key. Edits by material: on an image, variations (near copies of a take you like), inpaint (mask, a PNG File id beginning with file-, whose transparent area is replaced by what prompt describes), erase, replace_object, recolor, replace_background, remove_background and upscale; on a video, upscale, reframe, redact, trim, mute, crop, erase (removes burned-in subtitles, captions and corner watermarks, found automatically or inside the boxes given), replace_person (puts the person of an image of the same library in place of the video’s person) and remove_background; on a recording or a video’s audio, enhance_voice; and to_video, frame and resynthesize on the material each takes. Any other type answers OPERATION_NOT_SUPPORTED, and an edit that does not fit the source’s material answers REFERENCE_TYPE_MISMATCH. Video and audio edits take their model from the platform catalogue (override with operation.model); an edit whose catalogue is empty answers OPERATION_NOT_SUPPORTED, 尚未上架. remove_background on a video makes a portrait matte: output mask is a small black-and-white video to use as a Cut track mask (the choice for compositing), output alpha (the default) a transparent ProRes 4444 file of about 870 MB per 15 s of 1080p, for when the transparent file itself is the deliverable; pick model from types.matting.models of the generation capabilities. output and model on an image source answer INVALID_PARAMS. The new asset records the source in derived_from; assets.lineage reads the whole edit chain. Charges are at the model API prices (video and audio edits per second of input) and appear in the Job’s usage; repeating the same edit of the same source answers the asset already made instead of paying again. The response is 202 with a queued Job whose source_asset_id is the edited asset; poll GET /media/v1/libraries/{library_id}/jobs/{job_id}, give the output’s viewer_url to the person and tell them usage.
|
|
11327
11327
|
*/
|
|
11328
11328
|
export const mediaEditAsset = (options) => (options.client ?? client).post({
|
|
11329
11329
|
security: [{
|
|
@@ -11437,7 +11437,7 @@ export const mediaListUnderstandingsByLibrary = (options) => (options.client ??
|
|
|
11437
11437
|
/**
|
|
11438
11438
|
* List jobs
|
|
11439
11439
|
*
|
|
11440
|
-
* List batch and generation jobs
|
|
11440
|
+
* List the batch and generation jobs of a library, newest first, to find a job whose id you lost or to watch several takes at once. Filter by status or by pipeline_run_id (the jobs one automation run started) and continue with next_cursor. Each entry is the same Job that GET /media/v1/libraries/{library_id}/jobs/{job_id} returns, with outputs, failures and usage.
|
|
11441
11441
|
*/
|
|
11442
11442
|
export const mediaListJobs = (options) => (options.client ?? client).get({
|
|
11443
11443
|
security: [{
|
|
@@ -11451,7 +11451,7 @@ export const mediaListJobs = (options) => (options.client ?? client).get({
|
|
|
11451
11451
|
/**
|
|
11452
11452
|
* Cancel job
|
|
11453
11453
|
*
|
|
11454
|
-
*
|
|
11454
|
+
* Stop a generation job you no longer need, for example after the first takes of a draw show the prompt is wrong. Outputs that are queued are cancelled and never charged; outputs already produced stay in the library and stay charged. A video cannot be stopped once the provider has started generating it: the call answers 409 JOB_INVALID_STATE (details VIDEO_ALREADY_RUNNING), and that output still finishes, is saved to the library and is charged. Read the returned Job, or poll it, to see which outputs ended.
|
|
11455
11455
|
*/
|
|
11456
11456
|
export const mediaCancelJob = (options) => (options.client ?? client).post({
|
|
11457
11457
|
security: [{
|
|
@@ -17635,6 +17635,10 @@ export type DevopsChangePullRequestOpened = {
|
|
|
17635
17635
|
* True when this call opened it; false when the branch already had this open pull request.
|
|
17636
17636
|
*/
|
|
17637
17637
|
created: boolean;
|
|
17638
|
+
/**
|
|
17639
|
+
* True when this call rewrote the title and/or body of the pull request that was already open; false when it opened one or left the open one unchanged.
|
|
17640
|
+
*/
|
|
17641
|
+
updated: boolean;
|
|
17638
17642
|
};
|
|
17639
17643
|
/**
|
|
17640
17644
|
* A read-only git credential for one repository, for one git request.
|
|
@@ -19691,7 +19695,7 @@ export type MediaJob = {
|
|
|
19691
19695
|
viewer_url?: string;
|
|
19692
19696
|
}>;
|
|
19693
19697
|
/**
|
|
19694
|
-
* What this job has been charged, as US dollars in a decimal string with six decimals, for example 0.042300. It is the sum of what the model calls cost, so it can be partial while the job is in_progress and is final once the status is completed or failed. Tell the person this amount.
|
|
19698
|
+
* What this job has been charged, as US dollars in a decimal string with six decimals, for example 0.042300. It is the sum of what the model calls cost, so it can be partial while the job is in_progress and is final once the status is completed or failed. Tell the person this amount. Absent when nothing was charged: every output failed, was refused, or was canceled before a paid call finished. Failed and refused outputs are never charged, so in a job where some outputs failed it counts the succeeded ones only.
|
|
19695
19699
|
*/
|
|
19696
19700
|
usage?: {
|
|
19697
19701
|
/**
|
|
@@ -19845,7 +19849,7 @@ export type MediaAssetReference = {
|
|
|
19845
19849
|
strength?: number;
|
|
19846
19850
|
};
|
|
19847
19851
|
/**
|
|
19848
|
-
* One edit to apply to the source asset. type selects the operation and the discriminating branch carries that operation’s fields. This release performs variations, inpaint, erase, replace_object, recolor and replace_background on images, remove_background on an image or a video, upscale, enhance_voice, reframe, redact, trim, mute and crop through Media’s processing lane (upscale on a picture or a video; enhance_voice on a recording or a video, whose audio is used; reframe, redact, trim, mute and crop on a video), erase on a video through the same lane, and to_video, frame and resynthesize on the material each takes; every other type here describes the operation vocabulary and is refused with OPERATION_NOT_SUPPORTED. align is not an edit — it compares two assets and has its own endpoint, POST /media/v1/libraries/{library_id}/assets/{asset_id}/align.
|
|
19852
|
+
* One edit to apply to the source asset. type selects the operation and the discriminating branch carries that operation’s fields. This release performs variations, inpaint, erase, replace_object, recolor and replace_background on images, remove_background on an image or a video, upscale, enhance_voice, reframe, redact, trim, mute and crop through Media’s processing lane (upscale on a picture or a video; enhance_voice on a recording or a video, whose audio is used; reframe, redact, trim, mute and crop on a video), erase and replace_person on a video through the same lane, and to_video, frame and resynthesize on the material each takes; every other type here describes the operation vocabulary and is refused with OPERATION_NOT_SUPPORTED. align is not an edit — it compares two assets and has its own endpoint, POST /media/v1/libraries/{library_id}/assets/{asset_id}/align.
|
|
19849
19853
|
*/
|
|
19850
19854
|
export type MediaEditOperation = {
|
|
19851
19855
|
/**
|
|
@@ -20026,6 +20030,7 @@ export type MediaEditOperation = {
|
|
|
20026
20030
|
* Asset used as the final frame of the generated video.
|
|
20027
20031
|
*/
|
|
20028
20032
|
last_frame?: MediaAssetId;
|
|
20033
|
+
source?: MediaAssetId;
|
|
20029
20034
|
/**
|
|
20030
20035
|
* Existing assets the model may use, each with the role it plays.
|
|
20031
20036
|
*/
|
|
@@ -20193,6 +20198,23 @@ export type MediaEditOperation = {
|
|
|
20193
20198
|
* Processing model that performs the edit, from the models the generation capabilities publish for the clip capability; omit it to use the first available. A request that names none when the platform has published none is refused with OPERATION_NOT_SUPPORTED.
|
|
20194
20199
|
*/
|
|
20195
20200
|
model?: string;
|
|
20201
|
+
} | {
|
|
20202
|
+
/**
|
|
20203
|
+
* Edit operation discriminator; replace_person selects the replace_person branch of this union.
|
|
20204
|
+
*/
|
|
20205
|
+
type: 'replace_person';
|
|
20206
|
+
/**
|
|
20207
|
+
* Image asset in the same library showing the person to put into the video. A video, a sticker, the source itself or an asset outside this library is refused with the field named.
|
|
20208
|
+
*/
|
|
20209
|
+
person_asset_id: MediaAssetId;
|
|
20210
|
+
/**
|
|
20211
|
+
* standard (the default: faster and cheaper) or pro (smoother and more detailed, slower and dearer).
|
|
20212
|
+
*/
|
|
20213
|
+
quality?: 'standard' | 'pro';
|
|
20214
|
+
/**
|
|
20215
|
+
* Processing model that performs the replacement, from the models the generation capabilities publish for the replace_person capability; omit it to use the first available. A request that names none when the platform has published none is refused with OPERATION_NOT_SUPPORTED.
|
|
20216
|
+
*/
|
|
20217
|
+
model?: string;
|
|
20196
20218
|
} | {
|
|
20197
20219
|
/**
|
|
20198
20220
|
* Edit operation discriminator; voice_change selects the voice_change branch of this union.
|
|
@@ -37234,7 +37256,7 @@ export type MediaLineageNode = {
|
|
|
37234
37256
|
/**
|
|
37235
37257
|
* What a reference asset contributes to the generated or edited result.
|
|
37236
37258
|
*/
|
|
37237
|
-
export type MediaRefRole = 'edit_target' | 'style' | 'structure' | 'subject';
|
|
37259
|
+
export type MediaRefRole = 'edit_target' | 'style' | 'structure' | 'subject' | 'video';
|
|
37238
37260
|
/**
|
|
37239
37261
|
* One rectangle a video erase covers, as fractions of the frame, optionally limited to a time range.
|
|
37240
37262
|
*/
|
|
@@ -44086,7 +44108,7 @@ export type MediaGenerationParameters = {
|
|
|
44086
44108
|
/**
|
|
44087
44109
|
* What the video was anchored to: text only, a first frame image, a first and last frame, or reference pictures (listed in the provenance references, with any elements they came from in elements).
|
|
44088
44110
|
*/
|
|
44089
|
-
mode: 'text' | 'image' | 'first_last' | 'reference';
|
|
44111
|
+
mode: 'text' | 'image' | 'first_last' | 'reference' | 'edit';
|
|
44090
44112
|
/**
|
|
44091
44113
|
* Requested clip length in seconds. Omitted when the request named none and the model default applied.
|
|
44092
44114
|
*/
|
|
@@ -44302,9 +44324,9 @@ export type MediaGenerationCapabilityModel = {
|
|
|
44302
44324
|
*/
|
|
44303
44325
|
voices?: Array<MediaSpeechVoice>;
|
|
44304
44326
|
/**
|
|
44305
|
-
* Video and image models: how this model can be driven. text generates from the prompt alone. For a video model, image also accepts a first frame, first_last accepts a first and a last frame,
|
|
44327
|
+
* Video and image models: how this model can be driven. text generates from the prompt alone. For a video model, image also accepts a first frame, first_last accepts a first and a last frame, reference keeps the 1 to max_reference_images pictures named in references consistent (each with its own role) and takes no frames, and edit changes an existing video (source) and also takes reference videos in mode reference: send a mode only for a model that lists it. For an image model, image means the model takes a picture as input, which an edit and reference images both need: an edit, or a generation with references, on a model without image is refused with OPERATION_NOT_SUPPORTED or INVALID_PARAMS before any job or charge, naming the models that take one. The list comes from the platform model catalogue, so a mode absent here is a mode this model does not take.
|
|
44306
44328
|
*/
|
|
44307
|
-
modes?: Array<'text' | 'image' | 'first_last' | 'reference'>;
|
|
44329
|
+
modes?: Array<'text' | 'image' | 'first_last' | 'reference' | 'edit'>;
|
|
44308
44330
|
/**
|
|
44309
44331
|
* Video models that take reference pictures only: the most reference pictures one request with mode reference may name on this model, counted after any element is expanded. Present exactly when modes includes reference, and absent on every other model — a model without this key cannot be driven in reference mode and a request naming it is refused with OPERATION_NOT_SUPPORTED before any job. A request naming more pictures than this is refused with INVALID_PARAMS; every model is also capped at the platform’s own 9, so this value is never greater than 9.
|
|
44310
44332
|
*/
|
|
@@ -64150,9 +64172,13 @@ export type ListVideosResponses = {
|
|
|
64150
64172
|
*/
|
|
64151
64173
|
usage?: {
|
|
64152
64174
|
/**
|
|
64153
|
-
* Cost of the job in USD:
|
|
64175
|
+
* Cost of the job in USD: billed seconds times the per-second price once completed, 0 while running. Billed seconds are the delivered seconds, except for a job with `input_videos` (see `billed_seconds`).
|
|
64154
64176
|
*/
|
|
64155
64177
|
cost: number;
|
|
64178
|
+
/**
|
|
64179
|
+
* Only on a completed job with `input_videos`: the seconds it is billed for. The model meters input plus output seconds at a lower rate, converted here to seconds of the delivered resolution, so it can exceed `seconds`.
|
|
64180
|
+
*/
|
|
64181
|
+
billed_seconds?: number;
|
|
64156
64182
|
};
|
|
64157
64183
|
}>;
|
|
64158
64184
|
/**
|
|
@@ -64220,6 +64246,24 @@ export type CreateVideoData = {
|
|
|
64220
64246
|
url: string;
|
|
64221
64247
|
};
|
|
64222
64248
|
}>;
|
|
64249
|
+
/**
|
|
64250
|
+
* Platform extension (the OpenAI videos API has no input video): reference videos as HTTP(S) URLs, or objects with `video_url.url`. Only models that declare it take them (Doubao Seedance 2.5: up to 10 clips totalling 30 s; 2.0: up to 3 totalling 15 s; mp4 or mov, each 2 s or longer and at most 200 MB); any other model answers 400 `input_videos is not supported by this model.` They combine with `input_references` but not with `frame_images` or `input_reference`. In the prompt, name them `@video1`, `@video2`… and the pictures `@image1`, `@image2`… in request order. A clip showing a real human face is refused by the model.
|
|
64251
|
+
*/
|
|
64252
|
+
input_videos?: Array<string | {
|
|
64253
|
+
/**
|
|
64254
|
+
* The reference video, as an object with `url`.
|
|
64255
|
+
*/
|
|
64256
|
+
video_url: {
|
|
64257
|
+
/**
|
|
64258
|
+
* HTTP(S) URL of the video; the model fetches it, so it must stay readable until the job finishes.
|
|
64259
|
+
*/
|
|
64260
|
+
url: string;
|
|
64261
|
+
};
|
|
64262
|
+
}>;
|
|
64263
|
+
/**
|
|
64264
|
+
* Platform extension, only with input_videos: reference (default) makes a new video that follows the inputs; edit keeps the first video and changes what the prompt names, with the source's ratio and length (send no seconds or size; source 4 to 30 s).
|
|
64265
|
+
*/
|
|
64266
|
+
video_task?: 'reference' | 'edit';
|
|
64223
64267
|
/**
|
|
64224
64268
|
* Images that pin the first and last frame; at most 2 entries.
|
|
64225
64269
|
*/
|
|
@@ -64374,9 +64418,13 @@ export type CreateVideoResponses = {
|
|
|
64374
64418
|
*/
|
|
64375
64419
|
usage?: {
|
|
64376
64420
|
/**
|
|
64377
|
-
* Cost of the job in USD:
|
|
64421
|
+
* Cost of the job in USD: billed seconds times the per-second price once completed, 0 while running. Billed seconds are the delivered seconds, except for a job with `input_videos` (see `billed_seconds`).
|
|
64378
64422
|
*/
|
|
64379
64423
|
cost: number;
|
|
64424
|
+
/**
|
|
64425
|
+
* Only on a completed job with `input_videos`: the seconds it is billed for. The model meters input plus output seconds at a lower rate, converted here to seconds of the delivered resolution, so it can exceed `seconds`.
|
|
64426
|
+
*/
|
|
64427
|
+
billed_seconds?: number;
|
|
64380
64428
|
};
|
|
64381
64429
|
};
|
|
64382
64430
|
};
|
|
@@ -64538,9 +64586,13 @@ export type RetrieveVideoResponses = {
|
|
|
64538
64586
|
*/
|
|
64539
64587
|
usage?: {
|
|
64540
64588
|
/**
|
|
64541
|
-
* Cost of the job in USD:
|
|
64589
|
+
* Cost of the job in USD: billed seconds times the per-second price once completed, 0 while running. Billed seconds are the delivered seconds, except for a job with `input_videos` (see `billed_seconds`).
|
|
64542
64590
|
*/
|
|
64543
64591
|
cost: number;
|
|
64592
|
+
/**
|
|
64593
|
+
* Only on a completed job with `input_videos`: the seconds it is billed for. The model meters input plus output seconds at a lower rate, converted here to seconds of the delivered resolution, so it can exceed `seconds`.
|
|
64594
|
+
*/
|
|
64595
|
+
billed_seconds?: number;
|
|
64544
64596
|
};
|
|
64545
64597
|
};
|
|
64546
64598
|
};
|
|
@@ -97099,7 +97151,7 @@ export type DevopsChangesOpenPullRequestErrors = {
|
|
|
97099
97151
|
export type DevopsChangesOpenPullRequestError = DevopsChangesOpenPullRequestErrors[keyof DevopsChangesOpenPullRequestErrors];
|
|
97100
97152
|
export type DevopsChangesOpenPullRequestResponses = {
|
|
97101
97153
|
/**
|
|
97102
|
-
* The pull request for the change's branch: its number, its link,
|
|
97154
|
+
* The pull request for the change's branch: its number, its link, whether this call opened it, and whether it rewrote an already open one.
|
|
97103
97155
|
*/
|
|
97104
97156
|
200: DevopsChangePullRequestOpened;
|
|
97105
97157
|
};
|
|
@@ -102598,9 +102650,13 @@ export type MediaGenerateVideoData = {
|
|
|
102598
102650
|
*/
|
|
102599
102651
|
negative_prompt?: string;
|
|
102600
102652
|
/**
|
|
102601
|
-
* What the video is anchored to. text needs only a prompt; image animates first_frame; first_last bookends first_frame and last_frame; reference keeps the pictures named in references consistent and takes no frames.
|
|
102653
|
+
* What the video is anchored to. text needs only a prompt; image animates first_frame; first_last bookends first_frame and last_frame; reference keeps the pictures (and videos) named in references consistent and takes no frames; edit keeps the video named by source and changes what the prompt says, such as replacing its person with a subject picture.
|
|
102654
|
+
*/
|
|
102655
|
+
mode: 'text' | 'image' | 'first_last' | 'reference' | 'edit';
|
|
102656
|
+
/**
|
|
102657
|
+
* Video to edit; required by mode edit and refused by every other mode. It must be a video asset of this library, at least 4 seconds long (Doubao Seedance edits 4 to 30 s; a longer one is refused by the model before any charge). The produced video is as long as the source. Name its parts in the prompt as @video1 for the source and @image1, @image2… for the references in order, for example "把 @video1 的人物换成 @image1". Sources and pictures showing a real human face are refused by the model: the job fails with CONTENT_REJECTED and nothing is charged.
|
|
102602
102658
|
*/
|
|
102603
|
-
|
|
102659
|
+
source?: MediaAssetId;
|
|
102604
102660
|
/**
|
|
102605
102661
|
* Asset to use as the opening frame; required by mode image and first_last. The asset must be an image or a sticker of this library, otherwise REFERENCE_TYPE_MISMATCH.
|
|
102606
102662
|
*/
|
|
@@ -102610,11 +102666,11 @@ export type MediaGenerateVideoData = {
|
|
|
102610
102666
|
*/
|
|
102611
102667
|
last_frame?: MediaAssetId;
|
|
102612
102668
|
/**
|
|
102613
|
-
* Existing assets the model may use, each with the role it plays. Required with mode reference and refused with every other mode: 1 to 9
|
|
102669
|
+
* Existing assets the model may use, each with the role it plays. Required with mode reference, optional with mode edit, and refused with every other mode: 1 to 9 assets of the same library, each once. Pictures (image or sticker) take role subject (the person, product or scene to keep) or style (the look to follow); with mode reference a video asset may take role video (camera, motion and framing to follow; Doubao Seedance 2.5 takes up to 10 such videos totalling 30 s, 2.0 up to 3 totalling 15 s, each at least 2 s). With mode edit the references are pictures only, and the edited video is source. A model may accept fewer than 9 pictures; Doubao Seedance 2.0 takes up to 9. An entry may also name an element of this library (a character, product, scene or brand made with POST /media/v1/libraries/{library_id}/materials): the service replaces it with the element’s own pictures, keeping this entry’s role and strength, and appends the element’s description to the prompt; a brand adds only its description, colours and banned words and never a picture. Do not expand an element yourself. The pictures after expansion count against the limit, the same element twice is refused with INVALID_PARAMS, and the produced asset records the element and the version it used in provenance.elements. At most 9 pictures after expansion; a list of brands alone leaves no picture and is refused.
|
|
102614
102670
|
*/
|
|
102615
102671
|
references?: Array<MediaAssetReference>;
|
|
102616
102672
|
/**
|
|
102617
|
-
* Requested video length in seconds. The chosen model’s supported durations are validated against it and an unsupported value is rejected with INVALID_PARAMS.
|
|
102673
|
+
* Requested video length in seconds; refused with mode edit, whose output is as long as its source. The chosen model’s supported durations are validated against it and an unsupported value is rejected with INVALID_PARAMS.
|
|
102618
102674
|
*/
|
|
102619
102675
|
duration_seconds?: number;
|
|
102620
102676
|
/**
|
|
@@ -102778,7 +102834,7 @@ export type MediaEditAssetData = {
|
|
|
102778
102834
|
};
|
|
102779
102835
|
export type MediaEditAssetErrors = {
|
|
102780
102836
|
/**
|
|
102781
|
-
* OPERATION_NOT_SUPPORTED: the requested operation type is not performed on this asset type in this release — image edits support variations, inpaint, erase, replace_object, recolor and replace_background, video and image remove_background are supported, and upscale, enhance_voice, reframe, redact, trim, mute and crop run through Media’s processing lane (upscale on a picture or a video, enhance_voice on a recording or a video’s audio, reframe, redact, trim, mute and crop on a video), as
|
|
102837
|
+
* OPERATION_NOT_SUPPORTED: the requested operation type is not performed on this asset type in this release — image edits support variations, inpaint, erase, replace_object, recolor and replace_background, video and image remove_background are supported, and upscale, enhance_voice, reframe, redact, trim, mute and crop run through Media’s processing lane (upscale on a picture or a video, enhance_voice on a recording or a video’s audio, reframe, redact, trim, mute and crop on a video), as do erase and replace_person on a video. An operation whose model list is empty — matting included — is refused with the model field named. REFERENCE_TYPE_MISMATCH: the source asset or a referenced asset has a material type the chosen model cannot edit, or the edit’s mask is not a PNG file identifier; INVALID_PARAMS: the operation is missing a field it requires, names an enum value outside the accepted set, is given an output or model on an image source, or names a matting model the capabilities do not offer. Select a supported operation and correct the reported field.
|
|
102782
102838
|
*/
|
|
102783
102839
|
400: MediaMediaError;
|
|
102784
102840
|
/**
|
|
@@ -12609,7 +12609,7 @@ export const operations = [
|
|
|
12609
12609
|
"resource": "devops.changes",
|
|
12610
12610
|
"method": "openPullRequest",
|
|
12611
12611
|
"summary": "Open a change's pull request",
|
|
12612
|
-
"description": "Open the pull request for a change: its branch into the project's default branch, opened by DevOps's own GitHub App. A cloud workspace holds no GitHub credential, so this is how work pushed with the unit push becomes a pull request; `praxis devops change pr` calls it from the workspace. Push first: a branch with no commits beyond the default branch is refused with PULL_REQUEST_REFUSED and GitHub's words. A branch that already has an open pull request answers that one with created=false, so calling again is safe. The pull request then appears on the change and runs its merge gate as usual. The id is the branch name and its slash must be percent-encoded in the path (fix%2Fexpired-links).",
|
|
12612
|
+
"description": "Open the pull request for a change: its branch into the project's default branch, opened by DevOps's own GitHub App. A cloud workspace holds no GitHub credential, so this is how work pushed with the unit push becomes a pull request; `praxis devops change pr` calls it from the workspace. Push first: a branch with no commits beyond the default branch is refused with PULL_REQUEST_REFUSED and GitHub's words. A branch that already has an open pull request answers that one with created=false, so calling again is safe; when the call passes a title or a body, those fields are written onto that pull request (GitHub PATCH /pulls/{number}) and the answer says updated=true, while a field not passed is left as it is — which is how a wrong or missing description is corrected, and how the merge gate's exposure-declared check is re-evaluated from the new body. The pull request then appears on the change and runs its merge gate as usual. The id is the branch name and its slash must be percent-encoded in the path (fix%2Fexpired-links).",
|
|
12613
12613
|
"http": "POST",
|
|
12614
12614
|
"path": "/devops/v1/changes/{id}:openPullRequest",
|
|
12615
12615
|
"streaming": "no",
|
|
@@ -17854,7 +17854,7 @@ export const operations = [
|
|
|
17854
17854
|
"resource": "media.assets",
|
|
17855
17855
|
"method": "edit",
|
|
17856
17856
|
"summary": "Edit asset",
|
|
17857
|
-
"description": "
|
|
17857
|
+
"description": "Change an existing asset and store the result as a new asset; the source is never overwritten. {library_id} also accepts default, the organization’s default library. The body is operation (its type selects the edit and carries that edit’s own fields) plus optional model, asset_folder, understanding and idempotency_key. Edits by material: on an image, variations (near copies of a take you like), inpaint (mask, a PNG File id beginning with file-, whose transparent area is replaced by what prompt describes), erase, replace_object, recolor, replace_background, remove_background and upscale; on a video, upscale, reframe, redact, trim, mute, crop, erase (removes burned-in subtitles, captions and corner watermarks, found automatically or inside the boxes given), replace_person (puts the person of an image of the same library in place of the video’s person) and remove_background; on a recording or a video’s audio, enhance_voice; and to_video, frame and resynthesize on the material each takes. Any other type answers OPERATION_NOT_SUPPORTED, and an edit that does not fit the source’s material answers REFERENCE_TYPE_MISMATCH. Video and audio edits take their model from the platform catalogue (override with operation.model); an edit whose catalogue is empty answers OPERATION_NOT_SUPPORTED, 尚未上架. remove_background on a video makes a portrait matte: output mask is a small black-and-white video to use as a Cut track mask (the choice for compositing), output alpha (the default) a transparent ProRes 4444 file of about 870 MB per 15 s of 1080p, for when the transparent file itself is the deliverable; pick model from types.matting.models of the generation capabilities. output and model on an image source answer INVALID_PARAMS. The new asset records the source in derived_from; assets.lineage reads the whole edit chain. Charges are at the model API prices (video and audio edits per second of input) and appear in the Job’s usage; repeating the same edit of the same source answers the asset already made instead of paying again. The response is 202 with a queued Job whose source_asset_id is the edited asset; poll GET /media/v1/libraries/{library_id}/jobs/{job_id}, give the output’s viewer_url to the person and tell them usage.",
|
|
17858
17858
|
"http": "POST",
|
|
17859
17859
|
"path": "/media/v1/libraries/{library_id}/assets/{asset_id}/edits",
|
|
17860
17860
|
"streaming": "no",
|
|
@@ -17879,7 +17879,7 @@ export const operations = [
|
|
|
17879
17879
|
"name": "operation",
|
|
17880
17880
|
"type": "object",
|
|
17881
17881
|
"required": true,
|
|
17882
|
-
"description": "One edit to apply to the source asset. type selects the operation and the discriminating branch carries that operation’s fields. This release performs variations, inpaint, erase, replace_object, recolor and replace_background on images, remove_background on an image or a video, upscale, enhance_voice, reframe, redact, trim, mute and crop through Media’s processing lane (upscale on a picture or a video; enhance_voice on a recording or a video, whose audio is used; reframe, redact, trim, mute and crop on a video), erase on a video through the same lane, and to_video, frame and resynthesize on the material each takes; every other type here describes the operation vocabulary and is refused with OPERATION_NOT_SUPPORTED. align is not an edit — it compares two assets and has its own endpoint, POST /media/v1/libraries/{library_id}/assets/{asset_id}/align."
|
|
17882
|
+
"description": "One edit to apply to the source asset. type selects the operation and the discriminating branch carries that operation’s fields. This release performs variations, inpaint, erase, replace_object, recolor and replace_background on images, remove_background on an image or a video, upscale, enhance_voice, reframe, redact, trim, mute and crop through Media’s processing lane (upscale on a picture or a video; enhance_voice on a recording or a video, whose audio is used; reframe, redact, trim, mute and crop on a video), erase and replace_person on a video through the same lane, and to_video, frame and resynthesize on the material each takes; every other type here describes the operation vocabulary and is refused with OPERATION_NOT_SUPPORTED. align is not an edit — it compares two assets and has its own endpoint, POST /media/v1/libraries/{library_id}/assets/{asset_id}/align."
|
|
17883
17883
|
},
|
|
17884
17884
|
{
|
|
17885
17885
|
"name": "model",
|
|
@@ -18445,7 +18445,7 @@ export const operations = [
|
|
|
18445
18445
|
"resource": "media.images",
|
|
18446
18446
|
"method": "generate",
|
|
18447
18447
|
"summary": "Generate image",
|
|
18448
|
-
"description": "Generate
|
|
18448
|
+
"description": "Generate images into a library from a prompt, optionally guided by existing pictures. {library_id} also accepts default, the organization’s default library. prompt is required; n (1 to 10), size, background, output_format, output, references, seed, model, asset_folder and understanding are optional. Name size, not an aspect ratio. Set output to sticker for a cut-out with a transparent background. references attach pictures of the same library with a role: subject keeps a person, product or scene consistent (several subjects put several characters in one picture), edit_target is the picture to change, style is the look to follow, structure the composition. Only a model whose modes in GET /media/v1/generation/capabilities include image takes references; any other answers INVALID_PARAMS naming the models that do, and a role a model cannot honour answers REFERENCE_TYPE_MISMATCH, both before anything is charged. A reference may be an element id (a character, product, scene or brand from the materials endpoints), which expands into its pictures and appends its description to the prompt. To draw several candidates of one key frame, send n and keep the ones you want; delete the rest. Charges are per image at the model API prices and appear in the Job’s usage; a refused or failed image costs nothing. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} for each output’s asset and viewer_url, give viewer_url to the person and tell them usage. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice.",
|
|
18449
18449
|
"http": "POST",
|
|
18450
18450
|
"path": "/media/v1/libraries/{library_id}/images/generations",
|
|
18451
18451
|
"streaming": "no",
|
|
@@ -18570,7 +18570,7 @@ export const operations = [
|
|
|
18570
18570
|
"resource": "media.libraries.jobs",
|
|
18571
18571
|
"method": "list",
|
|
18572
18572
|
"summary": "List jobs",
|
|
18573
|
-
"description": "List batch and generation jobs
|
|
18573
|
+
"description": "List the batch and generation jobs of a library, newest first, to find a job whose id you lost or to watch several takes at once. Filter by status or by pipeline_run_id (the jobs one automation run started) and continue with next_cursor. Each entry is the same Job that GET /media/v1/libraries/{library_id}/jobs/{job_id} returns, with outputs, failures and usage.",
|
|
18574
18574
|
"http": "GET",
|
|
18575
18575
|
"path": "/media/v1/libraries/{library_id}/jobs",
|
|
18576
18576
|
"streaming": "no",
|
|
@@ -18623,7 +18623,7 @@ export const operations = [
|
|
|
18623
18623
|
"resource": "media.libraries.jobs",
|
|
18624
18624
|
"method": "retrieve",
|
|
18625
18625
|
"summary": "Get job",
|
|
18626
|
-
"description": "Read
|
|
18626
|
+
"description": "Read a generation, edit or batch Job; poll it after every generation or edit until status is terminal, every few seconds (an image takes seconds, a video one to three minutes). status: queued is waiting (queue_reason says why, queue_position its place in line); in_progress or running is generating; completed means every output succeeded; completed_with_errors means some did; failed means none did; canceled or cancelled means it was stopped. Read the result output by output. A succeeded entry of outputs[] has asset_id and viewer_url, because the output is already a library asset: give viewer_url to the person. Its seed is present only when the model reports one (Doubao Seedance 2.x neither takes nor reports a seed); where present, send it back as seed with an adjusted prompt to vary that take. A failed entry has its reason in the failures[] entry with the same index: code is the error to branch on, for example CONTENT_REJECTED when the model's moderation refused an input or the result (a real human face in a reference is one cause; change the prompt or the reference, because retrying unchanged fails again) or GENERATION_FAILED when the model call failed (retrying may succeed); detail_code is the model's finer reason and model_request_id the model call to trace. usage is what the job has cost so far and is final at a terminal status; failed and refused outputs are not charged, so usage counts succeeded outputs only, and it is absent when nothing was charged.",
|
|
18627
18627
|
"http": "GET",
|
|
18628
18628
|
"path": "/media/v1/libraries/{library_id}/jobs/{job_id}",
|
|
18629
18629
|
"streaming": "no",
|
|
@@ -18646,7 +18646,7 @@ export const operations = [
|
|
|
18646
18646
|
"resource": "media.libraries.jobs",
|
|
18647
18647
|
"method": "cancel",
|
|
18648
18648
|
"summary": "Cancel job",
|
|
18649
|
-
"description": "
|
|
18649
|
+
"description": "Stop a generation job you no longer need, for example after the first takes of a draw show the prompt is wrong. Outputs that are queued are cancelled and never charged; outputs already produced stay in the library and stay charged. A video cannot be stopped once the provider has started generating it: the call answers 409 JOB_INVALID_STATE (details VIDEO_ALREADY_RUNNING), and that output still finishes, is saved to the library and is charged. Read the returned Job, or poll it, to see which outputs ended.",
|
|
18650
18650
|
"http": "POST",
|
|
18651
18651
|
"path": "/media/v1/libraries/{library_id}/jobs/{job_id}/cancel",
|
|
18652
18652
|
"streaming": "no",
|
|
@@ -19164,7 +19164,7 @@ export const operations = [
|
|
|
19164
19164
|
"resource": "media.videos",
|
|
19165
19165
|
"method": "generate",
|
|
19166
19166
|
"summary": "Generate video",
|
|
19167
|
-
"description": "Generate
|
|
19167
|
+
"description": "Generate videos into a library: from a prompt, from frames, from reference pictures or videos, or by editing an existing video. {library_id} also accepts default, the organization’s default library. mode picks the anchor: text (prompt only); image (animates first_frame); first_last (between first_frame and last_frame); reference (1 to 9 references: pictures with role subject or style keep a person, product or look consistent, and video assets with role video give the camera and motion to follow; an element id expands into its pictures and description); edit (keeps the video named by source, at least 4 s, and changes what the prompt says, such as replacing its person with a subject picture; the output is as long as the source). Frames and references are assets of the same library; in the prompt call them @video1 and @image1, @image2… in request order. Read GET /media/v1/generation/capabilities first: a model takes only the modes it lists. To draw several takes of one shot and keep the best, send n (1 to 4); 480p is the cheapest way to compare takes. Charges are per output second at the model API prices and appear in the Job’s usage; a job with an input video is metered on input plus output seconds, so it can cost more than the output length suggests; a refused or failed output costs nothing, and so does a request refused before the job starts. A real human face in a source or reference is refused by the model with CONTENT_REJECTED. Refused before any charge: output gif (OPERATION_NOT_SUPPORTED), negative_prompt, references outside reference and edit, and an unknown mode. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} for each output’s asset and viewer_url, give viewer_url to the person and tell them usage. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice.",
|
|
19168
19168
|
"http": "POST",
|
|
19169
19169
|
"path": "/media/v1/libraries/{library_id}/videos/generations",
|
|
19170
19170
|
"streaming": "no",
|
|
@@ -19199,10 +19199,17 @@ export const operations = [
|
|
|
19199
19199
|
"text",
|
|
19200
19200
|
"image",
|
|
19201
19201
|
"first_last",
|
|
19202
|
-
"reference"
|
|
19202
|
+
"reference",
|
|
19203
|
+
"edit"
|
|
19203
19204
|
],
|
|
19204
19205
|
"required": true,
|
|
19205
|
-
"description": "What the video is anchored to. text needs only a prompt; image animates first_frame; first_last bookends first_frame and last_frame; reference keeps the pictures named in references consistent and takes no frames."
|
|
19206
|
+
"description": "What the video is anchored to. text needs only a prompt; image animates first_frame; first_last bookends first_frame and last_frame; reference keeps the pictures (and videos) named in references consistent and takes no frames; edit keeps the video named by source and changes what the prompt says, such as replacing its person with a subject picture."
|
|
19207
|
+
},
|
|
19208
|
+
{
|
|
19209
|
+
"name": "source",
|
|
19210
|
+
"type": "string",
|
|
19211
|
+
"required": false,
|
|
19212
|
+
"description": "Asset identifier returned by upload or asset listing; distinct from public_id and content hashes."
|
|
19206
19213
|
},
|
|
19207
19214
|
{
|
|
19208
19215
|
"name": "first_frame",
|
|
@@ -19221,13 +19228,13 @@ export const operations = [
|
|
|
19221
19228
|
"type": "array",
|
|
19222
19229
|
"itemType": "object",
|
|
19223
19230
|
"required": false,
|
|
19224
|
-
"description": "Existing assets the model may use, each with the role it plays. Required with mode reference and refused with every other mode: 1 to 9
|
|
19231
|
+
"description": "Existing assets the model may use, each with the role it plays. Required with mode reference, optional with mode edit, and refused with every other mode: 1 to 9 assets of the same library, each once. Pictures (image or sticker) take role subject (the person, product or scene to keep) or style (the look to follow); with mode reference a video asset may take role video (camera, motion and framing to follow; Doubao Seedance 2.5 takes up to 10 such videos totalling 30 s, 2.0 up to 3 totalling 15 s, each at least 2 s). With mode edit the references are pictures only, and the edited video is source. A model may accept fewer than 9 pictures; Doubao Seedance 2.0 takes up to 9. An entry may also name an element of this library (a character, product, scene or brand made with POST /media/v1/libraries/{library_id}/materials): the service replaces it with the element’s own pictures, keeping this entry’s role and strength, and appends the element’s description to the prompt; a brand adds only its description, colours and banned words and never a picture. Do not expand an element yourself. The pictures after expansion count against the limit, the same element twice is refused with INVALID_PARAMS, and the produced asset records the element and the version it used in provenance.elements. At most 9 pictures after expansion; a list of brands alone leaves no picture and is refused."
|
|
19225
19232
|
},
|
|
19226
19233
|
{
|
|
19227
19234
|
"name": "duration_seconds",
|
|
19228
19235
|
"type": "integer",
|
|
19229
19236
|
"required": false,
|
|
19230
|
-
"description": "Requested video length in seconds. The chosen model’s supported durations are validated against it and an unsupported value is rejected with INVALID_PARAMS."
|
|
19237
|
+
"description": "Requested video length in seconds; refused with mode edit, whose output is as long as its source. The chosen model’s supported durations are validated against it and an unsupported value is rejected with INVALID_PARAMS."
|
|
19231
19238
|
},
|
|
19232
19239
|
{
|
|
19233
19240
|
"name": "resolution",
|
|
@@ -21563,6 +21570,23 @@ export const operations = [
|
|
|
21563
21570
|
"required": false,
|
|
21564
21571
|
"description": "Several reference images; each entry is a URL or base64 data URL, or an object with `image_url`."
|
|
21565
21572
|
},
|
|
21573
|
+
{
|
|
21574
|
+
"name": "input_videos",
|
|
21575
|
+
"type": "array",
|
|
21576
|
+
"itemType": "object",
|
|
21577
|
+
"required": false,
|
|
21578
|
+
"description": "Platform extension (the OpenAI videos API has no input video): reference videos as HTTP(S) URLs, or objects with `video_url.url`. Only models that declare it take them (Doubao Seedance 2.5: up to 10 clips totalling 30 s; 2.0: up to 3 totalling 15 s; mp4 or mov, each 2 s or longer and at most 200 MB); any other model answers 400 `input_videos is not supported by this model.` They combine with `input_references` but not with `frame_images` or `input_reference`. In the prompt, name them `@video1`, `@video2`… and the pictures `@image1`, `@image2`… in request order. A clip showing a real human face is refused by the model."
|
|
21579
|
+
},
|
|
21580
|
+
{
|
|
21581
|
+
"name": "video_task",
|
|
21582
|
+
"type": "string",
|
|
21583
|
+
"enum": [
|
|
21584
|
+
"reference",
|
|
21585
|
+
"edit"
|
|
21586
|
+
],
|
|
21587
|
+
"required": false,
|
|
21588
|
+
"description": "Platform extension, only with input_videos: reference (default) makes a new video that follows the inputs; edit keeps the first video and changes what the prompt names, with the source's ratio and length (send no seconds or size; source 4 to 30 s)."
|
|
21589
|
+
},
|
|
21566
21590
|
{
|
|
21567
21591
|
"name": "frame_images",
|
|
21568
21592
|
"type": "array",
|
|
@@ -6261,6 +6261,7 @@ export declare function createModel(transport: Transport): {
|
|
|
6261
6261
|
unsigned_urls: Array<string>;
|
|
6262
6262
|
usage?: {
|
|
6263
6263
|
cost: number;
|
|
6264
|
+
billed_seconds?: number;
|
|
6264
6265
|
};
|
|
6265
6266
|
}>;
|
|
6266
6267
|
delete: (options: import("./core/transport.js").CallOptions<Types.DeleteVideoData>) => Promise<{
|
|
@@ -6291,6 +6292,7 @@ export declare function createModel(transport: Transport): {
|
|
|
6291
6292
|
unsigned_urls: Array<string>;
|
|
6292
6293
|
usage?: {
|
|
6293
6294
|
cost: number;
|
|
6295
|
+
billed_seconds?: number;
|
|
6294
6296
|
};
|
|
6295
6297
|
}>;
|
|
6296
6298
|
has_more: boolean;
|
|
@@ -6319,6 +6321,7 @@ export declare function createModel(transport: Transport): {
|
|
|
6319
6321
|
unsigned_urls: Array<string>;
|
|
6320
6322
|
usage?: {
|
|
6321
6323
|
cost: number;
|
|
6324
|
+
billed_seconds?: number;
|
|
6322
6325
|
};
|
|
6323
6326
|
}>;
|
|
6324
6327
|
retrieveContent: (options: import("./core/transport.js").CallOptions<Types.DownloadVideoContentData>) => Promise<Blob | File>;
|