Atmee.aiDocs
APIAPI referenceAvatars

Move credits from the account into the avatar's sponsor pool

POST
/v1/avatars/{avatarId}/sponsor/grants

Send an Idempotency-Key header to make retries safe: the same key replays the first successful result instead of granting twice.

Authorization

headerX-Api-Key<token>

Secret embed API key (sk_atmee_...; keys minted before 2026-09 carry sk_live_...), held by the customer's own backend and never sent to a browser. Format: X-Api-Key: sk_atmee_....

Path Parameters

avatarId*string
Formatuuid

Header Parameters

Idempotency-Key?string
Length1 <= length <= 255

Request Body

application/json
  1. body
microcredits*integer
Range1 <= value

Response Body

Transferred (or replayed).

application/json
  1. response
transferredMicrocredits*integer
replayed*boolean

True when an earlier request with the same Idempotency-Key was replayed.

error?string

Only on POST /v1/avatars: the avatar was created but the manifest's funding was refused (e.g. Insufficient balance, free_plan_credits_cannot_sponsor). Fund it later via /sponsor/grants. Absent when the grant succeeded.

Example Request
curl -X POST 'https://api.atmanity.us/v1/avatars/497f6eca-6276-4993-bfeb-53cbbbba6f08/sponsor/grants' \  -H 'Content-Type: application/json' \  -d '{  "microcredits": 1}'
Example Response
{  "transferredMicrocredits": 0,  "replayed": true,  "error": "string"}
Move credits from the account into the avatar's sponsor pool — Atmee Docs