> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nugen.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Export an aligned model to a Hugging Face repository

> Export the aligned model's weights to the given Hugging Face repository.

**Path Parameters:**

- `model_id`: Unique identifier of the aligned model

**Request Body:**

- `hf_repo`: Target repository, e.g. `org/model-name`
- `visibility`: `private` or `public`
- `token`: Hugging Face access token



## OpenAPI

````yaml https://api.nugen.in/openapi-public.json post /api/v3/models/{model_id}/export-hf
openapi: 3.1.0
info:
  title: Nugen Intelligence API
  description: 'Nugen Intelligence : Powering Specialized Intelligence At Scale'
  version: 25.4.20
servers: []
security: []
paths:
  /api/v3/models/{model_id}/export-hf:
    post:
      tags:
        - Models
      summary: Export an aligned model to a Hugging Face repository
      description: |-
        Export the aligned model's weights to the given Hugging Face repository.

        **Path Parameters:**

        - `model_id`: Unique identifier of the aligned model

        **Request Body:**

        - `hf_repo`: Target repository, e.g. `org/model-name`
        - `visibility`: `private` or `public`
        - `token`: Hugging Face access token
      operationId: export_model_to_huggingface
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: string
            title: Model Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportHfRequest'
      responses:
        '200':
          description: Acknowledges the export request for the aligned model.
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ExportHfRequest:
      properties:
        hf_repo:
          type: string
          title: Hf Repo
          description: Target repository, e.g. org/model-name
        visibility:
          type: string
          title: Visibility
          description: private or public
          default: private
        token:
          type: string
          title: Token
          description: Hugging Face access token
      type: object
      required:
        - hf_repo
        - token
      title: ExportHfRequest
      description: Export an aligned model to a Hugging Face repository.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````