Menu
Platform
AI
Alerts and status pages
App store purchases
Credits
Generated Assets
Knowledge
KV
Localization
Notifications
Organizations
Payments
Queues
Realtime
Sandboxes
Storage
Workflows
API reference
- Overview
- Access API keys
- Agent sessions API
- Agent versions API
- Agents API
- AI models API
- Artifact references API
- Artifacts API
- Assets API
- Auth configs API
- Bank receipts API
- Bank transfer accounts API
- Buckets API
- Builds API
- Catalogs API
- Chat profiles API
- Chat reports API
- Chat sticker packs API
- Checkout policies API
- Checkout sessions API
- Config changes API
- Config flags API
- Config segments API
- Connection providers API
- Connections API
- Connectors API
- Credit grants API
- Customer organizations API
- Customer subscriptions API
- Databases API
- Documents API
- Email domains API
- End users API
- Entities API
- Entitlement grants API
- Entries API
- Environments API
- Episodes API
- Error events API
- Error groups API
- Events API
- Exchange rates API
- Generations API
- Glossaries API
- Goals API
- Identities API
- Inbound emails API
- Inbound endpoints API
- Inbound messages API
- Inbound sms API
- Invitations API
- Job runs API
- Jobs API
- Knowledge schemas API
- KV API
- KV namespaces API
- Lease events API
- Leases API
- Licence keys API
- Licence tokens API
- Mail domains API
- Mail routes API
- Mailbox connect links API
- Mailbox OAUTH apps API
- Mailboxes API
- Memberships API
- Memories API
- Memory stores API
- Merchant accounts API
- Message topics API
- Messages API
- OAUTH clients API
- Objects API
- Organization roles API
- Orgs API
- Owner pools API
- Phone numbers API
- Portal sessions API
- Preferences API
- Price catalogs API
- Processor events API
- Projects API
- Queued executions API
- Queues API
- Realtime channels API
- Realtime members API
- Realtime messages API
- Recipients API
- Relations API
- Releases API
- Revenue API
- Revenue facts API
- Revenue sources API
- Runs API
- Sandbox shapes API
- Schedules API
- Scrubbing policies API
- Search API
- Search indexes API
- Secret versions API
- Secrets API
- Service enablements API
- Service observations API
- Services API
- Serving routes API
- Session events API
- Sessions API
- Signing key versions
- Signing keys
- Sms numbers API
- Source maps API
- Spaces API
- Store connections API
- Store purchases API
- Subscriptions API
- Suppressions API
- Tax threshold statuses API
- Templates API
- Test clocks API
- Token exchanges API
- Transfers API
- Trust policies API
- Trusted issuers API
- Uptime checks API
- Uptime manifests API
- Uptime sources API
- Usage events API
- Usage invoices API
- Usage meter prices API
- Usage meters API
- Usage reservations API
- Usage settings API
- Usage tiers API
- Volumes API
- Waits API
- Webhook deliveries API
- Webhook endpoints API
- Workflows API
Getting Started
Authentication
KV Store
Deploy & Infrastructure
Reference
Generated Assets quickstart
A recipe, generated variants, a committed lock, and a served image
This takes you from a recipe to an image served from its public URL, using
only a key and curl. Nothing is deployed: the asset lives in Sylphx
Generated Assets, and the same calls run in CI.
The examples use the environment orgs/acme/projects/shop/envs/production;
use your own. sylphx access whoami prints the environment your key belongs
to, and a key only reaches its own environment.
export ENV=orgs/acme/projects/shop/envs/production#1. Declare and generate
A recipe is the asset's kind, prompt and parameters. Here, a 1024 by 768 banner in two variants to choose from.
curl -sS -X POST "https://api.sylphx.com/v1/$ENV/assets:generate" \
-H "Authorization: Bearer $SYLPHX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"recipes": [{
"kind": "image",
"prompt": "A watercolour harbour at dawn, wide banner, no text",
"params": {"size": "1024x768", "variants": "2"}
}]}' > generate.json
jq '{created, generated, pending, failed, refused}' generate.json
export KEY=$(jq -r '.assets[0].key' generate.json)assets[0] is the summary of your recipe: its key, its resource name, its
state, and how many variants are ready of how many wanted. A generate works
within a bounded time; while pending is above 0, send the same request
again. A recipe that already has its variants generates nothing. Parameters
are size (WIDTHxHEIGHT, 64 to 2048 pixels, default 1024x1024) and
variants (1 to 8, default 1). "validate_only": true checks the recipes and
returns the counts without generating.
#2. Look at the variants
curl -sS "https://api.sylphx.com/v1/$ENV/assets/$KEY" \
-H "Authorization: Bearer $SYLPHX_API_KEY" \
| jq '{state, variants: [.variants[] | {slot, content_hash, url, width, height}]}'Each variant has a url. Open it, or fetch it:
curl -sS -o banner.png "$(curl -sS "https://api.sylphx.com/v1/$ENV/assets/$KEY" \
-H "Authorization: Bearer $SYLPHX_API_KEY" | jq -r '.variants[0].url')"The URL is public and immutable, and caches for a year. To pick one variant, approve it; to replace one, reject it and generate again:
curl -sS -X POST "https://api.sylphx.com/v1/$ENV/assets/$KEY:approveVariant" \
-H "Authorization: Bearer $SYLPHX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content_hash": "<content_hash>"}'#3. Lock
Ask for the lock of the keys your code declares, and commit it.
curl -sS -X POST "https://api.sylphx.com/v1/$ENV/assets:lock" \
-H "Authorization: Bearer $SYLPHX_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"keys\": [\"$KEY\"]}" > lock.json
jq '{missing, incomplete}' lock.json
jq -r .content lock.json > assets.lockThe lock holds only the keys you name, so a recipe you remove drops out of it.
missing lists keys never generated and incomplete keys whose variants are
not all ready; a CI step that fails on either keeps an unlocked asset out of a
release. The file's format is published at
https://sylphx.com/schema/assets/lock-1.json.
#Read it back
curl -sS "https://api.sylphx.com/v1/$ENV/assets:export" \
-H "Authorization: Bearer $SYLPHX_API_KEY" | jq '{items: (.items | length), next_page_token, manifest_digest}'Every servable variant in the environment, as one paged manifest (follow
next_page_token); the last page carries a manifest_digest, the SHA-256 of
every item's content_hash, so a client can prove it holds the whole set.