The image_metrics
endpoint allows you to query the performance, costs, and other metrics related to the creation of images within a specified period. This information can help you evaluate the effectiveness and resource usage of the image creation process over time.
API Endpoint
To retrieve the metrics, send a GET
request to the following URL:
GET https://api.genaifactory.ai/v1/image_metrics
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.
Query Parameters
You can use the following query parameters to specify the time period for which you want to retrieve metrics:
Name
Type
Required
Description
start
string
No
The start date of the metrics collection period in UTC (e.g., 2023-01-01T00:00:00Z
).
end
string
No
The end date of the metrics collection period in UTC (e.g., 2023-01-31T23:59:59Z
).
Response Body
The response will include the following metrics related to image creation within the specified period:
Name
Type
Required
Description
total_images
int
Yes
The total number of images created within the specified period.
total_cost
number
Yes
The total cost associated with creating the images within the specified period.
average_time
number
Yes
The average time taken to create each image within the specified period, in seconds.
Example Request
Example Response
Success Response (Status Code 200)
Failure Response (Status Code 4XX)