resource: download attachments
Download paper images and other binary attachments by relative file_name.
Overview
The resource API retrieves document attachments such as paper figures, experiment images, and parsed diagrams. file_name usually comes from search results, parsed output, or image paths in full text; pass only the relative path, not a full URL. Responses are binary streams with Content-Type and Content-Disposition headers.
Not for
- · Do not use it to search for images or discover papers; first find resource paths through agentic-search, meta-search, or content.
- · Do not use it to interpret images; an upper-layer multimodal model handles understanding.
- · Do not use it to read source text; use content.
Capability boundaries
- · resource accepts only safe relative file_name values, not full URLs, absolute paths, .., or backslashes.
- · Responses are usually binary content such as image/png, image/jpeg, or application/pdf.
- · Resource availability depends on document parsing output and account permissions.
- · Callers should inspect content-type and response status before displaying or saving the resource.
Authentication
Use API key Bearer token authentication for all requests. Add this HTTP header:
Authorization: Bearer YOUR_API_TOKEN
Request example
curl -G https://api.sciverse.space/resource \
-H "Authorization: Bearer YOUR_API_TOKEN" \
--data-urlencode "file_name=papers/2025/abcd/fig1.png" \
-o fig1.pngRequest parameters (URL query)
| Field | Type | Required | Description |
|---|---|---|---|
| file_name | string | Required | Relative resource path; must not contain \, .., or start with /. |
Response structure
The response is a binary stream; common Content-Type values include image/jpeg, image/png, and application/pdf.
| Field | Type | Description |
|---|---|---|
| Content-Type | header | MIME type of the attachment. |
| Content-Disposition | header | Filename and download hint. |
| X-Request-ID | header | Request trace ID. |
| body | binary | Raw binary attachment content. |
Errors
| Code | Message | Description |
|---|---|---|
| 400 | INVALID_REQUEST | file_name is missing or the path is invalid. |
| 401 | UNAUTHORIZED | Authentication failed. |
| 404 | NOT_FOUND | Resource not found. |
| 429 | RATE_LIMITED | Account quota limit reached. |
| 500/502/503 | UPSTREAM_UNAVAILABLE | Service error. |
See the Errors section for shared error codes.
Parameter bounds
| Limit | Value |
|---|---|
| Path restrictions | Must not contain \, .., or start with /. |
Retry guidance
- · Retry recommended: 500 / 502 / 503
- · Do not retry: 400 / 401
FAQ
Where do I get file_name?
Usually from content Markdown, parsed output, or resource references returned by agentic-search or meta-search.
Can I pass a full image URL?
No. resource only accepts Sciverse relative paths to avoid SSRF and path traversal risk.
Does resource explain a Figure or Table?
No. It returns the binary asset. Figure/table understanding belongs to the upper-layer multimodal model or application logic.
How should I handle download failure?
Check that file_name came from Sciverse, the path is safe, the account has permission, and handle 404/403/429 with fallback or retry.
Need an API key?
Create one in Console > Tokens.The same API key works for enabled Sciverse, DianShi, and Skills capabilities, with starter quota available according to account permissions.