datamint.api.dto
- class datamint.api.dto.BoxPrompt(**data)
Bases:
BaseModelA bounding box prompt, in original image pixel space.
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- x_max: float
- x_min: float
- y_max: float
- y_min: float
- class datamint.api.dto.CreateAnnotationDto(type, identifier, scope, annotation_worklist_id=None, value=None, imported_from=None, import_author=None, frame_index=None, is_model=None, model_id=None, geometry=None, units=None, source=None)
Bases:
object- Parameters:
type (
AnnotationType|str)identifier (
str)scope (
str)annotation_worklist_id (
str|None)imported_from (
str|None)import_author (
str|None)frame_index (
int|None)is_model (
bool|None)model_id (
str|None)geometry (
Geometry|None)units (
str|None)source (
str|None)
- to_dict()
- Return type:
dict[str,Any]
- class datamint.api.dto.InferencePrompts(**data)
Bases:
BaseModelPrompts for promptable segmentation models (e.g. SAM3-based).
At least one of
text,points, orboxesmust be provided. Whether a given deployed model actually uses the prompts is up to that model; a model that doesn’t support prompts simply ignores them.- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- points: list[PointPrompt] | None
- text: str | None
- to_dict()
Return a JSON-compatible dict with only the set fields.
- Return type:
dict
- class datamint.api.dto.PointPrompt(**data)
Bases:
BaseModelA single point prompt, in original image pixel space.
- label
1for foreground,0for background.
- x
X coordinate.
- y
Y coordinate.
- Parameters:
data (
Any)
- label: int
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- x: float
- y: float
- class datamint.api.dto.SaveResultsOptions(**data)
Bases:
BaseModelConfiguration for saving inference results as annotations on Datamint.
These options are only applied when
save_results=Trueon the prediction request.- worklist_id
Annotation worklist ID to associate saved annotations with.
- annotation_source
Source tag for saved annotations. Use
'model_deploy'for deployed model inference or'model_pipeline'for pipeline-based runs.
- imported_from
Free-text describing the origin or context of this inference run.
- author_email
Email to attribute as the author of saved annotations. Defaults to the API key owner if not provided.
- Parameters:
data (
Any)
- annotation_source: Literal['model_pipeline', 'model_deploy'] | None
- author_email: str | None
- imported_from: str | None
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- to_dict()
Return a dict with only the set (non-
None) fields.- Return type:
dict[str,str]
- worklist_id: str | None