Targets
Targets
Section titled “Targets”list_targets
Section titled “list_targets”List targets with optional filters. Returns paginated results.
async def list_targets( status: Optional[str] = None, epoch: Optional[int] = None, limit: Optional[int] = None, read_mask: Optional[str] = None,) -> ListTargetsResponse| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
status | str | No | None | Filter: "open", "filled", or "claimed" |
epoch | int | No | None | Filter by generation epoch |
limit | int | No | None | Maximum results per page |
read_mask | str | No | None | Field mask for partial responses |
Returns: ListTargetsResponse
Example
Section titled “Example”response = await client.list_targets(status="open", limit=10)for target in response.targets: print(f"{target.id}: threshold={target.distance_threshold}")get_targets
Section titled “get_targets”Get a flat list of targets (unwrapped from pagination).
async def get_targets( status: Optional[str] = None, epoch: Optional[int] = None, limit: Optional[int] = None,) -> list[Target]| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
status | str | No | None | Filter: "open", "filled", or "claimed" |
epoch | int | No | None | Filter by generation epoch |
limit | int | No | None | Maximum results |
Returns: list[Target]
Model Manifests
Section titled “Model Manifests”get_model_manifests
Section titled “get_model_manifests”Fetch weight manifests for models. Accepts either a list of model IDs or a Target object (uses its model_ids).
async def get_model_manifests( model_ids_or_target: Union[list[str], Target],) -> list[ModelManifest]| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model_ids_or_target | list[str] | Target | Yes | - | Model IDs or a Target object |
Returns: list[ModelManifest]
Example
Section titled “Example”targets = await client.get_targets(status="open", limit=1)manifests = await client.get_model_manifests(targets[0])for m in manifests: print(f"URL: {m.url}, size: {m.size}")Fetching Data
Section titled “Fetching Data”fetch_model
Section titled “fetch_model”Download model weights via the fullnode network.
async def fetch_model(model_id: str) -> bytes| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model_id | str | Yes | - | Model object ID |
Returns: bytes. Raw (encrypted) model weights.
fetch_submission_data
Section titled “fetch_submission_data”Download submission data for a filled target via the fullnode network.
async def fetch_submission_data(target_id: str) -> bytes| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
target_id | str | Yes | - | Target object ID |
Returns: bytes. Raw submission data.