Skip to content

XaiFileUpload

Namespace: Vercel.AI.Xai

public sealed class XaiFileUpload

Bytes, base64, or a stream uploaded to xAI.

Inheritance: object

View source

public string? Base64 { get; set; }

Base64 file contents. Decoded before they are sent.

Value: string

View source

public byte[]? Bytes { get; set; }

Inline file bytes.

Value: byte[]

View source

public Action<Exception>? CancelStream { get; set; }

Called when ExpiresAfter is rejected before any request.

Value: Action<Exception>

View source

public double? ExpiresAfter { get; set; }

TTL in seconds. Integers from 3600 through 2592000 are accepted.

Value: double?

View source

public string? FileName { get; set; }

File name. Omitted names are sent as blob.

Value: string

View source

public IDictionary<string, string>? Headers { get; set; }

Headers merged over the provider headers.

Value: IDictionary<string, string>

View source

public string? MediaType { get; set; }

File media type.

Value: string

View source

public Stream? Stream { get; set; }

Streamed file contents. Fields are written before these bytes.

Value: Stream

View source

public string? TeamId { get; set; }

team_id, when set.

Value: string

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product