# ALaaS API > Active Learning as a Service. Send images, get back the most useful ones to > label next. Prepaid credits, plain JSON over HTTPS, no SDK required. > Uploaded images are processed right away and never stored. Base URL: https://api.alaas2.com Machine-readable spec: https://api.alaas2.com/openapi.json Human docs: https://alaas2.com/docs Sign up + API keys: https://alaas2.com (new accounts get 10,000 free credits) ## Auth Send your key as a Bearer token on every request: Authorization: Bearer alaas_live_... ## Quickstart 1. POST /v1/pools {"name": "my-dataset"} -> {"id": } 2. POST /v1/pools/{pool_id}/images (multipart: N `files` + N `external_ids`) -> {"uploaded": N}. Originals are processed and immediately discarded. Note: the first request after idle can take ~1 minute while compute spins up. 3. POST /v1/pools/{pool_id}/select {"n_clusters": 50, "strategy": "coverage"} -> {"selection_id", "representatives": [external_ids...], "outliers": [...]} Strategies: "coverage" (default, label-efficient training) or "explore" (also surfaces edge cases). Selected images never come back in later rounds; repeat calls to progressively cover the dataset. Returns at most as many candidates as there are unselected images left. 4. GET /v1/pools/{pool_id} -> {"total_images", "selected_images", "remaining_images", ...} - progress counters; remaining_images = 0 means the next select would return 409 pool_exhausted. 5. GET /v1/selections/{selection_id} re-fetches a previous result. 6. GET /v1/usage -> {"credits_balance": int} 7. DELETE /v1/pools/{pool_id} -> 204. Permanently removes the pool and all data derived from its images, including past selections. Cannot be undone. ## Pricing (credits, 1 credit = $0.0001) - Image upload: 5 credits per image - Select: 10 per run + 25 per returned candidate - Failed operations are refunded automatically. ## Errors Every error: {"error": {"code": str, "message": str, "details": object|null}} Common codes: 401 invalid_api_key, 402 insufficient_credits, 404 pool_not_found / pool_empty, 409 pool_exhausted.