Inference Logoinference.sh

Search

Hybrid keyword and semantic search across apps, skills, knowledge, and published pages.

Search concept — collections, suggest vs search, and workspace discovery


Suggest

GET /suggest or POST /suggest

Unified search for UI autocomplete and discovery. Returns actionable results ranked globally by relevance score across apps, skills, knowledge, and published pages.

Authentication is optional. Without a token, results are limited to public skills and apps. With a token, knowledge entries in your namespace are included.

Query Parameters (GET)

FieldTypeRequiredDescription
qstringYesSearch query
limitintegerNoMax results

Request Body (POST)

GET only reads q. Use POST for limit, category, and agent.

json
1{2  "query": "flux",3  "limit": 10,4  "category": "app",5  "agent": false6}
FieldTypeDefaultDescription
querystringSearch query (required)
limitinteger3 (all categories) or 10 (single category)Max total results after global ranking and dedup
categorystringempty = allFilter to app, skill, or knowledge. Invalid values return 400
agentbooleanfalseAgent mode: full descriptions (no 200-rune truncation) for programmatic consumers

Response

With X-API-Version: 2 (recommended):

json
1{2  "query": "flux",3  "results": [4    {5      "type": "app",6      "name": "pruna/flux-dev",7      "description": "Advanced text-to-image generation...",8      "command": "belt app run pruna/flux-dev",9      "score": 0.9210    },11    {12      "type": "skill",13      "name": "myteam/code-review",14      "description": "Guidelines for reviewing pull requests",15      "command": "belt skill use myteam/code-review",16      "score": 0.8517    }18  ]19}
FieldDescription
typeResult category: app, skill, knowledge, or page subtype (doc, blog, …)
nameDisplay name or namespace/name for entities
descriptionShort summary (truncated to 200 runes unless agent: true)
commandSuggested CLI command or doc URL
scoreRelevance score (0–1)

Results below the relevance floor (default 0.8) are omitted from /suggest responses. When the same base name appears under multiple namespaces, only the highest-scoring variant is returned. Lower-scoring hits may still appear in GET /search when you need broader recall.

Without X-API-Version: 2, the same payload is wrapped in { "success": true, "data": { ... } }. See REST overview — API version.

Example

bash
1curl "https://api.inference.sh/suggest?q=flux&limit=5" \2  -H "X-API-Version: 2"
bash
1curl -X POST https://api.inference.sh/suggest \2  -H "Content-Type: application/json" \3  -H "X-API-Version: 2" \4  -d '{"query": "flux", "limit": 5, "agent": true}'

GET /search or POST /search

Direct search with collection and filter control. Returns scored hits with entity metadata.

Query Parameters (GET)

FieldTypeRequiredDescription
qstringYesSearch query
collectionsstringNoComma-separated collections: apps, skills, knowledge, pages
limitintegerNoMax results per collection

Request Body (POST)

json
1{2  "query": "payment processing",3  "collections": ["knowledge", "skills"],4  "limit": 205}

Response

With X-API-Version: 2 (recommended):

json
1{2  "query": "payment processing",3  "results": [4    {5      "collection": "knowledge",6      "id": "know_abc123",7      "score": 0.87,8      "fields": {9        "name": "stripe-webhooks",10        "namespace": "myteam",11        "description": "Stripe webhook handling patterns",12        "type": "reference",13        "parent_id": "know_abc123",14        "updated_at": 177073201915      }16    }17  ]18}

Without X-API-Version: 2, the same payload is wrapped in { "success": true, "data": { ... } }. See REST overview — API version.

FieldDescription
collectionSource collection (apps, skills, knowledge, pages)
idEntity ID
scoreRelevance score (0–1)
fieldsCollection-specific metadata (name, namespace, description, tags, etc.)

Example

bash
1curl "https://api.inference.sh/search?q=flux&collections=apps,skills&limit=10" \2  -H "X-API-Version: 2"
bash
1curl -X POST https://api.inference.sh/search \2  -H "Authorization: Bearer inf_your_key" \3  -H "X-API-Version: 2" \4  -H "Content-Type: application/json" \5  -d '{6    "query": "payment processing",7    "collections": ["knowledge"],8    "limit": 209  }'

Use an API key when searching private knowledge entries. Public apps and skills are searchable without authentication.


Collections

CollectionContents
appsApps in the grid
skillsSkills from the registry and your team
knowledgeObservations, references, preferences (requires auth for private entries)
pagesPublished documentation and blog posts

Search combines keyword matching with semantic similarity. Newly created entities are keyword-searchable immediately; semantic ranking improves after background embedding completes.

If query embedding fails or times out, the API returns keyword-only results for that request (no semantic re-ranking).


  • Search concept — when to use suggest vs search and what each collection contains
  • Skills — list, create, and manage skills
  • Knowledge — manage knowledge entries that appear in search

we use cookies

we use cookies to ensure you get the best experience on our website. for more information on how we use cookies, please see our cookie policy.

by clicking "accept", you agree to our use of cookies.
learn more.