DEVELOPER LAYER / V1

quiet links.
useful machinery.

Manage live transfers from a server, give an LLM the complete contract, or connect an MCP client. One small surface, built on the same expiry rules as Astral.

01

Start with one request.

Personal keys are for private server environments. Public share inspection and aggregate stats need no key.

List active files
curl --fail-with-body \
  -H "Authorization: Bearer $ASTRAL_API_KEY" \
  https://astrls.com/api/v1/files

Basehttps://astrls.com/api/v1

AuthBearer astral_live_…

Limit600 / 6,000 / 24,000 shared points per hour

02

Your API keys.

Up to three active keys. The full secret appears once; only its digest is kept by Astral.

Sign in with a verified account to create a personal key.

03

REST, kept narrow.

All private lookups are owner-scoped. A missing file and somebody else's file both return 404.

POST/api/v1/uploads

Reserve a one-time upload session

key
POST/api/v1/files/{fileId}/finalize

Verify and publish uploaded bytes

key
GET/api/v1/files

List your active files

key
GET/api/v1/files/{fileId}

Read one owned file

key
PATCH/api/v1/files/{fileId}

Change its expiry

key
DELETE/api/v1/files/{fileId}

Delete it now

key
GET/api/v1/shares/{fileId}

Inspect a live share

public
GET/api/v1/stats

Read aggregate stats

public
Change an expiry
curl --fail-with-body -X PATCH \
  -H "Authorization: Bearer $ASTRAL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"expiry":"3d"}' \
  https://astrls.com/api/v1/files/FILE_ID

Lifetime presets: 1m, 15m, 1h, 6h, 1d, 3d, 7d, 30d, forever. Exact whole-number values such as 45d are accepted up to 365 days. forever requires Aether or Aether Pro; expired files cannot be restored.

Open the OpenAPI 3.1 contract
04

SDK and CLI.

Zero-build ESM for server runtimes and a small Node CLI. Both use the exact-byte reservation and finalize sequence.

JavaScript SDK
import { readFile } from "node:fs/promises";
import { AstralClient } from "https://astrls.com/sdk/astral.mjs";

const astral = new AstralClient({ apiKey: process.env.ASTRAL_API_KEY });
const bytes = new Uint8Array(await readFile("./report.pdf"));
const file = await astral.upload(bytes, {
  name: "report.pdf",
  mimeType: "application/pdf",
  expiry: "1d",
});
console.log(file);
Node CLI · PowerShell
Invoke-WebRequest -Uri https://astrls.com/cli/astral.mjs -OutFile astral.mjs
$env:ASTRAL_API_KEY = "…"
node .\astral.mjs upload .\report.pdf --type application/pdf --expiry 1d
Node CLI · macOS / Linux
curl -fsSLo astral.mjs https://astrls.com/cli/astral.mjs
ASTRAL_API_KEY="…" node astral.mjs upload ./report.pdf --type application/pdf --expiry 1d

SDK/sdk/astral.mjs

CLI/cli/astral.mjs

SecretASTRAL_API_KEY

05

Connect an MCP client.

A stateless Streamable HTTP server. Discovery and public tools work without a key; owned-file tools use the same Bearer key as REST.

Generic client shape
{
  "mcpServers": {
    "astral": {
      "type": "http",
      "url": "https://astrls.com/mcp",
      "headers": {
        "Authorization": "Bearer ${ASTRAL_API_KEY}"
      }
    }
  }
}

astral_create_upload_sessionkey · write

astral_finalize_uploadkey · write

astral_get_statspublic · read

astral_inspect_sharepublic · read

astral_list_fileskey · read

astral_get_filekey · read

astral_update_expirykey · write

astral_delete_filekey · destructive

Endpoint https://astrls.com/mcp · JSON-RPC 2.0 · protocol 2025-11-25 · POST only · no session ID.

06

Readable by models.

The short index points an agent in the right direction. The full file carries the complete API, MCP, safety, privacy, and retry contract.