GET/resource

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.png

Request parameters (URL query)

FieldTypeRequiredDescription
file_namestringRequiredRelative 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.

FieldTypeDescription
Content-TypeheaderMIME type of the attachment.
Content-DispositionheaderFilename and download hint.
X-Request-IDheaderRequest trace ID.
bodybinaryRaw binary attachment content.

Errors

CodeMessageDescription
400INVALID_REQUESTfile_name is missing or the path is invalid.
401UNAUTHORIZEDAuthentication failed.
404NOT_FOUNDResource not found.
429RATE_LIMITEDAccount quota limit reached.
500/502/503UPSTREAM_UNAVAILABLEService error.

See the Errors section for shared error codes.

Parameter bounds

LimitValue
Path restrictionsMust 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.

Open console