AI Content

Notes
Expert level
The API key should be sent as a Bearer token in the Authorization header of the request. Get your API key.
Feature Check

API endpoint:

GET
https://checkmysite.ir/api/v1/ai/feature-check

Request example:

curl --location --request GET 'https://checkmysite.ir/api/v1/ai/feature-check' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Balance

API endpoint:

GET
https://checkmysite.ir/api/v1/ai/balance

Request example:

curl --location --request GET 'https://checkmysite.ir/api/v1/ai/balance' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Estimate

API endpoint:

POST
https://checkmysite.ir/api/v1/ai/estimate

Request example:

curl --location --request POST 'https://checkmysite.ir/api/v1/ai/estimate' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}' \
--data-raw '{"type": "text", "options": {}}'

Parameters:

Parameter
Type
Description
type
required string
Content type: text, article, image, meta, title, description, other.
options
optional array
Optional. Additional options for the content type.
Generate

API endpoint:

POST
https://checkmysite.ir/api/v1/ai/generate

Request example:

curl --location --request POST 'https://checkmysite.ir/api/v1/ai/generate' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}' \
--data-raw '{"type": "text", "prompt": "Write a short poem", "confirm_cost": true}'

Parameters:

Parameter
Type
Description
type
required string
Content type: text, article, image, meta, title, description.
prompt
required string
The prompt or instruction for content generation. Required for text, article, and image types.
options
optional array
Optional. Type-specific options:
confirm_cost
optional boolean
Set to true to confirm the estimated cost and proceed with generation. If not set, the API returns the estimated cost without generating.
Note: The first request without confirm_cost returns the estimated credits. Send a second request with confirm_cost: true to proceed.
Packages

API endpoint:

GET
https://checkmysite.ir/api/v1/ai/packages

Request example:

curl --location --request GET 'https://checkmysite.ir/api/v1/ai/packages' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Purchase

API endpoint:

POST
https://checkmysite.ir/api/v1/ai/purchase

Request example:

curl --location --request POST 'https://checkmysite.ir/api/v1/ai/purchase' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}' \
--data-raw '{"package_id": 1}'

Parameters:

Parameter
Type
Description
package_id
required integer
The ID of the credit package to purchase.
Note: This endpoint creates a payment order. The response includes a payment_url that the user should be redirected to for completing the payment.
Transactions

API endpoint:

GET
https://checkmysite.ir/api/v1/ai/transactions

Request example:

curl --location --request GET 'https://checkmysite.ir/api/v1/ai/transactions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'

Parameters:

Parameter
Type
Description
type
optional string
Filter by type: purchase, usage, plan_reset, refund, admin_adjustment.
limit
optional integer
Results per page. Default: 20.
page
optional integer
Page number. Default: 1.
Generation History

API endpoint:

GET
https://checkmysite.ir/api/v1/ai/history

Request example:

curl --location --request GET 'https://checkmysite.ir/api/v1/ai/history' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'

Parameters:

Parameter
Type
Description
type
optional string
Filter by type: text, article, image, meta, title, description.
limit
optional integer
Results per page. Default: 20.
page
optional integer
Page number. Default: 1.