> For the complete documentation index, see [llms.txt](https://raic-labs.gitbook.io/raic-fed/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://raic-labs.gitbook.io/raic-fed/api-reference/04a-foundry-api/scout-models.md).

# Scout Models

## Get Scout Models

> Get a paginated list of scout models.

```json
{"openapi":"3.1.0","info":{"title":"Foundry Api","version":"0.1.0"},"servers":[{"url":"/foundry"}],"paths":{"/scout_models":{"get":{"tags":["scout_models"],"summary":"Get Scout Models","description":"Get a paginated list of scout models.","operationId":"get_scout_models_scout_models_get","parameters":[{"name":"sort","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortDirection","default":"desc"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"The number of results to skip","default":0,"title":"Skip"},"description":"The number of results to skip"},{"name":"top","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"The number of results to return","default":25,"title":"Top"},"description":"The number of results to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponse_ScoutModelSummaryResponse_"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"SortDirection":{"type":"string","enum":["asc","desc"],"title":"SortDirection"},"PagedResponse_ScoutModelSummaryResponse_":{"properties":{"total":{"type":"integer","title":"Total"},"pageLength":{"type":"integer","title":"Pagelength"},"pageItems":{"items":{"$ref":"#/components/schemas/ScoutModelSummaryResponse"},"type":"array","title":"Pageitems"}},"type":"object","required":["total","pageLength","pageItems"],"title":"PagedResponse[ScoutModelSummaryResponse]"},"ScoutModelSummaryResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"createdOn":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdon"}},"type":"object","required":["id","name","createdOn"],"title":"ScoutModelSummaryResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Get Scout Models Coverage

> List scout models augmented with a scene-count computed inside the required TOI (and optional AOI).\
> \
> Used by the search-creation UI to preview which scout models actually have imagery\
> inside the user's currently-selected temporal and spatial extent, before they submit\
> a search.\
> \
> The scene count for each scout model is computed via the STAC API's\
> \`\`count\_source\_imagery\_items\`\` helper, which uses \`\`numberMatched\`\` on a\
> \`\`limit=1\`\` search request — so each per-model count is a cheap metadata\
> lookup rather than a scan of \`\`raic.metadetections\`\`. All per-model counts\
> run concurrently against a single \`\`StacClient\`\`.\
> \
> \- \`\`toi\`\` is optional; when provided, \`\`toi.start\`\` / \`\`toi.end\`\` are still\
> &#x20; individually optional and any omitted bound stays open. When both are\
> &#x20; provided, \`\`end\`\` must be ≥ \`\`start\`\`.\
> \- \`\`aoi\`\` is optional; when omitted, coverage is computed across all space.\
> \
> Uses POST rather than GET so the AOI GeoJSON geometry can be sent in the request\
> body — mirroring the shape accepted by \`\`POST /search\`\`.

```json
{"openapi":"3.1.0","info":{"title":"Foundry Api","version":"0.1.0"},"servers":[{"url":"/foundry"}],"paths":{"/scout_models/coverage":{"post":{"tags":["scout_models"],"summary":"Get Scout Models Coverage","description":"List scout models augmented with a scene-count computed inside the required TOI (and optional AOI).\n\nUsed by the search-creation UI to preview which scout models actually have imagery\ninside the user's currently-selected temporal and spatial extent, before they submit\na search.\n\nThe scene count for each scout model is computed via the STAC API's\n``count_source_imagery_items`` helper, which uses ``numberMatched`` on a\n``limit=1`` search request — so each per-model count is a cheap metadata\nlookup rather than a scan of ``raic.metadetections``. All per-model counts\nrun concurrently against a single ``StacClient``.\n\n- ``toi`` is optional; when provided, ``toi.start`` / ``toi.end`` are still\n  individually optional and any omitted bound stays open. When both are\n  provided, ``end`` must be ≥ ``start``.\n- ``aoi`` is optional; when omitted, coverage is computed across all space.\n\nUses POST rather than GET so the AOI GeoJSON geometry can be sent in the request\nbody — mirroring the shape accepted by ``POST /search``.","operationId":"get_scout_models_coverage_scout_models_coverage_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoutModelsCoverageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ScoutModelCoverageResponse"},"type":"array","title":"Response Get Scout Models Coverage Scout Models Coverage Post"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ScoutModelsCoverageRequest":{"properties":{"toi":{"anyOf":[{"$ref":"#/components/schemas/ToiRequest"},{"type":"null"}]},"aoi":{"anyOf":[{"$ref":"#/components/schemas/CoverageAoiRequest"},{"type":"null"}]}},"type":"object","title":"ScoutModelsCoverageRequest","description":"Request body for the scout-model coverage endpoint.\n\nBoth ``toi`` and ``aoi`` are optional. When ``toi`` is provided,\n``toi.start`` / ``toi.end`` are still individually optional; when both are\nprovided, ``end`` must be ≥ ``start``. When ``aoi`` is omitted, coverage\nis computed across all space."},"ToiRequest":{"properties":{"start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End"}},"type":"object","title":"ToiRequest","description":"Time of Interest request class for handling datetime ranges.\n\n`start` and `end` can be:\n- An ISO 8601 datetime (e.g., \"2018-02-12T00:00:00Z\")\n- None to specify an open interval\n\nArgs:\n    start: The start of the time range (None for open start interval)\n    end: The end of the time range (None for open end interval)\n\nThe string representation of a TOI is \"start/end\", where each part can be an ISO datetime or \"..\" for open intervals when start or end is None.\n\nString Examples:\n- `\"2018-02-12T00:00:00+00:00/2018-03-18T12:31:12+00:00\"`\n- `\"../2018-03-18T12:31:12+00:00\"` if start is None\n- `\"2018-02-12T00:00:00+00:00/..\"` if end is None"},"CoverageAoiRequest":{"properties":{"geometry":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Geometry"}},"type":"object","title":"CoverageAoiRequest","description":"AOI input for the scout-model coverage endpoint.\n\nOnly ``geometry`` is accepted here. The coverage endpoint counts source-imagery\nSTAC items directly via the STAC API (no server-side AOI STAC item is created),\nso the ``stac_item_id`` / ``stac_collection_id`` fields supported by\n:class:`AoiRequest` do not apply and are intentionally omitted."},"ScoutModelCoverageResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"createdOn":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdon"},"sceneCount":{"type":"integer","title":"Scenecount"}},"type":"object","required":["id","name","createdOn","sceneCount"],"title":"ScoutModelCoverageResponse","description":"A scout model plus coverage statistics inside the requested TOI/AOI."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```
