Basic Request
Request Parameters
model(required): model inprovider/modelformatquery(required): query used for rankingdocuments(required): array of documents withtext(optionalid,meta)top_n(optional): maximum number of resultsmax_tokens_per_doc(optional): provider-dependent document token cappriority(optional): provider-dependent priority hintreturn_documents(optional): include matched document content in each resultfallbacks(optional): fallback models inprovider/modelformat
Example with Options
Response Shape
Common Validation Errors
- Missing
query->query is required for rerank - Empty
documents->documents are required for rerank - Blank document text ->
document text is required for rerank at index N top_n < 1->top_n must be at least 1
Next Steps
Now that you understand reranking, explore these related topics:Essential Topics
- Multimodal AI - Process images, audio, and multimedia content
- Tool Calling - Enable AI models to use external tools and functions
- Provider Configuration - Multiple providers for redundancy
- Integrations - Drop-in compatibility with existing SDKs
Advanced Topics
- Core Features - Advanced Bifrost capabilities
- Architecture - How Bifrost works internally
- Deployment - Production setup and scaling

