AnthropicFile class

Anthropic-specific file object

API Reference: https://docs.anthropic.com/en/api/files-create

Represents a file uploaded to Anthropic's Files API. Note: This is separate from OpenAI's file format due to API differences.

Constructors

AnthropicFile.new({required String id, required String filename, required String mimeType, required int sizeBytes, required DateTime createdAt, required bool downloadable, String type = 'file'})
const
AnthropicFile.fromJson(Map<String, dynamic> json)
factory

Properties

createdAt DateTime
File creation timestamp (ISO 8601 format)
final
downloadable bool
Whether the file can be downloaded
final
filename String
Original filename
final
hashCode int
The hash code for this object.
no setteroverride
id String
Unique file identifier
final
mimeType String
MIME type of the file
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sizeBytes int
File size in bytes
final
type String
Object type (always "file")
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override