main
 1# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 2
 3from typing import Optional
 4from typing_extensions import Literal
 5
 6from .._models import BaseModel
 7from .file_object import FileObject
 8
 9__all__ = ["Upload"]
10
11
12class Upload(BaseModel):
13    id: str
14    """The Upload unique identifier, which can be referenced in API endpoints."""
15
16    bytes: int
17    """The intended number of bytes to be uploaded."""
18
19    created_at: int
20    """The Unix timestamp (in seconds) for when the Upload was created."""
21
22    expires_at: int
23    """The Unix timestamp (in seconds) for when the Upload will expire."""
24
25    filename: str
26    """The name of the file to be uploaded."""
27
28    object: Literal["upload"]
29    """The object type, which is always "upload"."""
30
31    purpose: str
32    """The intended purpose of the file.
33
34    [Please refer here](https://platform.openai.com/docs/api-reference/files/object#files/object-purpose)
35    for acceptable values.
36    """
37
38    status: Literal["pending", "completed", "cancelled", "expired"]
39    """The status of the Upload."""
40
41    file: Optional[FileObject] = None
42    """The `File` object represents a document that has been uploaded to OpenAI."""