Media API
(待译)
Media stores, transforms and searches images, video, audio and files in isolated libraries. A library isolates its assets, folders and searches. Every asset carries one type axis, material_type: what the asset is as a reusable material, with file for a file whose specific kind cannot be identified. Audio is one material type, and audio_role tells speech, music and sound effects apart. New uploads and imports default to organization-private authenticated delivery; set type=upload explicitly for public delivery, and omitting type on overwrite preserves the current type. Authentication uses a Praxis API key and library ID; private delivery uses authenticated, while private is unsupported; signatures are issued server-side because signing secrets are never distributed, so SDK-local sign_url is unavailable. Generation of images, videos and speech follows the OpenAI Images and Videos APIs (a prompt, n outputs, edits of an existing asset, an asynchronous job you poll), so OpenAI experience applies. Differences: every produced output is stored straight into the library as an asset, so there is nothing to download or save and nothing expires; a video request names a mode (text, image, first_last, reference or edit); a Job reports each output in outputs[] and each failed output in failures[] at the same index, with an error code to branch on; usage is the charge, per image or per second at the model API prices, and a failed or refused output is not charged. Start with GET /media/v1/generation/capabilities to pick a model and mode, then poll GET /media/v1/libraries/{library_id}/jobs/{job_id}. Use delivery_tokens to issue time-limited tokens for transformed private assets.
使用 API Key 作为 Bearer 凭据访问素材库。
https://api.deepraxis.com/media/v1