Web and Gemini Overview
Web and Gemini-compatible capabilities cover web search, web reading and Gemini format content generation. They are suitable for applications that require web information, body extracts, text understanding or Gemini compatible access.
Search page search Find candidate web pages, summaries and related information by keyword.Read Read Extract a web page's main content as Markdown, text or JSON.GeminiGemini-compatible uses Gemini style paths and request body for content generation.
Route List
| Methodology | Path | Purpose |
|---|---|---|
POST | /v1/web-search/search | Web search. |
POST | /v1/web-reader/read | Read the page. |
POST | /v1beta/models/{model}:generateContent | Gemini media understand. |
POST | /v1beta/models/{modelName}:generateContent | Generates in Gemini format. |
Web Search
bash
curl https://moonnexai.com/v1/web-search/search \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"query": "MoonNexAI API documentation",
"area": "global",
"count": 10,
"format": "json"
}'Web Read
bash
curl https://moonnexai.com/v1/web-reader/read \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/article",
"format": "md",
"liteMode": true,
"includeImages": true
}'Gemini-compatible
bash
curl https://moonnexai.com/v1beta/models/gemini-compatible:generateContent \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "写一段简短的产品介绍。"
}
]
}
]
}'Use recommendations
- The search for API is suitable for candidate pages and abstracts, and the reading of API is suitable for extracting the main text of the specified web page.
- When the same page is processed on several occasions, it is recommended that the reading results be Cacheed.
- The model name in the Gemini-compatible path should be consistent with the model available in the MoonNexAI console.
- Pictures, PDF, audio or video input suggest that the file be kept in size to avoid an oversized request.