Response 200
A successful response returns an array of file metadata items.
errorCode int
The error code, if any.
errorMessage string
The error message, if any.
Response 422
No matching ID is found.
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}")
Responses are generated using AI and may contain mistakes.