Avatar catalog search: explore mode, seed and diversity
POST /v1/avatar-catalog/search browses reusable avatars. Omit the query for explore mode, pass a seed to keep the order stable, and set diversity from 0 to 1.
To browse Sume's reusable avatars without a search term, call POST /v1/avatar-catalog/search with no query: the mode defaults to explore, which applies seeded diversity jitter. Pass the same seed string and you get a stable order for that session; change the seed to reshuffle. diversity runs from 0 to 1 and defaults to 0.5 in explore mode and 0.2 in search mode, and limit is 1 to 100 (default 20).
What is the difference between search and explore?
Per the OpenAPI schema, a request with a query defaults to search, which keeps relevance-first deterministic ranking. A request with no or empty query defaults to explore. You can set mode yourself to override either default.
Results are scoped to public system avatars plus avatars owned by your workspace, and the response includes mode and seed_used so you can see which one ran.
| Field | Values | Default |
|---|---|---|
mode | search or explore | search with a query, otherwise explore |
seed | String, 1-128 characters | Workspace and day hash when jitter applies without a seed |
shuffle | Boolean; jitter even in search mode | false |
diversity | Number from 0 to 1 | 0.2 in search, 0.5 in explore |
limit | Integer 1-100 | 20 |
How do I keep the order stable across pages?
Send the same seed on every call. The schema says identical seeds stay stable for explore and shuffle jitter, and that jitter is always seeded: it never uses an unseeded random call. Search without shuffle stays deterministic even when you omit the seed.
A natural choice is a session id from your app as the seed: the same visitor sees the same grid on reload, a new visitor gets another one.
import os
import requests
resp = requests.post(
"https://api.sume.com/v1/avatar-catalog/search",
headers={"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"},
json={"mode": "explore", "seed": "session-abc", "limit": 20, "diversity": 0.5},
timeout=30,
)
resp.raise_for_status()
data = resp.json()["data"]
print(data["mode"], data["seed_used"], data["count"])
for a in data["avatars"]:
print(a["handle"], a["search_score"])What does diversity change?
The schema describes diversity as an attribute MMR knob: higher values spread results across attributes, and it maps to the MMR lambda as 1 minus diversity. Source-identity dedupe also collapses candidates that share a normalized still or photo URL before ranking, unless you set dedupe to off.
Once you pick an avatar, use its handle as avatar_handle on the avatar video route.
Sources
Related posts
More in Developers
- Avatar catalog search returns few results: auto_expand explained
When an avatar catalog search is thin, Sume relaxes filters in a set order and lists them in relaxed_filters. Set auto_expand to false for strict matching.
- Face swap job completed but no video_url: resource_status
For Avatar Face Swap, poll job_status but read the video only when resource_status is ready. How to poll /v1/jobs and fetch the result without an empty URL.
- Face swap source clip: 4-15 seconds with usable audio on Sume
Sume's Avatar Face Swap Beta targets source videos of about 4-15 seconds with usable audio. What the docs say on length, silent clips, and unsupported fields.
- Approved an avatar preview, now the hook changed: new preview
Sume's generate-video from an avatar preview keeps the script and first frame. Only quality can change, so a new hook needs a new preview.
Written by Sume