@deepraxis/sdk 0.1.1-dev.b0da55b → 0.1.1-dev.b191d44
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 +10 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +31 -11
- package/dist/generated/sdk.gen.js +74 -10
- package/dist/generated/types.gen.d.ts +2639 -665
- package/dist/operations.generated.js +137 -16
- package/dist/resources.generated.d.ts +553 -0
- package/dist/resources.generated.js +5 -0
- package/package.json +1 -1
|
@@ -61,7 +61,7 @@ export const operations = [
|
|
|
61
61
|
"resource": "agent.agents",
|
|
62
62
|
"method": "create",
|
|
63
63
|
"summary": "Create agent",
|
|
64
|
-
"description": "Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. skills attaches uploaded custom skills as [{type: \"custom\", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send \"latest\", to use the skill's newest version when a session starts. type anthropic returns 400. Use tools: [{type: \"agent_toolset_20260401\"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: \"agent_toolset_20260401\", default_config: {enabled: false}, configs: [{name: \"codemode\", enabled: true}, {name: \"bash\", enabled: true, permission_policy: {type: \"always_ask\"}}]}]; every tool not listed, including todo_write, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 \"model <id> is not in the model catalog\" and an embedding, image or speech model returns 400 \"model <id> cannot run an agent\". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {\"name\":\"helper\",\"model\":{\"id\":\"deepseek-flash\"},\"tools\":[{\"type\":\"agent_toolset_20260401\"}]}. For kind assume, provide name without model, models, subagent_model, subagents or multiagent; omit computer_id to register a new computer named after the agent without starting an instance, or provide an existing computer_id; vault_ids are accepted, bindings and environment_id are refused. Drive assume agents over MCP at /agent/v1/agents/{id}/mcp.",
|
|
64
|
+
"description": "Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. skills attaches uploaded custom skills as [{type: \"custom\", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send \"latest\", to use the skill's newest version when a session starts. type anthropic returns 400. Use tools: [{type: \"agent_toolset_20260401\"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: \"agent_toolset_20260401\", default_config: {enabled: false}, configs: [{name: \"codemode\", enabled: true}, {name: \"bash\", enabled: true, permission_policy: {type: \"always_ask\"}}]}]; every tool not listed, including todo_write, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 \"model <id> is not in the model catalog\" and an embedding, image or speech model returns 400 \"model <id> cannot run an agent\". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {\"name\":\"helper\",\"model\":{\"id\":\"deepseek-flash\"},\"tools\":[{\"type\":\"agent_toolset_20260401\"}]}. kind defaults to service when it is omitted and no computer_id is given, and to general when computer_id is given; it cannot change after creation. For kind assume, provide name without model, models, subagent_model, subagents or multiagent; omit computer_id to register a new computer named after the agent without starting an instance, or provide an existing computer_id; vault_ids are accepted, bindings and environment_id are refused. Drive assume agents over MCP at /agent/v1/agents/{id}/mcp.",
|
|
65
65
|
"http": "POST",
|
|
66
66
|
"path": "/agent/v1/agents",
|
|
67
67
|
"streaming": "no",
|
|
@@ -776,6 +776,71 @@ export const operations = [
|
|
|
776
776
|
],
|
|
777
777
|
"query": []
|
|
778
778
|
},
|
|
779
|
+
{
|
|
780
|
+
"resource": "agent.agents",
|
|
781
|
+
"method": "retrieveEmbedPolicy",
|
|
782
|
+
"summary": "Get agent embed policy",
|
|
783
|
+
"description": "Read a service agent's embed settings: the pages allowed to open its Kit chat (allowed_origins), the development switch (allow_localhost) and what an embedded end user may upload (uploads). The allow list decides where the agent can be embedded at all, so after deploying an application, add that application's URL origin here (scheme, host and port, never a path) before the page loads the agent — otherwise its Kit chat answers ORIGIN_NOT_ALLOWED. Budgets, monthly caps and token lifetime are set in the console and are not part of this API. An agent of another organization answers 404; an agent that is not a service agent answers 400.",
|
|
784
|
+
"http": "GET",
|
|
785
|
+
"path": "/agent/v1/agents/{agent_id}/embed_policy",
|
|
786
|
+
"streaming": "no",
|
|
787
|
+
"pagination": false,
|
|
788
|
+
"pathParams": [
|
|
789
|
+
{
|
|
790
|
+
"name": "agent_id",
|
|
791
|
+
"sdkName": "agent_id",
|
|
792
|
+
"description": "Service agent id from agent creation or listing, the eight character identity number or the handle; the agent must be a service agent of your organization. Also accepts an 8-character identity number (0–9, A–Z); malformed, absent and foreign references return 404, and response ids always use agent_…."
|
|
793
|
+
}
|
|
794
|
+
],
|
|
795
|
+
"query": []
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"resource": "agent.agents",
|
|
799
|
+
"method": "updateEmbedPolicy",
|
|
800
|
+
"summary": "Update agent embed policy",
|
|
801
|
+
"description": "Change some of a service agent's embed settings. Only the fields you send change: everything you leave out, including the budgets and the token lifetime set in the console, is kept exactly as it was. Send allowed_origins so the pages that load the agent are allowed — an application's URL origin must be in the list before the application can embed the agent, or its Kit chat answers ORIGIN_NOT_ALLOWED. Send allow_localhost while developing on http://localhost, and uploads to open, close or bound file attachments for the embedded end user. Values are checked by the service: an origin is normalized and must be https, and at most one leading wildcard label may match a single subdomain level. max_file_bytes is 1 to 104857600 bytes and max_files_per_session is 1 to 100. Example: POST /agent/v1/agents/{agent_id}/embed_policy with {\"allowed_origins\": [\"https://my-app.example.com\"]}.",
|
|
802
|
+
"http": "POST",
|
|
803
|
+
"path": "/agent/v1/agents/{agent_id}/embed_policy",
|
|
804
|
+
"streaming": "no",
|
|
805
|
+
"pagination": false,
|
|
806
|
+
"pathParams": [
|
|
807
|
+
{
|
|
808
|
+
"name": "agent_id",
|
|
809
|
+
"sdkName": "agent_id",
|
|
810
|
+
"description": "Service agent id from agent creation or listing, the eight character identity number or the handle; the agent must be a service agent of your organization. Also accepts an 8-character identity number (0–9, A–Z); malformed, absent and foreign references return 404, and response ids always use agent_…."
|
|
811
|
+
}
|
|
812
|
+
],
|
|
813
|
+
"query": [],
|
|
814
|
+
"body": {
|
|
815
|
+
"required": true,
|
|
816
|
+
"fields": [
|
|
817
|
+
{
|
|
818
|
+
"name": "allowed_origins",
|
|
819
|
+
"type": "array",
|
|
820
|
+
"itemType": "string",
|
|
821
|
+
"required": false,
|
|
822
|
+
"description": "Replaces the whole allow list: the https origins whose pages may open this agent's Kit chat, with no path, query or fragment. An origin is normalized before it is stored, and a leading wildcard label matches subdomains one label deep. Send the origin of the application you just deployed to let it embed the agent."
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
"name": "allow_localhost",
|
|
826
|
+
"type": "boolean",
|
|
827
|
+
"required": false,
|
|
828
|
+
"description": "Whether http://localhost or http://127.0.0.1 pages may open the chat during development."
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
"name": "uploads",
|
|
832
|
+
"type": "object",
|
|
833
|
+
"required": false,
|
|
834
|
+
"description": "What an embedded end user may attach; only the fields you send are changed."
|
|
835
|
+
}
|
|
836
|
+
],
|
|
837
|
+
"example": {
|
|
838
|
+
"allowed_origins": [
|
|
839
|
+
"https://my-app.example.com"
|
|
840
|
+
]
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
},
|
|
779
844
|
{
|
|
780
845
|
"resource": "agent.agents.events",
|
|
781
846
|
"method": "list",
|
|
@@ -2047,7 +2112,7 @@ export const operations = [
|
|
|
2047
2112
|
"resource": "agent.sessions",
|
|
2048
2113
|
"method": "create",
|
|
2049
2114
|
"summary": "Create session",
|
|
2050
|
-
"description": "Create a session: one conversation with an agent. Pass agent as an agent id or {type:\"agent\", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (
|
|
2115
|
+
"description": "Create a session: one conversation with an agent. Pass agent as an agent id or {type:\"agent\", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (node22 for a new agent), unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. The retired \"light\" returns 400 naming the two forms that work: \"node22\", or null for no machine. For service agents, explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Unlike Anthropic Managed Agents, the only inline agent override is system ({type:\"agent_with_overrides\", id, system}); to change the model, tools, MCP servers or skills, save a version instead. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. budget is {type:\"limit\", max_list_cost:{amount, currency:\"USD\"}} where amount is a positive decimal string of US dollars with at most 2 decimal places (\"20.00\" is USD 20.00); omitted budget defaults to \"20.00\" and null removes the limit. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion. Assume agents return 400 INVALID_PARAMS; drive them over MCP at /agent/v1/agents/{id}/mcp instead.",
|
|
2051
2116
|
"http": "POST",
|
|
2052
2117
|
"path": "/agent/v1/sessions",
|
|
2053
2118
|
"streaming": "no",
|
|
@@ -2163,7 +2228,7 @@ export const operations = [
|
|
|
2163
2228
|
"resource": "agent.sessions",
|
|
2164
2229
|
"method": "retrieve",
|
|
2165
2230
|
"summary": "Get session",
|
|
2166
|
-
"description": "Read one session by id: its agent snapshot, status, model and thinking selection, resources, title, metadata and, for a fork, forked_from. Use it to poll status; to read what happened use sessions.events.list. This response does not include a machine object or sandbox id. With no environment_id or Computer selected at creation, the session starts on
|
|
2231
|
+
"description": "Read one session by id: its agent snapshot, status, model and thinking selection, resources, title, metadata and, for a fork, forked_from. Use it to poll status; to read what happened use sessions.events.list. This response does not include a machine object or sandbox id. With no environment_id or Computer selected at creation, the session starts on the agent version's default environment, node22.",
|
|
2167
2232
|
"http": "GET",
|
|
2168
2233
|
"path": "/agent/v1/sessions/{session_id}",
|
|
2169
2234
|
"streaming": "no",
|
|
@@ -2237,6 +2302,38 @@ export const operations = [
|
|
|
2237
2302
|
]
|
|
2238
2303
|
}
|
|
2239
2304
|
},
|
|
2305
|
+
{
|
|
2306
|
+
"resource": "agent.sessions.agentVersion",
|
|
2307
|
+
"method": "create",
|
|
2308
|
+
"summary": "Update session agent version",
|
|
2309
|
+
"description": "Move one session to a version of its agent\n\nWithout `version`, the session moves to the agent's active version — the version new sessions get now, which is not necessarily the newest saved one. With `version`, it moves to that existing version. The change is idempotent: asking for the version the session is already on answers the session and writes nothing, so the call may be repeated freely. A session that is running a turn answers 409 SESSION_CONFLICT and changes nothing, because a turn finishes on the version it started with; ask again once it is idle. The move writes a `session.updated` event carrying the agent version and the caller as its actor, so every version change is attributable. Main sessions additionally follow their agent's active version at the start of a person-started turn; this endpoint is the same move made explicitly, and it works on every kind of session, including worker sessions that never follow on their own.",
|
|
2310
|
+
"http": "POST",
|
|
2311
|
+
"path": "/agent/v1/sessions/{session_id}/agent_version",
|
|
2312
|
+
"streaming": "no",
|
|
2313
|
+
"pagination": false,
|
|
2314
|
+
"pathParams": [
|
|
2315
|
+
{
|
|
2316
|
+
"name": "session_id",
|
|
2317
|
+
"sdkName": "session_id",
|
|
2318
|
+
"description": "Session id from session creation or listing, or the own face's session name for a main session."
|
|
2319
|
+
}
|
|
2320
|
+
],
|
|
2321
|
+
"query": [],
|
|
2322
|
+
"body": {
|
|
2323
|
+
"required": false,
|
|
2324
|
+
"fields": [
|
|
2325
|
+
{
|
|
2326
|
+
"name": "version",
|
|
2327
|
+
"type": "integer",
|
|
2328
|
+
"required": false,
|
|
2329
|
+
"description": "An existing version of the session's agent, from agents.versions.list. Omit to use the agent's active version."
|
|
2330
|
+
}
|
|
2331
|
+
],
|
|
2332
|
+
"example": {
|
|
2333
|
+
"version": 5
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
},
|
|
2240
2337
|
{
|
|
2241
2338
|
"resource": "agent.sessions",
|
|
2242
2339
|
"method": "archive",
|
|
@@ -12512,7 +12609,7 @@ export const operations = [
|
|
|
12512
12609
|
"resource": "devops.changes",
|
|
12513
12610
|
"method": "openPullRequest",
|
|
12514
12611
|
"summary": "Open a change's pull request",
|
|
12515
|
-
"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).",
|
|
12516
12613
|
"http": "POST",
|
|
12517
12614
|
"path": "/devops/v1/changes/{id}:openPullRequest",
|
|
12518
12615
|
"streaming": "no",
|
|
@@ -17175,7 +17272,7 @@ export const operations = [
|
|
|
17175
17272
|
"name": "understanding",
|
|
17176
17273
|
"type": "object",
|
|
17177
17274
|
"required": false,
|
|
17178
|
-
"description": "Understanding tasks enabled for new assets; omitted
|
|
17275
|
+
"description": "Understanding tasks enabled for new assets; omitted visual and transcript default to true, embedding to false."
|
|
17179
17276
|
}
|
|
17180
17277
|
]
|
|
17181
17278
|
}
|
|
@@ -17757,7 +17854,7 @@ export const operations = [
|
|
|
17757
17854
|
"resource": "media.assets",
|
|
17758
17855
|
"method": "edit",
|
|
17759
17856
|
"summary": "Edit asset",
|
|
17760
|
-
"description": "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 and replace_background on images, remove_background on an image or a video, upscale, enhance_voice, reframe and
|
|
17857
|
+
"description": "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 and replace_background on images, remove_background on an image or a video, upscale, enhance_voice, reframe, redact, trim, mute, crop, erase and replace_person 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 removes burned-in subtitles, captions and corner watermarks, found automatically or inside the boxes given, and leaves every other pixel as it was; replace_person puts the person from an image of the same library into a video in place of its person), and to_video, frame and resynthesize on the material each takes; every other type in the operation vocabulary is refused with OPERATION_NOT_SUPPORTED. The processing lane takes its model from the platform model catalogue, judged by the operation’s capability and overridable with operation.model, and bills per second of input; each edit is idempotent on the source, the operation and the parameters, so a second request that would make the same asset answers the asset already made instead of paying again, and an operation whose catalogue list is empty is refused with OPERATION_NOT_SUPPORTED, 尚未上架. remove_background on a video produces a portrait matte video for compositing without a green screen: output picks mask (a black-and-white matte as a small H.264 video, person white and background black: use it as a Cut track mask with channel luma under the original video to lay a lecturer over slides — the choice for compositing) or alpha (the default: the person on a transparent background as ProRes 4444, which is very large, about 870 MB per 15 seconds of 1080p, so ask for it only when a transparent file itself is the deliverable), and model picks the matting model from types.matting.models of the generation capabilities — read it first, because a request that names none takes the first available matting model and a video is refused with OPERATION_NOT_SUPPORTED, in the model field, when the platform has published none. output and model mean nothing for an image source and are refused with INVALID_PARAMS naming the field rather than ignored. 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\"}}.",
|
|
17761
17858
|
"http": "POST",
|
|
17762
17859
|
"path": "/media/v1/libraries/{library_id}/assets/{asset_id}/edits",
|
|
17763
17860
|
"streaming": "no",
|
|
@@ -17782,7 +17879,7 @@ export const operations = [
|
|
|
17782
17879
|
"name": "operation",
|
|
17783
17880
|
"type": "object",
|
|
17784
17881
|
"required": true,
|
|
17785
|
-
"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."
|
|
17786
17883
|
},
|
|
17787
17884
|
{
|
|
17788
17885
|
"name": "model",
|
|
@@ -18473,7 +18570,7 @@ export const operations = [
|
|
|
18473
18570
|
"resource": "media.libraries.jobs",
|
|
18474
18571
|
"method": "list",
|
|
18475
18572
|
"summary": "List jobs",
|
|
18476
|
-
"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.",
|
|
18477
18574
|
"http": "GET",
|
|
18478
18575
|
"path": "/media/v1/libraries/{library_id}/jobs",
|
|
18479
18576
|
"streaming": "no",
|
|
@@ -18526,7 +18623,7 @@ export const operations = [
|
|
|
18526
18623
|
"resource": "media.libraries.jobs",
|
|
18527
18624
|
"method": "retrieve",
|
|
18528
18625
|
"summary": "Get job",
|
|
18529
|
-
"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.",
|
|
18530
18627
|
"http": "GET",
|
|
18531
18628
|
"path": "/media/v1/libraries/{library_id}/jobs/{job_id}",
|
|
18532
18629
|
"streaming": "no",
|
|
@@ -18549,7 +18646,7 @@ export const operations = [
|
|
|
18549
18646
|
"resource": "media.libraries.jobs",
|
|
18550
18647
|
"method": "cancel",
|
|
18551
18648
|
"summary": "Cancel job",
|
|
18552
|
-
"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.",
|
|
18553
18650
|
"http": "POST",
|
|
18554
18651
|
"path": "/media/v1/libraries/{library_id}/jobs/{job_id}/cancel",
|
|
18555
18652
|
"streaming": "no",
|
|
@@ -19067,7 +19164,7 @@ export const operations = [
|
|
|
19067
19164
|
"resource": "media.videos",
|
|
19068
19165
|
"method": "generate",
|
|
19069
19166
|
"summary": "Generate video",
|
|
19070
|
-
"description": "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 keeps 1 to 9 pictures named in references consistent (role subject or style; not combinable with frames; a model may take fewer); a reference may be an element id, which the service expands into the element’s pictures and description. output gif is refused with OPERATION_NOT_SUPPORTED in this release, and negative_prompt, references outside mode reference 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}.",
|
|
19167
|
+
"description": "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 keeps 1 to 9 pictures named in references consistent (role subject or style; not combinable with frames; a model may take fewer), and may add video assets with role video for the camera and motion to follow; a reference may be an element id, which the service expands into the element’s pictures and description. mode edit keeps the video named by source (at least 4 s) and changes what the prompt says — replace its person with a subject picture, add or remove an object — with an output as long as the source; name the inputs in the prompt as @video1 and @image1, @image2… (only models whose modes list edit, such as Doubao Seedance 2.5). A source or reference with a real human face is refused by the model: the output fails with CONTENT_REJECTED and is not charged. A job with an input video is charged on the model’s own metering of input plus output seconds, so its usage can exceed the output length times the per-second price. output gif is refused with OPERATION_NOT_SUPPORTED in this release, and negative_prompt, references outside mode reference 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}.",
|
|
19071
19168
|
"http": "POST",
|
|
19072
19169
|
"path": "/media/v1/libraries/{library_id}/videos/generations",
|
|
19073
19170
|
"streaming": "no",
|
|
@@ -19102,10 +19199,17 @@ export const operations = [
|
|
|
19102
19199
|
"text",
|
|
19103
19200
|
"image",
|
|
19104
19201
|
"first_last",
|
|
19105
|
-
"reference"
|
|
19202
|
+
"reference",
|
|
19203
|
+
"edit"
|
|
19106
19204
|
],
|
|
19107
19205
|
"required": true,
|
|
19108
|
-
"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."
|
|
19109
19213
|
},
|
|
19110
19214
|
{
|
|
19111
19215
|
"name": "first_frame",
|
|
@@ -19124,13 +19228,13 @@ export const operations = [
|
|
|
19124
19228
|
"type": "array",
|
|
19125
19229
|
"itemType": "object",
|
|
19126
19230
|
"required": false,
|
|
19127
|
-
"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."
|
|
19128
19232
|
},
|
|
19129
19233
|
{
|
|
19130
19234
|
"name": "duration_seconds",
|
|
19131
19235
|
"type": "integer",
|
|
19132
19236
|
"required": false,
|
|
19133
|
-
"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."
|
|
19134
19238
|
},
|
|
19135
19239
|
{
|
|
19136
19240
|
"name": "resolution",
|
|
@@ -21466,6 +21570,23 @@ export const operations = [
|
|
|
21466
21570
|
"required": false,
|
|
21467
21571
|
"description": "Several reference images; each entry is a URL or base64 data URL, or an object with `image_url`."
|
|
21468
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
|
+
},
|
|
21469
21590
|
{
|
|
21470
21591
|
"name": "frame_images",
|
|
21471
21592
|
"type": "array",
|
|
@@ -24001,7 +24122,7 @@ export const operations = [
|
|
|
24001
24122
|
"resource": "organization.positions.hire",
|
|
24002
24123
|
"method": "create",
|
|
24003
24124
|
"summary": "Hire into a position",
|
|
24004
|
-
"description": "Seats an existing member or agent in a vacant position; use it to fill a position that nobody holds, and use replace_holder to swap the current holder in one step. An actor is a person (human:usr_...) or an agent (agent:agent_...), treated identically, and must exist in your organization and not be archived. The position must be active and vacant, and a position has at most one active assignment. An actor may hold several positions, and exactly one of its active assignments is primary: omit primary to make the first assignment primary and later ones concurrent; primary true makes this one primary and turns the previous primary into a concurrent one; primary false for an actor that holds nothing is refused. request_id makes the call idempotent: repeating it returns the first assignment and seats nobody else. Requires an organization owner or admin, or the head of the position's department or of a department above it. Errors: 400 INVALID_PARAMS for a missing request_id, a candidate.kind other than member, an empty candidate.actor, a non-boolean primary or an unknown body field; 403 PERMISSION_DENIED; 404 POSITION_NOT_FOUND; 404 ACTOR_NOT_FOUND when the actor is not an active member or agent of your organization; 409 POSITION_FROZEN, POSITION_CLOSED or POSITION_OCCUPIED; 409 PRIMARY_ASSIGNMENT_REQUIRED for primary false on an actor that holds nothing. Example body: {\"candidate\":{\"kind\":\"member\",\"actor\":\"human:usr_123\"},\"request_id\":\"hire-support-1\"}.",
|
|
24125
|
+
"description": "Seats an existing member or agent in a vacant position; use it to fill a position that nobody holds, and use replace_holder to swap the current holder in one step. An actor is a person (human:usr_...) or an agent (agent:agent_...), treated identically, and must exist in your organization and not be archived. An agent created moments ago may not be in the organization roster yet (agents enter it asynchronously): that answers 503 ACTOR_SYNCING with a Retry-After header and retryable true, and the same call succeeds after that wait. The position must be active and vacant, and a position has at most one active assignment. An actor may hold several positions, and exactly one of its active assignments is primary: omit primary to make the first assignment primary and later ones concurrent; primary true makes this one primary and turns the previous primary into a concurrent one; primary false for an actor that holds nothing is refused. request_id makes the call idempotent: repeating it returns the first assignment and seats nobody else. Requires an organization owner or admin, or the head of the position's department or of a department above it. Errors: 400 INVALID_PARAMS for a missing request_id, a candidate.kind other than member, an empty candidate.actor, a non-boolean primary or an unknown body field; 403 PERMISSION_DENIED; 404 POSITION_NOT_FOUND; 404 ACTOR_NOT_FOUND when the actor is not an active member or agent of your organization; 409 POSITION_FROZEN, POSITION_CLOSED or POSITION_OCCUPIED; 409 PRIMARY_ASSIGNMENT_REQUIRED for primary false on an actor that holds nothing. Example body: {\"candidate\":{\"kind\":\"member\",\"actor\":\"human:usr_123\"},\"request_id\":\"hire-support-1\"}.",
|
|
24005
24126
|
"http": "POST",
|
|
24006
24127
|
"path": "/organization/v1/positions/{id}/hire",
|
|
24007
24128
|
"streaming": "no",
|