---
title: Wyświetl listę plików | RunAPI
description: Wyświetl listę aktywnych plików w deterministycznej kolejności kursorowej.
url: https://runapi.ai/pl/docs/api/protocol/files/list.md
canonical: https://runapi.ai/pl/docs/api/protocol/files/list
locale: pl
---

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

# Wyświetl listę plików

Wyświetl listę aktywnych plików w deterministycznej kolejności kursorowej.

## Punkt końcowy

GET /v1/files

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.

### Parametry zapytania

```json
{
  "after": {
    "description": "Zwróć pliki po tym kursorze identyfikatora pliku.",
    "required": false,
    "type": "string"
  },
  "limit": {
    "default": 10000,
    "description": "Maksymalna liczba zwracanych plików.",
    "max": 10000,
    "min": 1,
    "required": false,
    "type": "integer"
  },
  "order": {
    "default": "desc",
    "description": "Sortuj według czasu utworzenia.",
    "enum": [
      "asc",
      "desc"
    ],
    "required": false,
    "type": "string"
  },
  "purpose": {
    "description": "Filtruj według przeznaczenia pliku (File purpose).",
    "enum": [
      "user_data",
      "batch",
      "batch_output"
    ],
    "required": false,
    "type": "string"
  }
}
```

## Odpowiedź sukcesu

HTTP 200 - GET /v1/files

```json
{
  "data": [
    {
      "bytes": 1048576,
      "created_at": 1785196800,
      "filename": "knowledge.pdf",
      "id": "file_abc123",
      "object": "file",
      "purpose": "user_data"
    }
  ],
  "first_id": "file_abc123",
  "has_more": false,
  "last_id": "file_abc123",
  "object": "list"
}
```

## 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 GET https://runapi.ai/v1/files?order=desc&purpose=user_data \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

## Powiązane materiały referencyjne

- [Pliki trwałe](https://runapi.ai/pl/docs/api/protocol/files.md)
- [Obiekt File](https://runapi.ai/pl/docs/api/protocol/files/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": "Wyświetl listę plików",
    "description": "Wyświetl listę aktywnych plików w deterministycznej kolejności kursorowej.",
    "url": "https://runapi.ai/pl/docs/api/protocol/files/list",
    "mainEntityOfPage": "https://runapi.ai/pl/docs/api/protocol/files/list"
  }
]
```
