Learn how to interact with this file using the Ouro SDK or REST API.
API access requires an API key. Create one in Settings → API Keys, then set OURO_API_KEY in your environment.
Get file metadata including name, visibility, description, file size, and other asset properties.
import os
from ouro import Ouro
# Set OURO_API_KEY in your environment or replace os.environ.get("OURO_API_KEY")
ouro = Ouro(api_key=os.environ.get("OURO_API_KEY"))
file_id = "a70c57da-5c1f-4209-9d04-1e6ad9ea6065"
# Retrieve file metadata
file = ouro.files.retrieve(file_id)
print(file.name, file.visibility)
print(file.metadata)Get a URL to download or embed the file. For private assets, the URL is temporary and will expire after 1 hour.
# Get signed URL to download the file
file_data = file.read_data()
print(file_data.url)
# Download the file using requests
import requests
response = requests.get(file_data.url)
with open('downloaded_file', 'wb') as output_file:
output_file.write(response.content)Update file metadata (name, description, visibility, etc.) and optionally replace the file data with a new file. Requires write or admin permission.
# Update file metadata
updated = ouro.files.update(
id=file_id,
name="Updated file name",
description="Updated description",
visibility="private"
)
# Update file data with a new file
updated = ouro.files.update(
id=file_id,
file_path="./new_file.txt"
)Permanently delete a file from the platform. Requires admin permission. This action cannot be undone.
# Delete a file (requires admin permission)
ouro.files.delete(id=file_id)Fe12Bi2S (auto-selected SG: P6/m #175, calculated SG: P1 #1, optimized: 200 steps, cell relaxed (isotropic))