> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://nemo-platform.docs.buildwithfern.com/nemo/platform/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://nemo-platform.docs.buildwithfern.com/nemo/platform/_mcp/server.

# Create Fileset

POST https://host.com/apis/files/v2/workspaces/{workspace}/filesets
Content-Type: application/json

Create a new fileset.

If no storage configuration is provided, the default storage backend will be used.

Reference: https://nemo-platform.docs.buildwithfern.com/nemo/platform/nemo/platform/documentation/reference/api-reference/files/create-fileset-apis-files-v-2-workspaces-workspace-filesets-post

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Nemo Platform API
  version: 1.0.0
paths:
  /apis/files/v2/workspaces/{workspace}/filesets:
    post:
      operationId: create-fileset-apis-files-v-2-workspaces-workspace-filesets-post
      summary: Create Fileset
      description: >-
        Create a new fileset.


        If no storage configuration is provided, the default storage backend
        will be used.
      tags:
        - subpackage_files
      parameters:
        - name: workspace
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilesetOutput'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFilesetRequest'
servers:
  - url: https://host.com
    description: Default
components:
  schemas:
    LocalStorageConfig:
      type: object
      properties:
        read_chunk_size:
          type: integer
          default: 1048576
          description: >-
            Chunk size in bytes for reading/streaming files. Larger chunks
            reduce async overhead but increase memory per concurrent download.
            Default: 1MB.
        type:
          type: string
          enum:
            - local
          default: local
        path:
          type: string
        write_buffer_size:
          type: integer
          default: 16777216
          description: How many bytes to buffer before flushing to disk
      required:
        - path
      title: LocalStorageConfig
    NgcStorageConfigTargetType:
      type: string
      enum:
        - resource
        - model
      default: resource
      description: 'Type of NGC asset: ''resource'' or ''model'''
      title: NgcStorageConfigTargetType
    SecretRef:
      type: string
      description: >-
        Reference to a secret. Format: 'secret_name' (uses request workspace) or
        'workspace/secret_name' (explicit workspace).
      title: SecretRef
    NGCStorageConfig:
      type: object
      properties:
        read_chunk_size:
          type: integer
          default: 1048576
          description: >-
            Chunk size in bytes for reading/streaming files. Larger chunks
            reduce async overhead but increase memory per concurrent download.
            Default: 1MB.
        type:
          type: string
          enum:
            - ngc
          default: ngc
        org:
          type: string
          description: NGC organization name
        team:
          type: string
          description: NGC team name
        target:
          type: string
          description: NGC asset name (model or resource)
        target_type:
          $ref: '#/components/schemas/NgcStorageConfigTargetType'
          default: resource
          description: 'Type of NGC asset: ''resource'' or ''model'''
        version:
          type: string
          description: NGC asset version. If not provided, defaults to latest version
        original_version:
          type: string
          description: >-
            The original version requested by the user before resolution (e.g.,
            'latest' or None). The 'version' field contains the resolved version
            ID.
        api_key_secret:
          $ref: '#/components/schemas/SecretRef'
          description: NGC API key secret name
        host:
          type: string
          default: https://api.ngc.nvidia.com
          description: NGC API host URL
      required:
        - org
        - team
        - target
        - api_key_secret
      title: NGCStorageConfig
    HuggingfaceStorageConfigRepoType:
      type: string
      enum:
        - model
        - dataset
        - space
      default: model
      description: 'Type of Huggingface repository: ''model'', ''dataset'', or ''space'''
      title: HuggingfaceStorageConfigRepoType
    HuggingfaceStorageConfig:
      type: object
      properties:
        read_chunk_size:
          type: integer
          default: 1048576
          description: >-
            Chunk size in bytes for reading/streaming files. Larger chunks
            reduce async overhead but increase memory per concurrent download.
            Default: 1MB.
        type:
          type: string
          enum:
            - huggingface
          default: huggingface
        repo_id:
          type: string
          description: Huggingface repository ID (e.g., 'meta-llama/Llama-2-7b')
        repo_type:
          $ref: '#/components/schemas/HuggingfaceStorageConfigRepoType'
          default: model
          description: 'Type of Huggingface repository: ''model'', ''dataset'', or ''space'''
        revision:
          type: string
          default: main
          description: Branch, tag, or commit SHA. Defaults to 'main'
        original_revision:
          type: string
          description: >-
            The original revision requested by the user before resolution (e.g.,
            'main'). The 'revision' field contains the resolved commit SHA.
        token_secret:
          $ref: '#/components/schemas/SecretRef'
          description: Huggingface API `token` secret name for private repositories
        endpoint:
          type: string
          default: https://huggingface.co
          description: Huggingface Hub endpoint URL. Use for self-hosted instances.
      required:
        - repo_id
      title: HuggingfaceStorageConfig
    S3StorageConfigSignatureVersion:
      type: string
      enum:
        - s3v4
        - s3
      default: s3v4
      description: >-
        AWS signature version for request signing. Use 's3' for legacy systems
        that only support signature v2.
      title: S3StorageConfigSignatureVersion
    S3StorageConfig:
      type: object
      properties:
        read_chunk_size:
          type: integer
          default: 1048576
          description: >-
            Chunk size in bytes for reading/streaming files. Larger chunks
            reduce async overhead but increase memory per concurrent download.
            Default: 1MB.
        type:
          type: string
          enum:
            - s3
          default: s3
        bucket:
          type: string
          description: S3 bucket name
        prefix:
          type: string
          default: ''
          description: >-
            Optional prefix (folder path) within the bucket. All operations will
            be relative to this prefix.
        region:
          type: string
          description: >-
            AWS region. If not specified, uses SDK default (env vars, instance
            metadata, etc.)
        endpoint_url:
          type: string
          description: >-
            Custom endpoint URL for S3-compatible storage (e.g., MinIO, Garage,
            RustFS). If not specified, uses AWS S3.
        use_sdk_auth:
          type: boolean
          default: false
          description: >-
            Use AWS SDK credential chain for authentication (env vars like
            AWS_ACCESS_KEY_ID, IAM roles, instance profiles, etc.). This option
            is only available for the platform's default storage backend.
            User-provided S3 storage must use explicit credentials via
            access_key_id_secret and secret_access_key_secret.
        access_key_id_secret:
          $ref: '#/components/schemas/SecretRef'
          description: Secret reference for AWS access key ID. Requires use_sdk_auth=False.
        secret_access_key_secret:
          $ref: '#/components/schemas/SecretRef'
          description: >-
            Secret reference for AWS secret access key. Requires
            use_sdk_auth=False.
        signature_version:
          $ref: '#/components/schemas/S3StorageConfigSignatureVersion'
          default: s3v4
          description: >-
            AWS signature version for request signing. Use 's3' for legacy
            systems that only support signature v2.
      required:
        - bucket
      title: S3StorageConfig
    CreateFilesetRequestStorage:
      oneOf:
        - $ref: '#/components/schemas/LocalStorageConfig'
        - $ref: '#/components/schemas/NGCStorageConfig'
        - $ref: '#/components/schemas/HuggingfaceStorageConfig'
        - $ref: '#/components/schemas/S3StorageConfig'
      description: >-
        The storage configuration for the fileset. If not provided, uses default
        storage.
      title: CreateFilesetRequestStorage
    FilesetPurpose:
      type: string
      enum:
        - dataset
        - generic
        - model
      title: FilesetPurpose
    DatasetMetadataContentSchema:
      oneOf:
        - type: object
          additionalProperties:
            description: Any type
        - type: string
      description: >-
        Default row schema for files in this fileset, either inline JSON Schema
        or a schema_defs key.
      title: DatasetMetadataContentSchema
    DatasetMetadataContentSchemasByPath:
      oneOf:
        - type: object
          additionalProperties:
            description: Any type
        - type: string
      title: DatasetMetadataContentSchemasByPath
    DatasetMetadataContent:
      type: object
      properties:
        schema:
          $ref: '#/components/schemas/DatasetMetadataContentSchema'
          description: >-
            Default row schema for files in this fileset, either inline JSON
            Schema or a schema_defs key.
        schema_defs:
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              description: Any type
          description: >-
            Reusable JSON Schema definitions keyed by name for deduplicating
            per-file dataset schemas.
        schemas_by_path:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DatasetMetadataContentSchemasByPath'
          description: >-
            Optional per-file row schemas keyed by relative path within the
            fileset. Each value may be inline JSON Schema or a schema_defs key.
      description: Content for dataset-type filesets.
      title: DatasetMetadataContent
    ToolCallingMetadataContent:
      type: object
      properties:
        chat_template:
          type: string
          description: Jinja2 chat template for the model.
        tool_call_parser:
          type: string
          description: >-
            Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic',
            'llama3_json', 'mistral').
        tool_call_plugin:
          type: string
          description: >-
            Reference to a fileset containing a custom tool call plugin Python
            file. Expected format: '{workspace}/{fileset_name}'.
        auto_tool_choice:
          type: boolean
          description: Whether to enable automatic tool choice.
      description: |-
        Content for tool-calling configuration on model filesets.

        Stores chat template and tool calling settings that are merged into
        the ModelSpec during checkpoint analysis.
      title: ToolCallingMetadataContent
    ModelMetadataContent:
      type: object
      properties:
        tool_calling:
          $ref: '#/components/schemas/ToolCallingMetadataContent'
      description: |-
        Content for model-type filesets.

        Contains tool calling configuration that is merged into the ModelSpec
        during checkpoint analysis.
      title: ModelMetadataContent
    FilesetMetadataInput:
      type: object
      properties:
        dataset:
          $ref: '#/components/schemas/DatasetMetadataContent'
        model:
          $ref: '#/components/schemas/ModelMetadataContent'
      description: |-
        Tagged metadata container - the key indicates the type.

        Example:
            metadata = FilesetMetadata(
                dataset=DatasetMetadataContent(
                    schema={"columns": ["id", "name"]},
                )
            )
      title: FilesetMetadataInput
    CreateFilesetRequest:
      type: object
      properties:
        name:
          type: string
          description: >-
            The name of the fileset. Allowed characters: letters (a-z, A-Z),
            digits (0-9), underscores, hyphens, and dots.
        description:
          type: string
          description: The description of the fileset.
        project:
          type: string
          description: The name of the project associated with this fileset.
        storage:
          $ref: '#/components/schemas/CreateFilesetRequestStorage'
          description: >-
            The storage configuration for the fileset. If not provided, uses
            default storage.
        purpose:
          $ref: '#/components/schemas/FilesetPurpose'
          default: generic
          description: The purpose of the fileset.
        metadata:
          $ref: '#/components/schemas/FilesetMetadataInput'
          description: >-
            Purpose-specific metadata. Use the purpose as the key (e.g.,
            {dataset: {...}}).
        custom_fields:
          type: object
          additionalProperties:
            description: Any type
          description: Custom fields for the fileset.
        cache:
          type: boolean
          default: false
          description: Cache all files after creation. Only applies to external storage.
      required:
        - name
      title: CreateFilesetRequest
    FilesetOutputStorage:
      oneOf:
        - $ref: '#/components/schemas/LocalStorageConfig'
        - $ref: '#/components/schemas/NGCStorageConfig'
        - $ref: '#/components/schemas/HuggingfaceStorageConfig'
        - $ref: '#/components/schemas/S3StorageConfig'
      title: FilesetOutputStorage
    FilesetMetadataOutput:
      type: object
      properties:
        dataset:
          $ref: '#/components/schemas/DatasetMetadataContent'
        model:
          $ref: '#/components/schemas/ModelMetadataContent'
      description: |-
        Tagged metadata container - the key indicates the type.

        Example:
            metadata = FilesetMetadata(
                dataset=DatasetMetadataContent(
                    schema={"columns": ["id", "name"]},
                )
            )
      title: FilesetMetadataOutput
    FilesetOutput:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        workspace:
          type: string
        description:
          type: string
        purpose:
          $ref: '#/components/schemas/FilesetPurpose'
        storage:
          $ref: '#/components/schemas/FilesetOutputStorage'
        metadata:
          $ref: '#/components/schemas/FilesetMetadataOutput'
        custom_fields:
          type: object
          additionalProperties:
            description: Any type
        project:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - name
        - workspace
        - description
        - purpose
        - storage
        - metadata
        - custom_fields
        - project
        - created_at
        - updated_at
      description: Response DTO for fileset operations.
      title: FilesetOutput
    ValidationErrorLocItems:
      oneOf:
        - type: string
        - type: integer
      title: ValidationErrorLocItems
    ValidationError:
      type: object
      properties:
        loc:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorLocItems'
        msg:
          type: string
        type:
          type: string
        input:
          description: Any type
        ctx:
          type: object
          additionalProperties:
            description: Any type
      required:
        - loc
        - msg
        - type
      title: ValidationError
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      title: HTTPValidationError

```

## Examples



**Request**

```json
{
  "name": "training-data-v1"
}
```

**Response**

```json
{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "name": "training-data-v1",
  "workspace": "research-team-alpha",
  "description": "Initial training dataset for image classification model",
  "purpose": "dataset",
  "storage": {
    "read_chunk_size": 1048576,
    "type": "local",
    "path": "/mnt/data/training-data-v1",
    "write_buffer_size": 16777216
  },
  "metadata": {
    "dataset": {
      "schema": {},
      "schema_defs": {},
      "schemas_by_path": {}
    },
    "model": {
      "tool_calling": {
        "chat_template": "Hello, how can I assist you today?",
        "tool_call_parser": "openai",
        "tool_call_plugin": "research-team-alpha/custom-tool-plugin",
        "auto_tool_choice": true
      }
    }
  },
  "custom_fields": {},
  "project": "image-classification",
  "created_at": "2024-06-01T10:15:30Z",
  "updated_at": "2024-06-01T10:15:30Z"
}
```

**SDK Code**

```python
import requests

url = "https://host.com/apis/files/v2/workspaces/workspace/filesets"

payload = { "name": "training-data-v1" }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://host.com/apis/files/v2/workspaces/workspace/filesets';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"name":"training-data-v1"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://host.com/apis/files/v2/workspaces/workspace/filesets"

	payload := strings.NewReader("{\n  \"name\": \"training-data-v1\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://host.com/apis/files/v2/workspaces/workspace/filesets")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"training-data-v1\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://host.com/apis/files/v2/workspaces/workspace/filesets")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"training-data-v1\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://host.com/apis/files/v2/workspaces/workspace/filesets', [
  'body' => '{
  "name": "training-data-v1"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://host.com/apis/files/v2/workspaces/workspace/filesets");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"training-data-v1\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["name": "training-data-v1"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://host.com/apis/files/v2/workspaces/workspace/filesets")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```