Skip to content
Rigel docs
Open Rigel

A file's details

files.file.get

GET/api/v1/households/{household_id}/queries/files.file.get

  • Query
  • Rigel runs it

The file's name, kind, and the type and size of each copy, or null when there is no such file.

Parameters#

A file's details: parameters
FieldDescription
household_idpathstringrequired

The household's ID.

file_idquerystringrequired

A file ID, such as fil_01JC0000000000000000000000.

Response#

200 The answer.

A file's details: response fields
FieldDescription
fileobject or nullrequired

The file, or null when it doesn't exist.

file.idstringrequired

A file ID, such as fil_01JC0000000000000000000000.

file.namestringrequired

The file's name as uploaded, used for downloads.

file.kindone of: image, pdf, video, audio, otherrequired

What the file is: image, pdf, video, audio, or other (anything else, which is only ever offered as a download).

file.originalobject or nullrequired

The bytes as uploaded, or null until the original is stored.

file.original.typestringrequired

The original's media type, such as image/heic.

file.original.sizeintegerrequired

The original's size in bytes.

file.displayobject or nullrequired

The image that stands for the file on screen, or null when it has none.

file.display.typestringrequired

The display copy's media type: image/jpeg, image/webp or image/png.

file.display.sizeintegerrequired

The display copy's size in bytes.

file.display.widthintegerrequired

The display copy's width in pixels.

file.display.heightintegerrequired

The display copy's height in pixels.

file.created_atstring (date-time)required

When the file was first stored.

Errors#

Every error has the same envelope: error.code, error.message, error.details, error.recovery and error.request_id.

A file's details: errors
StatusCodeWhen
400validation_failedA field is missing, misspelled or out of range. details.fields lists each problem.
401unauthenticatedThe request has no valid session.
404not_foundThe household doesn't exist, or you aren't a member of it.

Examples#

These are real. Each was recorded from a sample household, the Okafors, running through the whole API when this site was built.

Get a file's details

Request, curl
curl 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/files.file.get?file_id=fil_01M6V9CS96RRJQEBVXVCKMMR0T' \
  -H "Cookie: rigel_session=$RIGEL_SESSION"
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/files.file.get?file_id=fil_01M6V9CS96RRJQEBVXVCKMMR0T", {
  headers: {
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
});
const data = await response.json();
Request, HTTP
GET /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/files.file.get?file_id=fil_01M6V9CS96RRJQEBVXVCKMMR0T HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CS9RX30EMT6B4SRF0FT9

{
  "file": {
    "id": "fil_01M6V9CS96RRJQEBVXVCKMMR0T",
    "name": "pantry-middle-shelf.png",
    "kind": "image",
    "original": {
      "type": "image/png",
      "size": 655
    },
    "display": {
      "type": "image/png",
      "size": 342,
      "width": 96,
      "height": 64
    },
    "created_at": "2026-11-07T15:17:52.045Z"
  }
}

Ask for a file that was removed

Request, curl
curl 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/files.file.get?file_id=fil_01M6V9CSA07VXEA2WJV6NA8D4F' \
  -H "Cookie: rigel_session=$RIGEL_SESSION"
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/files.file.get?file_id=fil_01M6V9CSA07VXEA2WJV6NA8D4F", {
  headers: {
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
});
const data = await response.json();
Request, HTTP
GET /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/files.file.get?file_id=fil_01M6V9CSA07VXEA2WJV6NA8D4F HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CSA6W9F1Z77ENXHVF71H

{
  "file": null
}

For Rigel#

Rigel's tool for this query is files_file_get. Rigel runs this on its own, then says what it did. The agent guide has the rest.

Rigel is in early access, and sign-up is by invitation. Open Rigel