GET /v1/images lists the images and videos of your account that Dramatis Studio still keeps. Each item has signed links to the file and to a small copy. Use it to show a gallery without reading every task.
The list
The list is newest first, by the time each task completed. One task with several images gives one item for each image.
An image whose content has expired or was deleted is never listed. So every item has links that work. See Retention.
The list carries no prompt and no other input. Read GET /v1/tasks/{id} for those (Tasks).
Request
curl 'https://api.studio.dramatis.ai/v1/images?namespace=user_7f3a9c&limit=20' \
|
-H "Authorization: Bearer $OPSIS_API_KEY" |
Filters
The items
Signed links
url and thumb_url work for one hour. Every read of the list returns fresh links. Store the task_id, not the link, and download the file if you need it for longer than its retention.
Videos
A video task is listed too, with task set to image_to_video. Its url is the clip, an mp4 file, the same link as the task's output. Its thumb_url is the poster, the clip's first frame. See Video.
Paging
A page holds up to limit items. When there are more, next_cursor is set: pass it as cursor, with the same filters, to read the next page. On the last page next_cursor is null.
A cursor belongs to one list. A cursor of another namespace, or of the list without a namespace, is refused with 400 invalid_request.
One namespace
namespace is the tag you set on a task for one of your users, machines or services (Tasks). GET /v1/tasks?namespace= and GET /v1/images?namespace= read only that namespace, newest first. So an app can show one user's or one machine's tasks and images, without reading the rest of the account.
Request
curl 'https://api.studio.dramatis.ai/v1/tasks?namespace=user_7f3a9c&limit=20' \
|
-H "Authorization: Bearer $OPSIS_API_KEY" |
The playground key
The playground on the model pages calls the API with a key that lasts one hour. That key sees only the images of playground and Studio tasks, not those of tasks made with your own keys.