# Exports

> Write a slice in a training format, to your own bucket or to Rayform storage with signed URLs.

Source: https://rayform.world/docs/api/exports
Last updated: 2026-10-18
Status: Rayform is in private preview. APIs, formats and the SDK described here may change before general availability.

## The export object

```json
{
  "id": "exp_01JA9B",
  "object": "export",
  "slice": "slc_7c1e04aa",
  "format": "lerobot",
  "options": { "cameras": ["cam0/rgb", "wrist/rgb"], "fps": 15, "action": "joints/position_delta", "frame": "ros" },
  "destination": { "type": "s3", "uri": "s3://my-bucket/rayform/mug-grasps/" },
  "status": "completed",
  "progress": 1.0,
  "bytes": 18210443264,
  "files": 1648,
  "created_at": "2026-10-15T09:42:10Z",
  "completed_at": "2026-10-15T10:07:52Z"
}
```

| Field | Type | Description |
| --- | --- | --- |
| `status` | string | `queued`, `running`, `completed` or `failed` |
| `progress` | number | Fraction of segments written, from 0 to 1 |
| `destination` | object | Where files were written; `type` is `s3`, `gcs` or `rayform` |

## Create an export

```endpoint
POST /v1/exports
```

#### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `slice` | string | yes | Slice ID |
| `format` | string | yes | `lerobot`, `rlds`, `webdataset`, `mcap`, `usd` or `mjcf` |
| `options` | object | no | See [export options](https://rayform.world/docs/guides/exporting#options) |
| `destination` | string | no | `s3://bucket/prefix/` or `gs://bucket/prefix/`; omit to keep files in Rayform storage |

#### Request

```bash
curl https://api.rayform.world/v1/exports \
  -H "Authorization: Bearer $RAYFORM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: export-slc_7c1e04aa-lerobot-v1" \
  -d '{
    "slice": "slc_7c1e04aa",
    "format": "lerobot",
    "options": { "cameras": ["cam0/rgb", "wrist/rgb"], "fps": 15, "action": "joints/position_delta", "frame": "ros" },
    "destination": "s3://my-bucket/rayform/mug-grasps/"
  }'
```

```python
export = client.exports.create(
    "slc_7c1e04aa",
    format="lerobot",
    options={"cameras": ["cam0/rgb", "wrist/rgb"], "fps": 15, "action": "joints/position_delta", "frame": "ros"},
    destination="s3://my-bucket/rayform/mug-grasps/",
)
export.wait()
```

#### Response

Returns the export with `status: "queued"`. If an export with the same slice, format, options and destination already completed, it is returned instead and nothing is written again.

## Retrieve an export

```endpoint
GET /v1/exports/{id}
```

## List an export's files

```endpoint
GET /v1/exports/{id}/files
```

For exports kept in Rayform storage, each file has a signed URL valid for 15 minutes. List again to get fresh URLs.

```json
{
  "object": "list",
  "data": [
    { "path": "meta/info.json", "bytes": 4210, "url": "https://files.rayform.world/exp_01JA9B/meta/info.json?sig=..." },
    { "path": "data/chunk-000/episode_000000.parquet", "bytes": 1882301, "url": "https://files.rayform.world/...?sig=..." }
  ],
  "has_more": true,
  "next_cursor": "ZXhwXzAx"
}
```

## Destinations

To export into your own bucket, allow Rayform's export role to write to the prefix. For S3:

```json title="bucket-policy.json"
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": { "AWS": "arn:aws:iam::RAYFORM_ACCOUNT_ID:role/rayform-export" },
      "Action": ["s3:PutObject", "s3:AbortMultipartUpload"],
      "Resource": "arn:aws:s3:::my-bucket/rayform/*",
      "Condition": { "StringEquals": { "s3:ExternalId": "org_7Hq2" } }
    }
  ]
}
```

The exact account ID and external ID for your organisation are shown in the console under **Settings → Export destinations**.
