Cohere Embed Input Too Long or Too Many Texts Error
Quick answer
Embed accepts at most 96 texts per call, and inputs over the model's token limit either get truncated or fail depending on the truncate setting.
Most likely fix: Batch your inputs
How to fix it
Try these in order — the most common fix is first.
1. Batch your inputs
- Split your list into chunks of 96 or fewer
- Send each chunk and concatenate the embeddings in order
Did this fix it?2. Set truncate deliberately
- truncate defaults to END (drops the end of long text)
- Use START to drop the beginning instead
- NONE returns an error on over-length input, useful to detect it
Did this fix it?3. Chunk long documents
- Split text into passages before embedding
- Embed each passage with input_type search_document
- Use input_type search_query for queries
Did this fix it?
Symptoms
Embed returns a 400 or 422 error about input size or token count, or results look cut off.
Why it happens
- More than 96 texts in one request
- Input longer than the model's max token length with truncate set to NONE
- Missing input_type on v3 and newer models
- Wrong embedding_types value for older models
This guide also covers
- cohere embed too many tokens
- cohere embed 96 texts
- cohere embed truncate
- cohere embed input_type
Still not working?
If Cohere keeps failing, you're not alone. See every Cohere problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to usThe same problem in other apps
All not loading, error messages & connection guides →
Claude API 529 Overloaded Error (Anthropic Claude)
Other Cohere errors
- Cohere API 429 Too Many Requests Error
- Cohere Trial Key Limits and 'Not for Production' Error
- Cohere 401 Invalid API Token Error
- Cohere Model Not Found Error (Deprecated Models)
- Cohere Rerank API Errors and Truncated Documents
- Cohere API 500 / 503 / 504 Server Errors
- Cohere 'Too Many Tokens' Context Length Error
- How to Cancel Cohere (Delete Account and Stop Billing)