Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.21.0
0.22.0
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "arkruntime"
version = "0.21.0"
version = "0.22.0"
description = "Ark runtime SDK for Python"
readme = "README.md"
requires-python = ">=3.8"
Expand Down
53 changes: 51 additions & 2 deletions src/arkruntime/resources/content_generation/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from ...types.content_generation.create_content_generation_task_response import CreateContentGenerationTaskResponse
from ...types.content_generation.list_content_generation_tasks_response import ListContentGenerationTasksResponse
from ...types.content_generation.reasoning_effort import ReasoningEffort
from ...types.content_generation.task_status import TaskStatus
from ...types.content_generation.tool_param import ToolParam

# AUTOGEN-END create-imports
Expand Down Expand Up @@ -50,6 +51,13 @@ def create(
frames: Optional[int] = None,
subdivision_level: Optional[str] = None,
file_format: Optional[str] = None,
texture: Optional[bool] = None,
geometry_quality: Optional[str] = None,
geometry_detail: Optional[str] = None,
face: Optional[int] = None,
texture_resolution: Optional[str] = None,
preserve_uv: Optional[bool] = None,
priority: Optional[int] = None,
draft: Optional[bool] = None,
optimize_prompt: Optional[bool] = None,
tools: Optional[List[ToolParam]] = None,
Expand Down Expand Up @@ -82,6 +90,13 @@ def create(
"frames": frames,
"subdivision_level": subdivision_level,
"file_format": file_format,
"texture": texture,
"geometry_quality": geometry_quality,
"geometry_detail": geometry_detail,
"face": face,
"texture_resolution": texture_resolution,
"preserve_uv": preserve_uv,
"priority": priority,
"draft": draft,
"optimize_prompt": optimize_prompt,
"tools": tools,
Expand Down Expand Up @@ -125,10 +140,15 @@ def list(
# AUTOGEN-START list-kwargs
page_num: Optional[int] = None,
page_size: Optional[int] = None,
status: Optional[Literal["queued", "running", "cancelled", "succeeded", "failed"]] = None,
status: Optional[Literal["queued", "running", "cancelled", "succeeded", "failed", "expired"]] = None,
task_ids: Optional[List[str]] = None,
model: Optional[str] = None,
service_tier: Optional[str] = None,
endpoint_model: Optional[str] = None,
statuses: Optional[List[TaskStatus]] = None,
limit: Optional[int] = None,
after: Optional[str] = None,
order: Optional[Literal["asc", "desc"]] = None,
# AUTOGEN-END list-kwargs
extra_headers: Headers | None = None,
extra_query: Query | None = None,
Expand All @@ -151,6 +171,11 @@ def list(
"filter.task_ids": task_ids,
"filter.model": model,
"filter.service_tier": service_tier,
"model": endpoint_model,
"filter.statuses": statuses,
"limit": limit,
"after": after,
"order": order,
# AUTOGEN-END list-query
},
dict,
Expand Down Expand Up @@ -201,6 +226,13 @@ async def create(
frames: Optional[int] = None,
subdivision_level: Optional[str] = None,
file_format: Optional[str] = None,
texture: Optional[bool] = None,
geometry_quality: Optional[str] = None,
geometry_detail: Optional[str] = None,
face: Optional[int] = None,
texture_resolution: Optional[str] = None,
preserve_uv: Optional[bool] = None,
priority: Optional[int] = None,
draft: Optional[bool] = None,
optimize_prompt: Optional[bool] = None,
tools: Optional[List[ToolParam]] = None,
Expand Down Expand Up @@ -233,6 +265,13 @@ async def create(
"frames": frames,
"subdivision_level": subdivision_level,
"file_format": file_format,
"texture": texture,
"geometry_quality": geometry_quality,
"geometry_detail": geometry_detail,
"face": face,
"texture_resolution": texture_resolution,
"preserve_uv": preserve_uv,
"priority": priority,
"draft": draft,
"optimize_prompt": optimize_prompt,
"tools": tools,
Expand Down Expand Up @@ -276,10 +315,15 @@ async def list(
# AUTOGEN-START list-kwargs
page_num: Optional[int] = None,
page_size: Optional[int] = None,
status: Optional[Literal["queued", "running", "cancelled", "succeeded", "failed"]] = None,
status: Optional[Literal["queued", "running", "cancelled", "succeeded", "failed", "expired"]] = None,
task_ids: Optional[List[str]] = None,
model: Optional[str] = None,
service_tier: Optional[str] = None,
endpoint_model: Optional[str] = None,
statuses: Optional[List[TaskStatus]] = None,
limit: Optional[int] = None,
after: Optional[str] = None,
order: Optional[Literal["asc", "desc"]] = None,
# AUTOGEN-END list-kwargs
extra_headers: Headers | None = None,
extra_query: Query | None = None,
Expand All @@ -302,6 +346,11 @@ async def list(
"filter.task_ids": task_ids,
"filter.model": model,
"filter.service_tier": service_tier,
"model": endpoint_model,
"filter.statuses": statuses,
"limit": limit,
"after": after,
"order": order,
# AUTOGEN-END list-query
},
dict,
Expand Down
5 changes: 5 additions & 0 deletions src/arkruntime/types/content_generation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
from .create_content_generation_task_request import CreateContentGenerationTaskRequest
from .create_content_generation_task_response import CreateContentGenerationTaskResponse
from .draft_task import DraftTask
from .file_url import FileURL
from .image_role import ImageRole
from .image_url import ImageURL
from .list_content_generation_tasks_response import ListContentGenerationTasksResponse
from .list_order import ListOrder
from .reasoning_effort import ReasoningEffort
from .task_content import TaskContent
from .task_error import TaskError
Expand All @@ -37,9 +39,11 @@
"CreateContentGenerationTaskRequest",
"CreateContentGenerationTaskResponse",
"DraftTask",
"FileURL",
"ImageRole",
"ImageURL",
"ListContentGenerationTasksResponse",
"ListOrder",
"ReasoningEffort",
"TaskContent",
"TaskError",
Expand All @@ -57,6 +61,7 @@
CreateContentGenerationTaskRequestParam,
)
from .draft_task_param import DraftTaskParam
from .file_url_param import FileURLParam
from .image_url_param import ImageURLParam
from .tool_param import ToolParam
from .tool_type_param import ToolTypeParam
Expand Down
12 changes: 12 additions & 0 deletions src/arkruntime/types/content_generation/content_generation_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@ class ContentGenerationTask(BaseModel):
"""
File format echoed back.
"""
file_format: Optional[str] = None
"""
Output file format of a 3D generation task.
"""
texture_resolution: Optional[str] = None
"""
Texture resolution actually used by a 3D generation task.
"""
priority: Optional[int] = None
"""
Execution priority echoed back.
"""
service_tier: Optional[str] = None
"""
Service tier the task was scheduled on.
Expand Down
13 changes: 11 additions & 2 deletions src/arkruntime/types/content_generation/content_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
from .audio_url import AudioURL
from .content_type import ContentType
from .draft_task import DraftTask
from .file_url import FileURL
from .image_url import ImageURL
from .video_url import VideoURL


class ContentItem(BaseModel):
"""
One element of a generation request `content` list. Exactly one of
`text` / `image_url` / `video_url` / `audio_url` / `draft_task` must be
`text` / `image_url` / `video_url` / `audio_url` / `draft_task` /
`file_url` must be
set, matching the value of `type`.
"""

Expand Down Expand Up @@ -48,7 +50,14 @@ class ContentItem(BaseModel):
"""
Draft-task reference. Required when `type` is `draft_task`.
"""
file_url: Optional[FileURL] = None
"""
File content. Required when `type` is `file_url`.
"""
role: Optional[str] = None
"""
Optional role tag (e.g. `first_frame`, `reference_image`).
Optional role tag (e.g. `first_frame`, `reference_image`). 3D generation
uses `front_view` / `back_view` / `left_view` / `right_view` /
`top_view` / `bottom_view` for images and `mesh_to_texture` for the mesh
file.
"""
14 changes: 12 additions & 2 deletions src/arkruntime/types/content_generation/content_item_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
from .audio_url_param import AudioURLParam
from .content_type import ContentType
from .draft_task_param import DraftTaskParam
from .file_url_param import FileURLParam
from .image_url_param import ImageURLParam
from .video_url_param import VideoURLParam


class ContentItemParam(TypedDict, total=False):
"""
One element of a generation request `content` list. Exactly one of
`text` / `image_url` / `video_url` / `audio_url` / `draft_task` must be
`text` / `image_url` / `video_url` / `audio_url` / `draft_task` /
`file_url` must be
set, matching the value of `type`.
"""

Expand All @@ -42,5 +44,13 @@ class ContentItemParam(TypedDict, total=False):
draft_task: Optional[DraftTaskParam]
"""Draft-task reference. Required when `type` is `draft_task`."""

file_url: Optional[FileURLParam]
"""File content. Required when `type` is `file_url`."""

role: Optional[str]
"""Optional role tag (e.g. `first_frame`, `reference_image`)."""
"""
Optional role tag (e.g. `first_frame`, `reference_image`). 3D generation
uses `front_view` / `back_view` / `left_view` / `right_view` /
`top_view` / `bottom_view` for images and `mesh_to_texture` for the mesh
file.
"""
1 change: 1 addition & 0 deletions src/arkruntime/types/content_generation/content_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ class ContentType(str, Enum):
video_url = "video_url"
audio_url = "audio_url"
draft_task = "draft_task"
file_url = "file_url"
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,36 @@ class CreateContentGenerationTaskRequest(BaseModel):
"""
Output file format (e.g. `mp4`, `glb`).
"""
texture: Optional[bool] = None
"""
3D generation with image-only input: `false` generates an untextured
mesh, omitted or `true` generates a textured model.
"""
geometry_quality: Optional[str] = None
"""
3D geometry quality tier: `low`, `medium`, `high`, `xhigh` or `ultra`.
"""
geometry_detail: Optional[str] = None
"""
3D surface detail: `smooth` or `micro`. Only valid when
`geometry_quality` is `high`, `xhigh` or `ultra`.
"""
face: Optional[int] = None
"""
Target face count of the 3D mesh, within the range of `geometry_quality`.
"""
texture_resolution: Optional[str] = None
"""
3D texture resolution: `4k` or `8k`.
"""
preserve_uv: Optional[bool] = None
"""
Keep the UV layout of the input mesh when texturing it.
"""
priority: Optional[int] = None
"""
Execution priority within the endpoint queue, 0-9; higher runs first.
"""
draft: Optional[bool] = None
"""
Mark this task as a draft (cheaper, lower-quality).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,33 @@ class CreateContentGenerationTaskRequestParam(TypedDict, total=False):
file_format: Optional[str]
"""Output file format (e.g. `mp4`, `glb`)."""

texture: Optional[bool]
"""
3D generation with image-only input: `false` generates an untextured
mesh, omitted or `true` generates a textured model.
"""

geometry_quality: Optional[str]
"""3D geometry quality tier: `low`, `medium`, `high`, `xhigh` or `ultra`."""

geometry_detail: Optional[str]
"""
3D surface detail: `smooth` or `micro`. Only valid when
`geometry_quality` is `high`, `xhigh` or `ultra`.
"""

face: Optional[int]
"""Target face count of the 3D mesh, within the range of `geometry_quality`."""

texture_resolution: Optional[str]
"""3D texture resolution: `4k` or `8k`."""

preserve_uv: Optional[bool]
"""Keep the UV layout of the input mesh when texturing it."""

priority: Optional[int]
"""Execution priority within the endpoint queue, 0-9; higher runs first."""

draft: Optional[bool]
"""Mark this task as a draft (cheaper, lower-quality)."""

Expand Down
16 changes: 16 additions & 0 deletions src/arkruntime/types/content_generation/file_url.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Generated by datamodel-code-generator from ark-apis typespec/openapi.
# DO NOT EDIT — regenerate with `make gen-py-<api>` in ark-apis.
#
# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates.
# SPDX-License-Identifier: Apache-2.0

from __future__ import annotations

from arkruntime._models import BaseModel


class FileURL(BaseModel):
url: str
"""
URL of the file asset (e.g. a GLB mesh for 3D generation).
"""
14 changes: 14 additions & 0 deletions src/arkruntime/types/content_generation/file_url_param.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated by datamodel-code-generator from ark-apis typespec/openapi.
# DO NOT EDIT — regenerate with `make gen-py-<api>` in ark-apis.
#
# Copyright (c) 2026 ByteDance Ltd. and/or its affiliates.
# SPDX-License-Identifier: Apache-2.0

from __future__ import annotations

from typing_extensions import Required, TypedDict


class FileURLParam(TypedDict, total=False):
url: Required[str]
"""URL of the file asset (e.g. a GLB mesh for 3D generation)."""
Loading
Loading