Request Body

Content-Type: application/json

{
  "pagination": {
    "limit": 10,    // Optional: Number of files to fetch (default: 10)
    "offset": 0     // Optional: Offset for pagination (default: 0)
  },
  "order_dir": "desc"  // Optional: Sort direction - "desc" or "asc"
}

Authentication

Before making requests to the API, you need to obtain your API key from your dashboard.

Example Request


const res = await fetch("https:/https://rag-api-llm.up.railway.app/user_files", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "authorization": apiKey,
  },
  body: JSON.stringify({
    pagination: {
      limit: 10,
      offset: 0
    },
    order_dir: "desc"
  }),
});

Response

{
  "success": true,
  "results": [
    {
      "type": "text",
      "file_id": "939b2cd7-56d5-4c44-b491-14bfc202e9a0",
      "created_at": "2025-01-04T03:22:10.713451+00:00",
      "file_name": "test content 4.txt",
      "team_id": "2ce522b2-2045-43ad-ab0a-2f48a9a041e9"
    },
    {
      "type": "pdf",
      "file_id": "4db6b5d7-b199-4bfd-9914-6991cb4ba3b6",
      "created_at": "2025-01-04T02:56:10.252537+00:00",
      "file_name": "1227-2024_WhisperIt-Invoice-Taishi - Invoice.pdf",
      "team_id": "2ce522b2-2045-43ad-ab0a-2f48a9a041e9"
    }
  ],
  "pagination": {
    "offset": 0,
    "limit": 10
  },
  "count": 143
}


Parameters

NameRequiredTypeDescription
paginationNoobjectPagination parameters (limit and offset)
order_dirNostringSort direction (“desc” or “asc”)
NameRequiredTypeDescription
limitNointegerNumber of files to fetch (default: 10)
offsetNointegerStarting position of results (default: 0)

Error Responses



{
  "success": false,
  "error": {
    "message": "Invalid API key provided",
    "code": "unauthorized"
  }
}



{
  "success": false,
  "error": {
    "message": "Invalid pagination parameters",
    "code": "invalid_request"
  }
}