Authentication
Every call that touches your account uses an API key.
API keys
Create keys in the developer console. A key looks like sf_live_ followed by 43 random characters. Send it as a Bearer token:
curl https://api.scoreflipml.roovemusic.com/v1/account \
-H "Authorization: Bearer $SCOREFLIP_API_KEY"- A key is tied to your account and spends that account's credits. Create up to 10 active keys, for example one per project.
- Keys are shown once. ScoreFlip stores only a hash, so a lost key cannot be recovered; revoke it and create another.
- Revoking takes effect within about 30 seconds.
- Only verified accounts (Google, Apple, or a verified email) can create keys.
Keeping keys safe
Anyone with your key can spend your credits. Never put a key in a browser, mobile app, public repository or prompt. Call the API from your server, and give agents a key of their own so you can revoke it independently.
- Load the key from an environment variable or a secret manager.
- Use a separate key for each app or agent, and revoke the ones you stop using.
- Cap what an autonomous agent can spend with
max_creditson every call, and by only buying the credits you are willing to lose. - If a key leaks, revoke it in the console immediately.
Rate limits
Each key may make 120 requests a minute. Over the limit you get 429 rate_limited and a Retry-After header in seconds. Repeated failed authentication from one address is throttled as well.
Idempotency
Send an Idempotency-Key header (a UUID) on POST calls. If your request times out and you retry with the same key within 24 hours, you get the original job back and are charged once. Reusing a key with a different body returns 422 idempotency_key_reuse.
Fetching your files by URL
When you send a url, ScoreFlip downloads it from a public https address only (ports 80 and 443). Private, loopback and cloud-metadata addresses are refused, redirects are re-checked, and files over 25 MB are rejected. To use a private file, upload it directly (multipart or base64) or give a short-lived signed URL.