---
title: "Import From Github"
method: POST
path: "/felix/datasets/import-from-github"
tags: ["felix", "datasets"]
---

# Import From Github

`POST /felix/datasets/import-from-github`

Download a file from GitHub and create a Pioneer dataset.

Args:
    request: Repo, file path, and optional branch, dataset name, GitHub
        token, and dataset purpose (``type``: 'training' (default),
        'evaluation', or 'benchmark' -- 'benchmark' is rejected,
        mirroring ``pull_dataset_from_hub``).
    http_request: Raw request, read only to identify sandbox run keys.
    auth: Authenticated user context.

Returns:
    DatasetResponse of the created dataset.

Raises:
    HTTPException: 400 on parse errors, 403 on a run-key token or
        ``type='benchmark'``, 502 on download failures.

## Request body

- GithubImportRequest — Request to import a single data file from a GitHub repository.
  - `repo` string, required — GitHub repository, e.g. 'owner/repo' or a full URL
  - `file_path` string, required — Path to the data file inside the repository
  - `branch` string, nullable — Branch or ref to import from. Defaults to the default branch
  - `dataset_name` string, nullable — Name for the new Pioneer dataset. Defaults to a slugified file base name
  - `github_token` string, nullable — GitHub personal access token for private repos or higher rate limits. Sandbox run keys must omit this field and can only import public repos.
  - `type` 'training' | 'evaluation' | 'benchmark', nullable — Dataset purpose: 'training' (trainable), 'evaluation' (not trainable), 'benchmark' (system-managed, evaluation-only; cannot be created via this endpoint).

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-24** `1cffaad2a921` — 2 breaking, 1 warning, 5 info
  - added the new required request property `file_path`
  - added the new required request property `repo`
  - removed the optional property `detail` from the response with the `422` status
  - added the new optional request property `branch`
  - …4 more

[Change history](https://skmtc.dev/pioneer/apis/brain-api/changes/felix/datasets/import-from-github/post.md)

---

[API](https://skmtc.dev/pioneer/apis/brain-api.md) · [All operations](https://skmtc.dev/pioneer/apis/brain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pioneer/apis/brain-api/revisions/1cffaad2a921?raw)
