News for hackers. Stuff that matters.

Show HN: Catsu: A unified Python client for embedding APIs

https://catsu.dev

We open-sourced catsu, a Python client for embedding APIs.

The problem: every embedding provider has a different SDK with different bugs. OpenAI has undocumented token limits. VoyageAI's retry logic was broken until September. Cohere breaks downstream libraries every release. LiteLLM's embedding support is minimal.

catsu provides:

- One API for 11 providers (OpenAI, Voyage, Cohere, Jina, Mistral, Gemini, etc.)

- Bundled database of 50+ models with pricing, dimensions, and benchmark scores

- Built-in retry with exponential backoff

- Automatic cost tracking per request

- Full async support

Example:

```python

import catsu

client = catsu.Client()

response = client.embed(model="voyage-3", input="Hello!")

print(f"Cost: ${response.embeddings}")

print(f"Cost: ${response.usage.cost:.6f}")

```

GitHub: https://github.com/chonkie-inc/catsu

We built this at Chonkie (YC X25) because we needed it badly for our chunking library and to easily switch embeddings for our search product. Apache 2.0.

( 5 comments | 7 points | on HN )
Re:Show HN: Catsu: A unified Python client for embedding APIs by zerodayz on Wednesday December 17, 2025 @05:01PM (#46306181)
this is huge, been wrangling with embedding libraries lately so will def try this out
Re:Show HN: Catsu: A unified Python client for embedding APIs by bhavnicksm on Wednesday December 17, 2025 @05:04PM (#46306205)
thanks! this is still pretty early, please let us know if you face any issues with the library, database or anything else :)
Re:Show HN: Catsu: A unified Python client for embedding APIs by lennertjansen on Wednesday December 17, 2025 @04:52PM (#46306062)
nice, this is an annoying problem. does it also provide fallback to switch providers when one isn't available?
Re:Show HN: Catsu: A unified Python client for embedding APIs by bhavnicksm on Wednesday December 17, 2025 @05:02PM (#46306189)
it doesn't right now, but the fallback feature is planned for in a future release. mostly because there's no simple way to handle the classic fallbacks like aws, gcp and azure, and we wanted to spend some time thinking about their DX.
Re:Show HN: Catsu: A unified Python client for embedding APIs by citcho on Wednesday December 17, 2025 @06:04PM (#46306824)
nice library, was looking for something like this for a while, thanks for building this