Skip to content

fix(web): clean up API docs — parameterized /tile path, truthful examples, image-query one-liner#19

Merged
andylizf merged 1 commit into
mainfrom
fix/docs-tile-endpoint
Jun 4, 2026
Merged

fix(web): clean up API docs — parameterized /tile path, truthful examples, image-query one-liner#19
andylizf merged 1 commit into
mainfrom
fix/docs-tile-endpoint

Conversation

@andylizf
Copy link
Copy Markdown
Contributor

@andylizf andylizf commented Jun 4, 2026

What

  • /tile endpoint listing: show the parameterized path /tile/{article_id}/{tile_index}/{chunk_index} in the sidebar/endpoint list instead of a hardcoded concrete ID, and move it up next to /search (it's step 2 of the search flow; /status and /health go after).
  • Fix wrong example IDs: the docs claimed tile 2840114/0/0 is the top of the Albert Einstein article — it's actually Fresno_State–Hawaii_football_rivalry. Einstein is 698618/0/0 (verified by fetching the tile). The quickstart's photosynthesis example now shows the real top hit (5878188/1/0, the Photosynthesis article — verified live).
  • Image-query example: add a copy-pasteable one-liner that base64-encodes a local file inline and POSTs it:
    curl -X POST https://pixelrag.ai/api/search \
      -H "Content-Type: application/json" \
      -d "{\"queries\": [{\"image\": \"$(base64 < photo.jpg | tr -d '\n')\"}], \"n_docs\": 5}"
    (base64 < file | tr -d '\n' is portable across Linux and macOS.)

Verification

  • tsc --noEmit passes.
  • The image-query example was executed verbatim as rendered against the live API; querying with a thumbnail of a tile returns the tile's source article among the top hits.
  • Both new example tiles (698618/0/0 Einstein, 5878188/1/0 Photosynthesis) fetched and visually confirmed.

- Show the /tile endpoint as a parameterized path (/tile/{article_id}/...)
  instead of a hardcoded concrete ID, and move it next to /search since
  it is step 2 of the search flow.
- Fix wrong example IDs: 2840114 is Fresno_State-Hawaii_football_rivalry,
  not Albert Einstein (which is 698618). The photosynthesis example now
  shows the real top hit (5878188/1/0).
- Add a copy-pasteable image-query example: base64-encode a local file
  inline and POST it (verified live against the API).
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Jun 4, 2026 9:43am

@andylizf andylizf merged commit b7ba12f into main Jun 4, 2026
6 checks passed
@andylizf andylizf deleted the fix/docs-tile-endpoint branch June 4, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant