---
title: Dateien auflisten | RunAPI
description: Aktive Dateien in deterministischer Cursor-Reihenfolge auflisten.
url: https://runapi.ai/de/docs/api/protocol/files/list.md
canonical: https://runapi.ai/de/docs/api/protocol/files/list
locale: de
---

> HTML-Version: https://runapi.ai/de/docs/api/protocol/files/list
> Website-Index für KI-Agenten: https://runapi.ai/llms.txt

# Dateien auflisten

Aktive Dateien in deterministischer Cursor-Reihenfolge auflisten.

## Endpunkt

GET /v1/files

Basis-URL: https://runapi.ai

API-Version: v1

Authentifizierung: Authorization: Bearer YOUR_API_KEY

## Anfrage

Werte nur am angegebenen Anfrage-Speicherort senden.

### Abfrageparameter

```json
{
  "after": {
    "description": "Dateien nach diesem Datei-ID-Cursor zurückgeben.",
    "required": false,
    "type": "string"
  },
  "limit": {
    "default": 10000,
    "description": "Maximale Anzahl zurückgegebener Dateien.",
    "max": 10000,
    "min": 1,
    "required": false,
    "type": "integer"
  },
  "order": {
    "default": "desc",
    "description": "Nach Erstellungszeitpunkt sortieren.",
    "enum": [
      "asc",
      "desc"
    ],
    "required": false,
    "type": "string"
  },
  "purpose": {
    "description": "Nach Dateizweck filtern.",
    "enum": [
      "user_data",
      "batch",
      "batch_output"
    ],
    "required": false,
    "type": "string"
  }
}
```

## Erfolgsantwort

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"
}
```

## Fehlerantwort (401)

HTTP 401

### Antwort-Schema

```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"
}
```

### Antwortbeispiel

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

## Fehlerantwort (400)

HTTP 400

### Antwort-Schema

```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"
}
```

### Antwortbeispiel

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

## Fehlerantwort (404)

HTTP 404

### Antwort-Schema

```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"
}
```

### Antwortbeispiel

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

## Fehlerantwort (409)

HTTP 409

### Antwort-Schema

```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"
}
```

### Antwortbeispiel

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

## Fehlerantwort (413)

HTTP 413

### Antwort-Schema

```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"
}
```

### Antwortbeispiel

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

## Fehlerantwort (422)

HTTP 422

### Antwort-Schema

```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"
}
```

### Antwortbeispiel

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

## Fehlerantwort (502)

HTTP 502

### Antwort-Schema

```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"
}
```

### Antwortbeispiel

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

## cURL-Beispiel



### curl

```curl
curl -X GET https://runapi.ai/v1/files?order=desc&purpose=user_data \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

## Verwandte Referenz

- [Persistente Dateien](https://runapi.ai/de/docs/api/protocol/files.md)
- [Datei-Objekt](https://runapi.ai/de/docs/api/protocol/files/object.md)

---

## Mehr von RunAPI

- [Startseite](https://runapi.ai/de/.md)
- [Modellkatalog](https://runapi.ai/de/models.md)
- [Preise](https://runapi.ai/de/pricing.md)
- [Anbieter](https://runapi.ai/de/models)
- [Dokumentation](https://runapi.ai/de/docs/guides)
- [SDKs](https://runapi.ai/de/sdk.md)
- [CLI](https://runapi.ai/de/cli.md)
- [MCP Server](https://runapi.ai/de/mcp.md)
- [Claude Code vs Cursor](https://runapi.ai/de/claude-code-vs-cursor.md)
- [Cursor API-Einrichtung](https://runapi.ai/de/cursor-api-setup.md)
- [RunAPI vs OpenRouter](https://runapi.ai/de/openrouter-alternative.md)
- [Enterprise](https://runapi.ai/de/contact.md)
- [Kontakt](https://runapi.ai/de/contact.md)
- [Bedingungen](https://runapi.ai/de/terms.md)
- [Datenschutz](https://runapi.ai/de/privacy.md)
- [Website-Index für KI-Agenten](https://runapi.ai/llms.txt)

Kontakt: contact@runapi.ai

## Strukturierte Daten

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "de",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/de",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/de/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "de",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/de",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/deicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "de",
    "@type": "TechArticle",
    "headline": "Dateien auflisten",
    "description": "Aktive Dateien in deterministischer Cursor-Reihenfolge auflisten.",
    "url": "https://runapi.ai/de/docs/api/protocol/files/list",
    "mainEntityOfPage": "https://runapi.ai/de/docs/api/protocol/files/list"
  }
]
```
