Get metadata about a specific file by file ID. The file ID is generated by AI21 when you upload the file.
from ai21 import AI21Client client = AI21Client() file_id = client.library.files.create( file_path="path/to/file", path="path/to/file/in/library", labels=["label1", "label2"], public_url="www.example.com" )
A successful response returns an array of file metadata items.
errorCode intThe error code, if any.
int
errorMessage stringThe error message, if any.
string
No matching ID is found.
Was this page helpful?