DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to serve a search API from one YAML file with Txtai

Configure an embeddings model in app.yml and expose it over HTTP.

Short answer: Install with pip install txtai; then create app.yml with an embeddings: entry whose path: is sentence-transformers/all-MiniLM-L6-v2; start the API with CONFIG=app.yml uvicorn "txtai.api:app". All steps.

  • Research
  • Intermediate
  • 30 minutes
  • From the README
  • Claude Code
  • Codex
  • Cursor
  • Gemini CLI

Who it is forA developer who wants to call search from any language.

The problemWrapping a search library in your own web service takes boilerplate.

The outcomeA local API answering search queries via curl.

What you need first

  • Python 3.11 or newer and pip
  • A virtual environment is recommended
  • Optional uvicorn for the API

Steps

  1. Install with pip install txtai
  2. Create app.yml with an embeddings: entry whose path: is sentence-transformers/all-MiniLM-L6-v2
  3. Start the API with CONFIG=app.yml uvicorn "txtai.api:app"
  4. Query it with curl -X GET "http://localhost:8000/search?query=positive"

Prompt for your agent

With neuml/txtai, write app.yml using sentence-transformers/all-MiniLM-L6-v2, start `CONFIG=app.yml uvicorn "txtai.api:app"` and test with `curl -X GET "http://localhost:8000/search?query=positive"`.

Caveat. The README example only configures embeddings; load documents into the index before expecting results.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for neuml/txtai and "Serve a search API from one YAML file"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer