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

# Create Dataset From JSONL

> Upload a ready-made chat dataset (JSONL) and link it to an existing project.



## OpenAPI

````yaml POST /api/v1/public/datasets/create-from-jsonl
openapi: 3.1.0
info:
  version: 0.0.1
  title: Prem Studio API
  description: Studio autofinetuning agent API
servers:
  - url: http://studio.premai.io
    description: Current environment
  - url: https://studio.premai.io
    description: Production server
security:
  - bearerAuth: []
paths:
  /api/v1/public/datasets/create-from-jsonl:
    post:
      tags:
        - Public Datasets
      description: Create dataset from JSONL file
      operationId: datasets.createFromJsonl
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateFromJsonlRequest'
      responses:
        '200':
          description: Dataset created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Project not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Quota exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CreateFromJsonlRequest:
      type: object
      properties:
        project_id:
          type: string
          format: uuid
          description: >-
            Project ID that will own the dataset. Must match a project you
            created.
        name:
          type: string
          minLength: 1
          description: >-
            Human-readable name shown in the dashboard once the dataset is
            created.
        file:
          type: string
          format: binary
          description: >-
            Required JSONL upload. Each line should be a JSON object containing
            a "messages" array (system/user/assistant) used to seed the dataset.
      required:
        - project_id
        - name
        - file
    DatasetResponse:
      type: object
      properties:
        dataset_id:
          type: string
          format: uuid
      required:
        - dataset_id
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````