---
updatedAt: 2025-09-16T11:17:30.000Z
agentTools:
  projectIndex: https://docs.super.ai/llms.txt
---

# Upload data

Use this endpoint to upload data to your super.AI storage. You can reference the resulting data URLs when you create jobs. You must use the `Multipart/Form-Data` format to upload your file.

> 📘 Uploading multiple files at once
>
> You can only upload one file per request through the API. To upload multiple files at once, please use our [dashboard](https://super.ai/dashboard/datasets).

> 🚧 Not possible to test through API reference
>
> It is not possible to test or otherwise use this endpoint from within the API reference by using the **Try it** button, as the UI does not support file uploads. You can only use this endpoint through the cURL command, the Python SDK or the super.AI CLI.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "superai-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.super.ai"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "API-KEY"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/data": {
      "post": {
        "summary": "Upload data",
        "description": "Use this endpoint to upload data to your super.AI storage. You can reference the resulting data URLs when you create jobs. You must use the `Multipart/Form-Data` format to upload your file.",
        "operationId": "upload-data",
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "description": "The path you want to upload this datapoint within your Super AI dataset. This path, which must end with a file-name and extension does not need to match with the path to the file in your local machine. The path must be URL encoded, e.g., `folder1/folder2/images/super-poodle-02.jpg` becomes `folder1%2Ffolder2%2Fimages%2Fsuper-poodle-02.jpg`). Bear in mind, if upload a file path that you have already used in the past (duplicate), a timestamp will be automatically added at the end of the filename, right before the extension, which means that `path/to/document.pdf` will become `path/to/document_<13_chars_timestamp>.pdf`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mimeType",
            "in": "query",
            "description": "[Standardized media type and subtype](https://en.wikipedia.org/wiki/Media_type) of the file you want to upload. This must be URL encoded, e.g., `image/jpeg` becomes `image%2Fjpeg`. See our [input data types](/docs/input-data-types) for accepted types.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "file",
            "in": "query",
            "description": "File that you want to upload (it must be below 4mb)",
            "schema": {
              "type": "string",
              "format": "binary"
            }
          },
          {
            "name": "description",
            "in": "query",
            "description": "Text description of the file",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "signedUrl",
            "in": "query",
            "description": "Whether you want to generate a signed URL that allows you to download the data point directly. The default value is `false`.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "secondsTtl",
            "in": "query",
            "description": "The number of seconds for which the URL remains valid. If you do not provide a value, the default value of 600 seconds is used.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uploadUrl",
            "in": "query",
            "description": "Use to upload the file using a signed URL",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "organizationName",
            "in": "query",
            "description": "The organization you want to upload the data to (you need to be part of the org). You can find the value of this parameter within the URL while operating in an project (app) in our platform.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"id\": 12345,\n  \"ownerId\": 1234,\n  \"path\": \"/default/invoice-01.pdf\",\n  \"mimeType\": \"application/pdf\",\n  \"status\": \"ACTIVE\",\n  \"signedUrl\": \"https://very-long-signed-url.cloudfront.net\",\n  \"created\": \"2020-03-12T15:31:49.364Z\",\n  \"updated\": \"2020-03-12T15:31:49.364Z\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "example": 12345,
                      "default": 0
                    },
                    "ownerId": {
                      "type": "integer",
                      "example": 1234,
                      "default": 0
                    },
                    "path": {
                      "type": "string",
                      "example": "/default/invoice-01.pdf"
                    },
                    "mimeType": {
                      "type": "string",
                      "example": "application/pdf"
                    },
                    "status": {
                      "type": "string",
                      "example": "ACTIVE"
                    },
                    "signedUrl": {
                      "type": "string",
                      "example": "https://very-long-signed-url.cloudfront.net"
                    },
                    "created": {
                      "type": "string",
                      "example": "2020-03-12T15:31:49.364Z"
                    },
                    "updated": {
                      "type": "string",
                      "example": "2020-03-12T15:31:49.364Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "File already exists in your dataset"
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "Invalid API-KEY"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl \"https://api.super.ai/v1/data?path=default%2Fhotel-pool-03.jpeg&mimeType=image%2Fjpeg&signedUrl=true\" \\\n-X POST \\\n-H \"API-KEY: live_1Ab23cdEFGH4iJ5K67Lmnop8qR10STulWX_2y3Za4_B\" \\\n-H \"Content-Type: multipart/form-data\" \\\n-F \"file=@hotel-pool-03.jpeg\""
            },
            {
              "language": "python",
              "code": "import superai as ai\n\nclient = ai.Client(\"<API-KEY>\")\n\nf = open(\"invoice-01.pdf\", \"rb\")\n\nresponse = client.upload_data(\n    mime_type=\"application/pdf\",\n    path=\"default/invoice-01.pdf\",\n    file=f,\n    description=\"Test invoice 01\",\n)\n\nprint(response)\n"
            }
          ],
          "samples-languages": [
            "curl",
            "python"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```