For AI agents: this page is also available as Markdown at https://docs.refabric.com/api-reference/platform/files/read-a-file.md, and the index of every page is https://docs.refabric.com/llms.txt.

Platform API › Files

Read a file

One file or record by its address, with its URL and what it holds.

GEThttps://api.refabric.com/v1/files/{ref}
import os
import requests

url = "https://api.refabric.com/v1/files/{ref}"

headers = {"Authorization": f"Key {os.environ['REFABRIC_API_KEY']}"}

response = requests.get(url, headers=headers)

print(response.json())
{
  "url": "https://files.refabric.com/art/3f2a.png",
  "media_type": "image/png",
  "file": "art:3f2a",
  "task": "image.expand",
  "job_id": "9b2f4c1d0e8a",
  "created_at": "2026-10-05T09:30:12Z",
  "data": {}
}

Modes

  • 1. Full (view=full, the default) — everything the file or record holds.
  • 2. Basic (view=basic) — its summary.

Authentication. A key with files:read: the files are your account's.

Common use cases

  • Read a record a job made, or check an upload before you use it.

See also

  • POST /v1/files
  • GET /v1/refs/{kind}

Authorization

Authorization: Key $REFABRIC_API_KEYScope: files:read

Parameters

Path parameters

  • stringrequired

Query parameters

  • stringoptionalDefault: full

    How much of it to answer.

    pattern: ^(basic|full)$

    Values

    • full — Everything the file or record says.
    • basic — Its summary: a record without its parts.

Header parameters

  • stringoptional

    The contract version you wrote against (a date). Absent: the current version.

    format: date

  • stringoptional

    Your own id for this request; we answer it back under X-Client-Request-ID.

    max length 128

Response

200 — Done: the answer is in the body.

  • stringrequired

    Where the file is. A public, permanent address you can open or download.

    Example: https://files.refabric.com/art/3f2a.png

  • stringrequired

    The file's standard media type.

    Example: image/png

  • stringrequired

    Its address; pass it to a task as it is.

    Example: art:3f2a

  • stringoptionalnullable

    The task that made it.

    Example: image.expand

  • stringoptionalnullable

    The job that made it.

    Example: 9b2f4c1d0e8a

  • stringoptionalnullable

    When it was made, ISO-8601 in UTC.

    Example: 2026-10-05T09:30:12Z

  • objectoptionalnullable

    What the file means, in the record vocabulary.

  • 400 — The request cannot be read as it was sent (a header, the URL or the body's form).
  • 401 — No valid API key was sent.
  • 403 — Your key or your plan does not allow this.
  • 404 — Nothing has this address.
  • 422 — A field is missing or has a value this operation cannot use.
  • 429 — Too many requests: wait for the number of seconds in the Retry-After header.
  • 500 — Something went wrong on our side; retry, and quote the request id if it keeps happening.