Files
Complete a presigned upload
ModelsExpand Collapse
type CreateFileResponse struct{…}Result of POST /files. In the multipart (inline) flow upload is null and the file is already pending ingest. In the presigned (JSON) flow upload carries the PUT envelope and the file stays pending until you call POST /files/{file_id}/complete. Top-level id and state are conveniences that mirror file.id and file.state; the full record is always under file.
Result of POST /files. In the multipart (inline) flow upload is null and the file is already pending ingest. In the presigned (JSON) flow upload carries the PUT envelope and the file stays pending until you call POST /files/{file_id}/complete. Top-level id and state are conveniences that mirror file.id and file.state; the full record is always under file.
File FileA file in the caller's namespace.
A file in the caller's namespace.
Purpose FilePurposeHow the file is intended to be used in a generation. input is the primary subject (e.g. the source image for an edit); reference is style/content guidance.
How the file is intended to be used in a generation. input is the primary subject (e.g. the source image for an edit); reference is style/content guidance.
State FileStateLifecycle state of an uploaded file. pending until bytes are received and the ingest pipeline runs; ready once it can be referenced from a generation; failed if ingest/moderation rejected it; deleted after a soft-delete.
Lifecycle state of an uploaded file. pending until bytes are received and the ingest pipeline runs; ready once it can be referenced from a generation; failed if ingest/moderation rejected it; deleted after a soft-delete.
State FileStateLifecycle state of an uploaded file. pending until bytes are received and the ingest pipeline runs; ready once it can be referenced from a generation; failed if ingest/moderation rejected it; deleted after a soft-delete.
Lifecycle state of an uploaded file. pending until bytes are received and the ingest pipeline runs; ready once it can be referenced from a generation; failed if ingest/moderation rejected it; deleted after a soft-delete.
type File struct{…}A file in the caller's namespace.
A file in the caller's namespace.
Purpose FilePurposeHow the file is intended to be used in a generation. input is the primary subject (e.g. the source image for an edit); reference is style/content guidance.
How the file is intended to be used in a generation. input is the primary subject (e.g. the source image for an edit); reference is style/content guidance.
State FileStateLifecycle state of an uploaded file. pending until bytes are received and the ingest pipeline runs; ready once it can be referenced from a generation; failed if ingest/moderation rejected it; deleted after a soft-delete.
Lifecycle state of an uploaded file. pending until bytes are received and the ingest pipeline runs; ready once it can be referenced from a generation; failed if ingest/moderation rejected it; deleted after a soft-delete.
type FileList struct{…}Keyset-paginated page of files, newest first. When has_more is true, pass next_cursor back as the cursor query parameter to fetch the next page. next_cursor is opaque.
Keyset-paginated page of files, newest first. When has_more is true, pass next_cursor back as the cursor query parameter to fetch the next page. next_cursor is opaque.
Data []FileFiles in this page.
Files in this page.
Purpose FilePurposeHow the file is intended to be used in a generation. input is the primary subject (e.g. the source image for an edit); reference is style/content guidance.
How the file is intended to be used in a generation. input is the primary subject (e.g. the source image for an edit); reference is style/content guidance.
State FileStateLifecycle state of an uploaded file. pending until bytes are received and the ingest pipeline runs; ready once it can be referenced from a generation; failed if ingest/moderation rejected it; deleted after a soft-delete.
Lifecycle state of an uploaded file. pending until bytes are received and the ingest pipeline runs; ready once it can be referenced from a generation; failed if ingest/moderation rejected it; deleted after a soft-delete.