LogoLogo
  • Moonveil Image Creation API
    • Create Images
    • Redraw Image
    • Expand Prompt
    • Image to Prompt
    • Get Image Generation Result
    • Retrieve Image History
    • Retrieve Image Costs
    • Retrieve Image Metrics
    • Retrieve Recharge History
    • Export Image as SVG
    • Retrieve Credit
  • GenAI Factory API
    • Create Task
    • Get Task Status
    • Upload Multiple Images
    • Create Asset
    • Get All User Assets
    • Get a Single Asset
    • Update Asset Description
    • Delete an Asset
  • Agent API
    • Start Conversation
    • Continue Conversation
    • Retrieve Conversation History
    • Retrieve All Sessions
    • Delete Conversation by Session ID
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Moonveil Image Creation API

Retrieve Credit

The Retrieve credit endpoint allows you to check the total amount of credit available and how much has been used. This is useful for monitoring your API usage and ensuring you have sufficient credit for future tasks.

API Endpoint

To retrieve your credit information, send a GET request to the following URL:

GET https://api.genaifactory.ai/v1/credit

Headers

Ensure that your request includes the following header:

Name

Type

Required

Description

formacloud-api-key

string

Yes

API key required for authenticating your request.

Response Body

The response will provide details about your credit usage:

Name

Type

Required

Description

total_credit

number

Yes

The total amount of credit allocated for tasks.

used_credit

number

Yes

The amount of credit used by tasks.

Example Request

curl -G 'https://api.genaifactory.ai/v1/credit' \
-H 'formacloud-api-key: abc123'

Example Response

Success Response (Status Code 200)

{
    "total_credit": "1.00",
    "used_credit": "0.11"
}

Failure Response (Status Code 4XX)

{
    "error": "Invalid API key",
}

Last updated 7 months ago

Was this helpful?