Targets & Challenges
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}")Challenges
Section titled “Challenges”get_challenge
Section titled “get_challenge”Get details of a specific challenge.
async def get_challenge(challenge_id: str) -> ChallengeInfo| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
challenge_id | str | Yes | — | Challenge object ID |
Returns: ChallengeInfo
list_challenges
Section titled “list_challenges”List challenges with optional filters.
async def list_challenges( target_id: Optional[str] = None, status: Optional[str] = None, epoch: Optional[int] = None, limit: Optional[int] = None,) -> ListChallengesResponse| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
target_id | str | No | None | Filter by target ID |
status | str | No | None | Filter by challenge status |
epoch | int | No | None | Filter by epoch |
limit | int | No | None | Maximum results |
Returns: ListChallengesResponse