Skip to main content

Credits API

This API allows you to retrieve the total number of credits available on your account, including credits linked to your subscription and additional credits.

Authentication (required)

Since the migration to the App Router, authentication is required for this endpoint:
  • Header x-api-key: Your API key (generated in the Developer Space)
  • Request body user_id: The user identifier associated with this API key
The API key must match the user in your Home Staging subscription. If the key is missing or invalid, a 401 Unauthorized error will be returned.

Retrieve your credits

POST /api/account/credit
This endpoint allows you to obtain detailed information about your available credits.

Request Parameters

user_id
string
required
The unique user identifier (UUID) that you can retrieve from your Developer Space

Response

total
number
The total number of credits available on your account
subscription
number
The number of credits from your subscription
extra
number
The number of additional credits purchased separately

Request Example

curl --request POST \
--url 'https://iacrea.com/api/account/credit' \
--header x-api-key:API_KEY \
--header 'Content-Type: application/json' \
--data '{
  "user_id": "uuid"
}'

Response Example

{
  "total": 100,
  "subscription": 90,
  "extra": 10
}

Error Codes

CodeDescription
400Invalid parameters (e.g. missing or invalid user_id)
401Missing or invalid API key (header x-api-key required)
503Service temporarily unavailable