Skip to main content
POST
/
buy_subscription
Buy subscription plan
curl --request POST \
  --url https://modelslab.com/api/v3/buy_subscription \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "plan_name": "basic_monthly"
}'
{
  "status": "success",
  "messege": "You have just bought a custom api with basic plan",
  "data": {
    "key": "<string>",
    "plan": "<string>"
  }
}
Before calling this endpoint, make sure that you have enabled Subscription Auto Payment on your dashboard.

Request

Send a POST request to below endpoint and pass the desired plan_name to buy in the request body.
curl
--request POST 'https://modelslab.com/api/v3/buy_subscription' \

Body

json
{  
  "key":"your-default-api-key",  
  "plan_name":"basic_monthly"
}

Body

application/json
key
string
required

Your default API Key used for request authorization

plan_name
enum<string>
required

The name of the plan you want to buy

Available options:
basic_monthly,
basic_yearly,
standard_monthly,
standard_yearly,
premium_monthly,
premium_yearly

Response

Buy subscription response

status
enum<string>
Available options:
success
messege
string
Example:

"You have just bought a custom api with basic plan"

data
object
I