---
title: "Push Training Job To Huggingface"
method: POST
path: "/v1/training-jobs/{job_id}/push-to-hub"
tags: ["training-jobs"]
---

# Push Training Job To Huggingface

`POST /v1/training-jobs/{job_id}/push-to-hub`

## Request

- Base URL: `https://api.pioneer.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pioneer.ai/v1/training-jobs/{job_id}/push-to-hub`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Push a completed training job's model to HuggingFace Hub.

Args:
    job_id: Training job UUID.
    request: Target repo, token, and commit metadata.
    auth: Authenticated caller admitted by the training-jobs rollout.

Returns:
    The hub push outcome.

Raises:
    HTTPException: 400/403/404/409/500 for validation, permission,
        lookup, conflict, and upload failures.

## Path parameters

- `job_id` string, required

## Request body

- HuggingFacePushModelRequest: Request to push a trained model to HuggingFace Hub
  - `repo_id` string, required: HuggingFace repo ID (e.g., 'username/model-name')
  - `hf_token` string, required: HuggingFace API token with write permissions
  - `private` boolean: Whether repo should be private
  - `commit_message` string, nullable: Optional commit message for the push

## Response `200`

Successful Response

- PushModelToHubResponse: Response model for pushing model to HuggingFace Hub
  - `success` boolean, required
  - `url` string, required
  - `repo_id` string, required
  - `job_id` string, required
  - `message` string, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-24** `0e5e86e2bae5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pioneer/apis/brain-api/changes/v1/training-jobs/:job_id/push-to-hub/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/0e5e86e2bae5?raw)
