# Deepseek Web Fetch

> Common

Submit a web fetch request. `model` is fixed to `deepseek-tools-fetch` and is used only for routing
(stripped before forwarding); `url` is the target page, forwarded to the upstream as-is.

Fetch results depend on the availability and access policy of the target site; the gateway fetch timeout is 60 seconds.

## Endpoint

`POST https://api.modelverse.cn/v1/tools/fetch`

## Request Body

## Responses

- **200** — Fetch result containing the page title and Markdown content.
- **default** — Error response (gateway-side validation/auth errors or upstream non-200, status code and body passed through as-is).
Upstream errors use the OpenAI-compatible format, and `param` is always `null`.

Common errors:

| HTTP status | Description |
|---|---|
| 400 | Invalid request, e.g. missing `url`, non-http/https URL, URL with credentials, or an internal address (blocked by the gateway SSRF check) |
| 401 | Missing or invalid API key |
| 403 | Rejected by the upstream security policy |
| 404 | No usable page content, e.g. URL unavailable, blocked by site policy, target site error, unsupported content type, or no extractable Markdown body |
| 408 | Timed out reading the request body |
| 413 | Request body exceeds the size limit |
| 429 | Rate limit exceeded (including per-target-domain limits) |
| 500 | Internal server error |
| 504 | Downstream request timed out |

Retry after a delay on 408, 429 or 5xx. Do not retry other 4xx errors without changing the request.


## OpenAPI Definition

```json
{
  "openapi": "3.1.0",
  "x-language": "en-US",
  "info": {
    "title": "ModelVerse DeepSeek Tools Fetch API",
    "version": "1.0.0",
    "description": "Self-contained OpenAPI 3.1 schema for the ModelVerse **DeepSeek tools fetch** model.\nUnified endpoint `POST /v1/tools/fetch`; the `model` field in the body selects the provider\n(stripped before forwarding). It fetches a single web page and returns the page title with\nthe body in Markdown format — for reading and content-extraction in agent and RAG applications.\nThe response is non-streaming JSON, forwarded and returned as-is without normalization.\nBilling: per request. A call counts as 1 only when it returns HTTP 200 with non-blank `content`;\nfailed requests, pages with no extractable content and timeouts are not billed.\nSecurity: `url` must use the http/https protocol and resolve to a public address; the gateway\nblocks requests targeting internal/reserved ranges (SSRF protection).\n"
  },
  "servers": [
    {
      "url": "https://api.modelverse.cn",
      "description": "ModelVerse API endpoint."
    }
  ],
  "tags": [
    {
      "name": "Tools Fetch",
      "description": "Web page fetching."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/tools/fetch": {
      "post": {
        "tags": [
          "Tools Fetch"
        ],
        "operationId": "createDeepseekToolsFetch",
        "summary": "Deepseek Web Fetch",
        "description": "Submit a web fetch request. `model` is fixed to `deepseek-tools-fetch` and is used only for routing\n(stripped before forwarding); `url` is the target page, forwarded to the upstream as-is.\n\nFetch results depend on the availability and access policy of the target site; the gateway fetch timeout is 60 seconds.\n",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeepseekFetchRequest"
              },
              "examples": {
                "fetch": {
                  "summary": "Fetch a web page",
                  "value": {
                    "model": "deepseek-tools-fetch",
                    "url": "https://api-docs.deepseek.com/"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Fetch result containing the page title and Markdown content.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeepseekFetchResponse"
                },
                "examples": {
                  "result": {
                    "summary": "Fetch result (excerpt)",
                    "value": {
                      "title": "Your First API Call | DeepSeek API Docs",
                      "content": "# Your First API Call\n\nThe DeepSeek API uses an API format compatible with OpenAI/Anthropic. By modifying the configuration, you can use the OpenAI/Anthropic SDK or software compatible with the OpenAI/Anthropic API to access the DeepSeek API."
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response (gateway-side validation/auth errors or upstream non-200, status code and body passed through as-is).\nUpstream errors use the OpenAI-compatible format, and `param` is always `null`.\n\nCommon errors:\n\n| HTTP status | Description |\n|---|---|\n| 400 | Invalid request, e.g. missing `url`, non-http/https URL, URL with credentials, or an internal address (blocked by the gateway SSRF check) |\n| 401 | Missing or invalid API key |\n| 403 | Rejected by the upstream security policy |\n| 404 | No usable page content, e.g. URL unavailable, blocked by site policy, target site error, unsupported content type, or no extractable Markdown body |\n| 408 | Timed out reading the request body |\n| 413 | Request body exceeds the size limit |\n| 429 | Rate limit exceeded (including per-target-domain limits) |\n| 500 | Internal server error |\n| 504 | Downstream request timed out |\n\nRetry after a delay on 408, 429 or 5xx. Do not retry other 4xx errors without changing the request.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeepseekErrorResponse"
                },
                "examples": {
                  "error": {
                    "summary": "Standard JSON error response",
                    "value": {
                      "error": {
                        "message": "Error description",
                        "type": "invalid_request_error",
                        "param": null,
                        "code": "invalid_request_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key",
        "description": "Platform-issued API key, passed via `Authorization: Bearer <API Key>`."
      }
    },
    "schemas": {
      "DeepseekFetchRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "model",
          "url"
        ],
        "properties": {
          "model": {
            "type": "string",
            "const": "deepseek-tools-fetch",
            "description": "Routing identifier, fixed to `deepseek-tools-fetch`; stripped before forwarding."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "maxLength": 8192,
            "description": "URL of the page to fetch, up to 8192 characters. Must be an HTTP/HTTPS URL with a host, resolve to a public address, and must not contain a username or password."
          }
        }
      },
      "DeepseekFetchResponse": {
        "type": "object",
        "required": [
          "title",
          "content"
        ],
        "properties": {
          "title": {
            "type": "string",
            "description": "Page title; empty string when unavailable."
          },
          "content": {
            "type": "string",
            "description": "Fetched body in Markdown."
          }
        }
      },
      "DeepseekErrorResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/DeepseekError"
          }
        }
      },
      "DeepseekError": {
        "type": "object",
        "required": [
          "message",
          "type",
          "code"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message."
          },
          "type": {
            "type": "string",
            "description": "Error type.",
            "examples": [
              "invalid_request_error"
            ]
          },
          "param": {
            "type": [
              "string",
              "null"
            ],
            "description": "Always `null` in upstream errors."
          },
          "code": {
            "type": "string",
            "description": "Machine-readable error code.",
            "examples": [
              "invalid_request_error"
            ]
          }
        }
      }
    }
  }
}
```
