---
title: Tworzenie przesyłania | RunAPI
description: Zarezerwuj zadeklarowaną końcową liczbę bajtów pliku dla jednego przesłania.
url: https://runapi.ai/pl/docs/api/protocol/uploads/create.md
canonical: https://runapi.ai/pl/docs/api/protocol/uploads/create
locale: pl
---

> Wersja HTML: https://runapi.ai/pl/docs/api/protocol/uploads/create
> Indeks witryny dla agentów: https://runapi.ai/llms.txt

# Tworzenie przesyłania

Zarezerwuj zadeklarowaną końcową liczbę bajtów pliku dla jednego przesłania.

## Punkt końcowy

POST /v1/uploads

Bazowy URL: https://runapi.ai

Wersja API: v1

Uwierzytelnianie: Authorization: Bearer YOUR_API_KEY

## Żądanie

Wysyłaj wartości wyłącznie w podanej lokalizacji żądania.

### application/json

```json
{
  "bytes": {
    "description": "Zadeklarowany docelowy rozmiar pliku w bajtach. Przesyłanie wsadowe (Batch Uploads) jest ograniczone do 209715200 bajtów.",
    "required": true,
    "type": "integer"
  },
  "filename": {
    "description": "Nazwa pliku ukończonego File.",
    "required": true,
    "type": "string"
  },
  "mime_type": {
    "description": "Typ mediów dla ukończonego pliku.",
    "required": true,
    "type": "string"
  },
  "purpose": {
    "default": "user_data",
    "description": "Przeznaczenie pliku (File).",
    "enum": [
      "user_data",
      "batch"
    ],
    "required": true,
    "type": "string"
  }
}
```

## Odpowiedź sukcesu

HTTP 200 - POST /v1/uploads

```json
{
  "bytes": 1048576,
  "created_at": 1785196800,
  "expires_at": 1785200400,
  "filename": "archive.bin",
  "id": "upload_abc123",
  "object": "upload",
  "purpose": "user_data",
  "status": "pending"
}
```

## Odpowiedź błędu (401)

HTTP 401

### Schemat odpowiedzi

```json
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
```

### Przykład odpowiedzi

```json
{
  "error": {
    "code": "authentication_error",
    "message": "Missing API key",
    "param": null,
    "type": "authentication_error"
  }
}
```

## Odpowiedź błędu (400)

HTTP 400

### Schemat odpowiedzi

```json
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
```

### Przykład odpowiedzi

```json
{
  "error": {
    "code": "invalid_request_error",
    "message": "Malformed request",
    "param": null,
    "type": "invalid_request_error"
  }
}
```

## Odpowiedź błędu (404)

HTTP 404

### Schemat odpowiedzi

```json
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
```

### Przykład odpowiedzi

```json
{
  "error": {
    "code": "not_found",
    "message": "File not found",
    "param": null,
    "type": "invalid_request_error"
  }
}
```

## Odpowiedź błędu (409)

HTTP 409

### Schemat odpowiedzi

```json
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
```

### Przykład odpowiedzi

```json
{
  "error": {
    "code": "upload_state_conflict",
    "message": "Upload state conflict",
    "param": null,
    "type": "invalid_request_error"
  }
}
```

## Odpowiedź błędu (413)

HTTP 413

### Schemat odpowiedzi

```json
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
```

### Przykład odpowiedzi

```json
{
  "error": {
    "code": "file_too_large",
    "message": "File size exceeds the maximum allowed size",
    "param": "file",
    "type": "invalid_request_error"
  }
}
```

## Odpowiedź błędu (422)

HTTP 422

### Schemat odpowiedzi

```json
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
```

### Przykład odpowiedzi

```json
{
  "error": {
    "code": "invalid_upload",
    "message": "Upload request rejected",
    "param": null,
    "type": "invalid_request_error"
  }
}
```

## Odpowiedź błędu (502)

HTTP 502

### Schemat odpowiedzi

```json
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
```

### Przykład odpowiedzi

```json
{
  "error": {
    "code": "storage_write_failed",
    "message": "File storage failed",
    "param": null,
    "type": "server_error"
  }
}
```

## Przykład cURL



### curl

```curl
curl -X POST https://runapi.ai/v1/uploads \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"bytes":1048576,"filename":"archive.bin","mime_type":"application/octet-stream","purpose":"user_data"}'
```

## Powiązane materiały referencyjne

- [Przesyłanie plików](https://runapi.ai/pl/docs/api/protocol/uploads.md)
- [Obiekt Upload](https://runapi.ai/pl/docs/api/protocol/uploads/object.md)

---

## Więcej od RunAPI

- [Strona główna](https://runapi.ai/pl/.md)
- [Katalog modeli](https://runapi.ai/pl/models.md)
- [Cennik](https://runapi.ai/pl/pricing.md)
- [Dostawcy](https://runapi.ai/pl/models)
- [Dokumentacja](https://runapi.ai/pl/docs/guides)
- [SDK](https://runapi.ai/pl/sdk.md)
- [CLI](https://runapi.ai/pl/cli.md)
- [Serwer MCP](https://runapi.ai/pl/mcp.md)
- [Claude Code vs Cursor](https://runapi.ai/pl/claude-code-vs-cursor.md)
- [Konfiguracja Cursor API](https://runapi.ai/pl/cursor-api-setup.md)
- [RunAPI vs OpenRouter](https://runapi.ai/pl/openrouter-alternative.md)
- [Enterprise](https://runapi.ai/pl/contact.md)
- [Kontakt](https://runapi.ai/pl/contact.md)
- [Regulamin](https://runapi.ai/pl/terms.md)
- [Prywatność](https://runapi.ai/pl/privacy.md)
- [Indeks witryny dla agentów](https://runapi.ai/llms.txt)

Kontakt: contact@runapi.ai

## Dane strukturalne

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "pl",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/pl",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/pl/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "pl",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/pl",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/plicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "pl",
    "@type": "TechArticle",
    "headline": "Tworzenie przesyłania",
    "description": "Zarezerwuj zadeklarowaną końcową liczbę bajtów pliku dla jednego przesłania.",
    "url": "https://runapi.ai/pl/docs/api/protocol/uploads/create",
    "mainEntityOfPage": "https://runapi.ai/pl/docs/api/protocol/uploads/create"
  }
]
```
