API reference

Plan and billing

The plan is the owner's Gemlead plan, shared by all their X accounts, as on the app's Plans page. Read it before you answer a question about billing, then get the Stripe link the owner opens to subscribe, change the plan or buy credits.

Nothing is paid through the API. A checkout and the billing page are Stripe links the owner opens and pays on. Auto-recharge is the one change that charges later on its own, with the saved card, so ask the owner first.

Only the owner of the X account manages the plan, a team member's key gets forbidden.

The plan object

The owner's Gemlead plan, as the app's Plans page shows it, with its credits, its auto-recharge, the free trial and the prices. It covers all the owner's X accounts.

Attributes

  • objectstring
    Always plan.
  • planstring
    The owner's plan.
    freestarterbusinessenterprise
  • billing_periodstring or null
    How the plan is billed, null without a paid plan.
    monthlyquarterlyannually
  • statusstring
    Where the subscription stands. trialing, active, past_due or another Stripe status while subscribed, paused while its payments are paused, managed for a plan Gemlead's team set up without a Stripe subscription, free or canceled without one.
  • subscribedboolean
    Whether the owner has a Stripe subscription.
  • cancel_at_period_endboolean
    true when the plan ends at the end of the period it is in.
  • renews_atstring or null
    When the plan renews, ISO 8601. null when it ends or there is no subscription.
  • ends_atstring or null
    When a cancelled plan ends, ISO 8601.
  • payment_holdboolean
    true when the plan ended for a failed payment. Campaigns, scoring and scraping wait for a new subscription.
  • notestring
    Only when status is managed. It says who changes the plan.
  • x_accountsinteger
    How many X accounts the plan includes.
  • creditsobject
    The owner's credits, shared by all their X accounts.
  • trialobject
    The free trial a first checkout starts with. One per owner.
  • next_payment_discount_percentinteger or null
    20 when the affiliate review post's discount waits on the next payment, else null. See Draft the review post.
  • plansarray of objects
    The plans and their prices in US dollars, each with plan, price_per_month by billing period, currency, credits_per_month and x_accounts. Enterprise has no price and a note, it is booked on a call from the app's chat.
  • credit_packsarray of objects
    The credit packs on sale, each with its id, its credits, its amount and its currency. Credits bought never expire.
  • canobject
    What the owner can do now.
  • manage_urlstring
    The app's Plans page.
Plan object
{
  "object": "plan",
  "plan": "business",
  "billing_period": "monthly",
  "status": "active",
  "subscribed": true,
  "cancel_at_period_end": false,
  "renews_at": "2026-12-14T09:21:05.000Z",
  "ends_at": null,
  "payment_hold": false,
  "x_accounts": 4,
  "credits": {
    "balance": 84250,
    "per_month": 150000,
    "low": false,
    "auto_recharge_pack": "medium",
    "auto_recharge_below": 1000,
    "auto_recharge_failures": 0,
    "has_saved_card": true
  },
  "trial": {
    "available": false,
    "days": 0,
    "code": null
  },
  "next_payment_discount_percent": null,
  "plans": [
    {
      "plan": "starter",
      "price_per_month": {
        "monthly": 99,
        "quarterly": 89,
        "annually": 79
      },
      "currency": "usd",
      "credits_per_month": 50000,
      "x_accounts": 1
    },
    {
      "plan": "business",
      "price_per_month": {
        "monthly": 229,
        "quarterly": 206,
        "annually": 183
      },
      "currency": "usd",
      "credits_per_month": 150000,
      "x_accounts": 4
    },
    {
      "plan": "enterprise",
      "price_per_month": null,
      "currency": "usd",
      "note": "Priced per client: booked on a call with Gemlead's team, from the app's chat."
    }
  ],
  "credit_packs": [
    {
      "id": "mini",
      "credits": 5000,
      "amount": 19,
      "currency": "usd"
    },
    {
      "id": "small",
      "credits": 15000,
      "amount": 49,
      "currency": "usd"
    },
    {
      "id": "medium",
      "credits": 35000,
      "amount": 99,
      "currency": "usd"
    },
    {
      "id": "large",
      "credits": 80000,
      "amount": 199,
      "currency": "usd"
    },
    {
      "id": "xl",
      "credits": 200000,
      "amount": 399,
      "currency": "usd"
    },
    {
      "id": "xxl",
      "credits": 500000,
      "amount": 849,
      "currency": "usd"
    }
  ],
  "can": {
    "checkout": false,
    "change_on_billing_portal": true,
    "buy_credits": true,
    "auto_recharge": true,
    "billing_portal": true
  },
  "manage_url": "https://gemlead.ai/app/plans"
}

Retrieve the plan

GET/v1/planread scopeMCPget_plan

Returns the owner's plan, its billing period and status, the credits, auto-recharge, the free trial, and the prices of the plans and the credit packs.

Returns

The plan object.

Errors

  • The key belongs to a team member. Only the owner of the X account can do this.
GET/v1/plan
curl https://gemlead.ai/api/v1/plan \
  -H "Authorization: Bearer $GEMLEAD_API_KEY"
Response200
{
  "object": "plan",
  "plan": "business",
  "billing_period": "monthly",
  "status": "active",
  "subscribed": true,
  "cancel_at_period_end": false,
  "renews_at": "2026-12-14T09:21:05.000Z",
  "ends_at": null,
  "payment_hold": false,
  "x_accounts": 4,
  "credits": {
    "balance": 84250,
    "per_month": 150000,
    "low": false,
    "auto_recharge_pack": "medium",
    "auto_recharge_below": 1000,
    "auto_recharge_failures": 0,
    "has_saved_card": true
  },
  "trial": {
    "available": false,
    "days": 0,
    "code": null
  },
  "next_payment_discount_percent": null,
  "plans": [
    {
      "plan": "starter",
      "price_per_month": {
        "monthly": 99,
        "quarterly": 89,
        "annually": 79
      },
      "currency": "usd",
      "credits_per_month": 50000,
      "x_accounts": 1
    },
    {
      "plan": "business",
      "price_per_month": {
        "monthly": 229,
        "quarterly": 206,
        "annually": 183
      },
      "currency": "usd",
      "credits_per_month": 150000,
      "x_accounts": 4
    },
    {
      "plan": "enterprise",
      "price_per_month": null,
      "currency": "usd",
      "note": "Priced per client: booked on a call with Gemlead's team, from the app's chat."
    }
  ],
  "credit_packs": [
    {
      "id": "mini",
      "credits": 5000,
      "amount": 19,
      "currency": "usd"
    },
    {
      "id": "small",
      "credits": 15000,
      "amount": 49,
      "currency": "usd"
    },
    {
      "id": "medium",
      "credits": 35000,
      "amount": 99,
      "currency": "usd"
    },
    {
      "id": "large",
      "credits": 80000,
      "amount": 199,
      "currency": "usd"
    },
    {
      "id": "xl",
      "credits": 200000,
      "amount": 399,
      "currency": "usd"
    },
    {
      "id": "xxl",
      "credits": 500000,
      "amount": 849,
      "currency": "usd"
    }
  ],
  "can": {
    "checkout": false,
    "change_on_billing_portal": true,
    "buy_credits": true,
    "auto_recharge": true,
    "billing_portal": true
  },
  "manage_url": "https://gemlead.ai/app/plans"
}

Open the billing portal

POST/v1/plan/billing_portalwrite scopeMCPmanage_plan

Returns a link to Stripe's billing page, the app's Manage subscription, to change or cancel the plan, change the card or see the invoices. An Idempotency-Key is ignored here, so a retry gets a fresh link.

Returns

An object with object at billing_portal, the Stripe url and a message.

Errors

  • Stripe does not know the owner yet. Subscribe to a plan first.
  • The key belongs to a team member. Only the owner of the X account can do this.
  • Stripe did not answer. Nothing changed, try again in a minute.
POST/v1/plan/billing_portal
curl -X POST https://gemlead.ai/api/v1/plan/billing_portal \
  -H "Authorization: Bearer $GEMLEAD_API_KEY"
Response200
{
  "object": "billing_portal",
  "url": "https://billing.stripe.com/p/session/live_YWNjdF8xUTJ3ZXJ0eTEyMw",
  "message": "Open this Stripe page to change or cancel the plan, the card or see the invoices."
}

Buy credits

POST/v1/plan/credits_checkoutwrite scopeMCPmanage_plan

Returns Stripe's payment page for a credit pack, as Get credits on the Plans page. The credits are added once it is paid and never expire. Paid plans only. An Idempotency-Key is ignored here, so a retry gets a fresh link.

Body parameters

  • packstringRequired
    The credit pack, as credit_packs lists them.
    minismallmediumlargexlxxl

Returns

An object with object at credits_checkout, the Stripe url, the pack, its credits and a message.

Errors

  • A required parameter is missing. param names it.
  • A parameter has a value the API does not accept. param names it.
  • The owner has no paid plan. Credit packs come with the plans.
  • The key belongs to a team member. Only the owner of the X account can do this.
  • Stripe did not answer. Nothing changed, try again in a minute.
POST/v1/plan/credits_checkout
curl -X POST https://gemlead.ai/api/v1/plan/credits_checkout \
  -H "Authorization: Bearer $GEMLEAD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "pack": "medium"
  }'
Response200
{
  "object": "credits_checkout",
  "url": "https://checkout.stripe.com/c/pay/cs_live_a1B2c3D4e5F6g7H8i9J0",
  "pack": "medium",
  "credits": 35000,
  "message": "Open this Stripe page to pay for 35000 credits. They are added once it is paid, and never expire."
}

Set auto-recharge

PATCH/v1/plan/auto_rechargewrite scopeMCPmanage_plan

Turns auto-recharge on with a pack, or off. When the balance falls to 1000 credits or fewer, the saved card pays for the pack on its own, so ask the owner first. Turning it on needs a paid plan.

Body parameters

  • packstringRequired
    The pack to buy again, or off.
    minismallmediumlargexlxxloff

Returns

An object with object at auto_recharge, the pack or null, the balance it buys below and a message.

Errors

  • A required parameter is missing. param names it.
  • A parameter has a value the API does not accept. param names it.
  • Turning it on without a paid plan.
  • The key belongs to a team member. Only the owner of the X account can do this.
PATCH/v1/plan/auto_recharge
curl -X PATCH https://gemlead.ai/api/v1/plan/auto_recharge \
  -H "Authorization: Bearer $GEMLEAD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "pack": "medium"
  }'
Response200
{
  "object": "auto_recharge",
  "pack": "medium",
  "below": 1000,
  "message": "Auto-recharge on 35000 credits: the saved card pays for this pack ($99) whenever the balance is at 1000 credits or less."
}

Apply a trial code

POST/v1/plan/trial_codewrite scopeMCPmanage_plan

Applies a personal trial code, like one handed in a DM. The next checkout starts with its free trial. For owners who never had a subscription.

Body parameters

  • codestringRequired
    The trial code, up to 40 characters. Letters and digits, case and spaces do not matter.

Returns

An object with object at trial_code, the code, its trial_days and a message.

Errors

  • A required parameter is missing. param names it.
  • The code is not valid or was used already.
  • The owner already had a subscription. The trial is for new accounts only.
  • The key belongs to a team member. Only the owner of the X account can do this.
POST/v1/plan/trial_code
curl -X POST https://gemlead.ai/api/v1/plan/trial_code \
  -H "Authorization: Bearer $GEMLEAD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "ALOK3"
  }'
Response200
{
  "object": "trial_code",
  "code": "ALOK3",
  "trial_days": 7,
  "message": "Applied: the next checkout (manage_plan checkout) starts with a 7-day free trial."
}

The plan checkout object

A Stripe link for a plan. Nothing is paid until the owner pays on that page.

Attributes

  • objectstring
    Always plan_checkout.
  • kindstring
    checkout for Stripe's checkout without a paid plan, billing_portal once subscribed, where the plan and its period change with proration.
    checkoutbilling_portal
  • urlstring
    The Stripe page to open. It lasts a few minutes.
  • planstring
    The plan asked for.
    starterbusiness
  • billing_periodstring
    The billing period asked for.
    monthlyquarterlyannually
  • trial_daysinteger or null
    With checkout, the free trial's days before the first payment, null without a trial.
  • priceobject
    With checkout, what Stripe charges each period, its amount, its currency and every_months.
  • current_planstring
    With billing_portal, the plan now.
  • current_billing_periodstring or null
    With billing_portal, its billing period now.
  • messagestring
    What the link does, to show the owner.
Plan checkout object
{
  "object": "plan_checkout",
  "kind": "checkout",
  "url": "https://checkout.stripe.com/c/pay/cs_live_a1B2c3D4e5F6g7H8i9J0",
  "plan": "business",
  "billing_period": "annually",
  "trial_days": 3,
  "price": {
    "amount": 2196,
    "currency": "usd",
    "every_months": 12
  },
  "message": "Open this Stripe page to start Business, billed annually: a 3-day free trial, then $2196. The card is asked, nothing is charged until the trial ends."
}

Start a plan checkout

POST/v1/plan/checkoutwrite scopeMCPmanage_plan

Returns the link a plan card opens in the app. Without a paid plan it is Stripe's checkout, with the free trial when the owner can still have one. Once subscribed it is Stripe's billing page, where the plan and its period change with proration, so a second subscription is never made. Enterprise is booked on a call from the app's chat. An Idempotency-Key is ignored here, so a retry gets a fresh link.

Body parameters

  • planstringRequired
    The plan.
    starterbusiness
  • billing_periodstring
    Monthly, quarterly at 10 percent off or annually at 20 percent off. Defaults to the current period, else monthly.
    monthlyquarterlyannually

Returns

A plan checkout object.

Errors

  • A required parameter is missing. param names it.
  • A parameter has a value the API does not accept. param names it.
  • Gemlead's team set this plan up without a Stripe subscription, and changes it.
  • Stripe's billing page was needed and Stripe does not know the owner yet.
  • The key belongs to a team member. Only the owner of the X account can do this.
  • Stripe did not answer. Nothing changed, try again in a minute.
POST/v1/plan/checkout
curl -X POST https://gemlead.ai/api/v1/plan/checkout \
  -H "Authorization: Bearer $GEMLEAD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "plan": "business",
    "billing_period": "annually"
  }'
Response200
{
  "object": "plan_checkout",
  "kind": "billing_portal",
  "url": "https://billing.stripe.com/p/session/live_YWNjdF8xUTJ3ZXJ0eTEyMw",
  "plan": "business",
  "billing_period": "annually",
  "current_plan": "business",
  "current_billing_period": "monthly",
  "message": "Already subscribed: the plan and its billing period change on this Stripe page, prorated there. Nothing changes until it is confirmed there."
}