Get a link used to download the file contents from the library.
from ai21 import AI21Client # Initialize client client = AI21Client(api_key="your_api_key_here") # Get file metadata try: file_metadata = client.library.files.get("your_file_id_here") print(file_metadata) except Exception as e: print(f"Error: {e}")
A successful response returns an array of file metadata items. errorCode intThe error code, if any. errorMessage string The error message, if any.
int
string
No matching ID is found.
Was this page helpful?