Model Search
client.search.modelSearch(SearchModelSearchParams { originalAssets, originalModels, filter, 11 more } params, RequestOptionsoptions?): SearchHitsOffset<SearchModelSearchResponse { id, authorId, capabilities, 17 more } >
POST/search/models
Search for models.
At least one of the following fields must have a value: query, filter, image, or images.
image, and images are mutually exclusive.
Model Search
import Scenario from '@scenario-labs/sdk';
const client = new Scenario({
apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const searchModelSearchResponse of client.search.modelSearch()) {
console.log(searchModelSearchResponse.id);
}{
"hits": [
{
"id": "id",
"authorId": "authorId",
"capabilities": [
"string"
],
"collectionIds": [
"string"
],
"concepts": [
{
"modelId": "modelId"
}
],
"createdAt": "createdAt",
"exampleAssetIds": [
"string"
],
"name": "name",
"ownerId": "ownerId",
"privacy": "privacy",
"shortDescription": "shortDescription",
"source": "source",
"tags": [
"string"
],
"teamId": "teamId",
"trainingImagesNumber": 0,
"type": "type",
"updatedAt": "updatedAt",
"parentModelId": "parentModelId",
"score": 0,
"thumbnail": {
"assetId": "assetId",
"url": "url"
}
}
],
"limit": 0,
"offset": 0,
"estimatedTotalHits": 0,
"hitsPerPage": 0,
"page": 0,
"totalHits": 0,
"totalPages": 0
}Returns Examples
{
"hits": [
{
"id": "id",
"authorId": "authorId",
"capabilities": [
"string"
],
"collectionIds": [
"string"
],
"concepts": [
{
"modelId": "modelId"
}
],
"createdAt": "createdAt",
"exampleAssetIds": [
"string"
],
"name": "name",
"ownerId": "ownerId",
"privacy": "privacy",
"shortDescription": "shortDescription",
"source": "source",
"tags": [
"string"
],
"teamId": "teamId",
"trainingImagesNumber": 0,
"type": "type",
"updatedAt": "updatedAt",
"parentModelId": "parentModelId",
"score": 0,
"thumbnail": {
"assetId": "assetId",
"url": "url"
}
}
],
"limit": 0,
"offset": 0,
"estimatedTotalHits": 0,
"hitsPerPage": 0,
"page": 0,
"totalHits": 0,
"totalPages": 0
}