Rerank, moderation & search

POST /rerank orders up to 1,000 documents by relevance to a query (Cohere-compatible; billed per search unit). POST /moderations classifies text and images with OpenAI's moderation models — free. POST /search/{engine} runs a standalone web search on Tavily, Exa, Perplexity, Parallel or DataForSEO and returns title, url, snippet and page content, billed per query. GET /models?type=rerank|moderation|search lists them with prices.

# Rerank documents for RAG
curl https://api.ultragpt.pro/v1/rerank -H "Authorization: Bearer $ULTRAGPT_API_KEY" -H "Content-Type: application/json" \
  -d '{ "model": "cohere-rerank-v3.5", "query": "capital of France", "documents": ["Paris is...", "Berlin is..."], "top_n": 1 }'

# Moderate text or images (free)
curl https://api.ultragpt.pro/v1/moderations -H "Authorization: Bearer $ULTRAGPT_API_KEY" -H "Content-Type: application/json" \
  -d '{ "model": "omni-moderation-latest", "input": "text to check" }'

# Standalone web search (billed per query)
curl https://api.ultragpt.pro/v1/search/dataforseo-search -H "Authorization: Bearer $ULTRAGPT_API_KEY" -H "Content-Type: application/json" \
  -d '{ "query": "latest AI news", "max_results": 5 }'