Credits and Funding
Use the authenticated funding endpoint to learn which balance model currently applies to your account. The backend selects the model; do not infer it from a plan name or from the operation pricing catalog.
See Shared wallet and funding models for both response variants and how available and reserved credits work.
Check Your Funding Model​
Endpoint: GET /credits/me/funding
Send this request with the authenticated HTTP-only session cookie established by YODI sign-in. Do not put another user's ID or a wallet ID in the request.
The endpoint is authenticated and returns the balance model selected by the backend for the signed-in account. Its owner is derived by the API; do not send another user's ID or a wallet ID.
For the exact response envelope and the service_bucket and shared_wallet
variants, see Shared wallet and funding models.
Legacy Service-Bucket Balance​
GET /credits/me remains available as a compatibility endpoint. It reports the
legacy service buckets and is not the authoritative way to determine whether
your account uses a shared wallet. Prefer GET /credits/me/funding.
Endpoint: GET /credits/me
The shell example uses $YODI_SESSION_COOKIE as a local placeholder for the
authenticated session cookie. Never commit or log its value.
curl -X GET "https://api.yodi.tg/v1/credits/me" \
--cookie "$YODI_SESSION_COOKIE"
Response:
{
"message": "SUCCESS",
"error": false,
"data": {
"id": 1,
"quota": { "translation": 1000, "audio": 500, "sms": 200, "voice_call": 100 },
"used": { "translation": 145, "audio": 23, "sms": 12, "voice_call": 5 },
"source": "purchase",
"expiresAt": "2025-01-01T00:00:00.000Z"
},
"status": 200
}
Legacy Service Catalog​
Endpoint: GET /services
Returns legacy service-bucket information. Do not treat those service names as
spendable sub-wallets when fundingModel is shared_wallet.
For active operation prices and billing units, see Operation unit pricing.
Service Quota​
Endpoint: GET /services/{name}/quota
This endpoint reports legacy service-bucket quota only. It does not provide a shared-wallet allocation or determine whether an operation is available.
curl -X GET "https://api.yodi.tg/v1/services/translation/quota" \
--cookie "$YODI_SESSION_COOKIE"
Legacy Credit Buckets​
| Bucket | Backend key | What it covers |
|---|---|---|
| Translation | translation | Translation requests |
| Audio | audio | Audio generation and speech workflows |
| SMS | sms | SMS delivery |
| Voice Call | voice_call | Voice call usage |
Notes​
- Chat, analysis, and other AI operations are priced by operation; see the active tariff catalog rather than inferring a service bucket.
- Request quotas and rate limits are separate from credits.
Low Credit Alerts​
Set up alerts in your dashboard to be notified when credits are low.