FishSpeech Docs
API Reference

Profile

Read and update Open API account profile and quota.

Profile

Use profile endpoints to inspect the API token owner's account id, tier, credits, and remaining API quota. Call this endpoint before large batches, after important jobs, and during operational checks.

Get Profile

GET /api/open/v1/profile
Authorization: Bearer YOUR_API_TOKEN

Request

The request does not require a body.

curl https://fishaudio.org/api/open/v1/profile \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response

{
  "user_id": "user_123",
  "api_quota_remaining": 988000,
  "tier": "pro",
  "credits": 1200
}

Field names may include both legacy quota fields and newer credit fields while accounts migrate across billing models. Treat unknown fields as additive and avoid failing strict parsers when the response gains new metadata.

Update Profile

POST /api/open/v1/profile
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json
{
  "webhookUrl": "https://example.com/webhooks/fishspeech"
}

The updateable fields are controlled by the server. Unknown fields may be ignored or rejected. Keep profile updates separate from media job creation so a profile validation error cannot block unrelated generation work.

Billing And Credits

The profile endpoint is the safest lightweight check before a batch. It can show whether the account is likely to have enough credits or quota for the next operation, but it is not a reservation system. Between your check and the media request, other workers may consume balance.

For critical workflows, store the profile snapshot with the batch id. If a job later fails for quota reasons, that snapshot helps you distinguish a pre-existing low balance from concurrent usage by another process.

Errors

StatusMeaningAction
401Token cannot be authenticatedStop the job and refresh the server-side token
402Account is valid but quota checks fail for a related operationShow a billing or top-up state
500Profile service failedRetry a small number of times with backoff

On this page