For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://modelgates.ai/docs/_mcp/server.

Stripe Projects

Stripe Projects is a CLI-based developer tool marketplace that lets you provision production-grade services -- hosting, databases, auth, analytics, AI, and more -- directly from your terminal. ModelGates is a launch partner, so you can add AI model access to any project with a single command. Browse the full catalog at projects.dev/providers and read Stripe's docs at docs.stripe.com/stripe-projects.

Stripe Projects home page at projects.dev showing stripe projects add modelgates/api provisioning, syncing credentials, and writing env vars to .env

Why Use Stripe Projects with ModelGates?

  • One command to get started -- stripe projects add modelgates/api provisions an ModelGates account, generates an API key, and syncs it to your .env file automatically.
  • Unified billing -- Manage all your infrastructure costs (hosting, database, AI) through a single Stripe account.
  • Credential management -- API keys are stored in Stripe's encrypted vault and synced to your local environment. Rotate credentials without touching your codebase.
  • Agent-friendly -- Stripe Projects writes skill files into your project directory, so coding agents can provision and configure services on your behalf.

Prerequisites

  1. A Stripe account
  2. The Stripe CLI installed and up to date
  3. The Projects plugin installed:
bash
stripe plugin install projects

Quick Start

Browse the catalog

List every provider or filter down to ModelGates before installing:

bash
# All providersstripe projects catalog # Just ModelGates's services and plansstripe projects catalog modelgates

You can also browse the web directory at projects.dev/providers.

Add ModelGates to your project

If you already have a Stripe project initialized, add ModelGates in one step:

bash
stripe projects add modelgates/api

This provisions an ModelGates account (or links your existing one), generates an API key, and syncs ModelGates's environment variables to your .env file. By default the service is provisioned on the Free plan -- see Plans and billing below to upgrade.

Start from scratch

If you're starting a new project, initialize it first:

bash
# Initialize a new Stripe projectstripe projects init my-app # Add ModelGatesstripe projects add modelgates/api

Verify your setup

After adding ModelGates, confirm everything is working:

bash
# Check project statusstripe projects status # Test the API keycurl https://modelgates.ai/api/v1/chat/completions \  -H "Content-Type: application/json" \  -H "Authorization: Bearer $MODELGATES_API_KEY" \  -d '{    "model": "openai/gpt-4.1-mini",    "messages": [{"role": "user", "content": "Hello!"}]  }'

What Gets Provisioned

When you run stripe projects add modelgates/api, the following happens:

  1. Account creation or linking -- Stripe Projects finds your ModelGates account by email or creates a new one automatically. See Account linking for details on each path.
  2. API key generation -- A dedicated API key (sk-mg-v1-...) is minted and labeled "Provisioned by Stripe" so it's easy to identify alongside your other keys at modelgates.ai/settings/keys.
  3. Environment sync -- The following variables are stored in Stripe's encrypted vault and written to your project's .env:
bash
MODELGATES_API_KEY=sk-mg-v1-...MODELGATES_TYPE=bearer

Your API key works with the full ModelGates API, giving you access to 300+ AI models through a single endpoint.

Service Details

ProviderModelGates
Servicemodelgates/api
CategoryAI
Plansfree (no credit card required) or pay-as-you-go (per-token usage pricing)
PricingPer-token, varies by model. See model pricing.

Choose a plan

stripe projects add modelgates/api prompts you to choose between the Free and Pay-as-you-go plans when you provision. The Free plan works without a payment method. To switch plans later, use stripe projects upgrade or stripe projects downgrade:

bash
# Move an existing resource to pay-as-you-gostripe projects upgrade modelgates/api # Move back to the free planstripe projects downgrade modelgates/api

Managing Your ModelGates Service

Stripe's remove and rotate commands accept either the local resource name (e.g. modelgates-api) or the <provider>/<service> reference. Use stripe projects services list to see the exact resource names in your project.

Rotate credentials

If you need to rotate your API key (for example, after a team member leaves):

bash
stripe projects rotate modelgates/api

This generates a new API key, disables the old one, and updates your .env file automatically.

Remove the service

To remove ModelGates from your project and revoke the API key:

bash
stripe projects remove modelgates/api

Add --only-credentials to forget the local resource without deprovisioning it on ModelGates's side.

Sync environment variables

List the project's environment variables (values are hidden):

bash
stripe projects env

If your .env file gets out of sync, pull the latest credentials:

bash
stripe projects env --pull

Open the ModelGates dashboard

Jump straight to your ModelGates dashboard from the CLI:

bash
stripe projects open modelgates

Account Linking

Stripe Projects resolves your ModelGates account by the email on your Stripe account:

  • No existing ModelGates account -- A new account is created inline and credentials are returned directly from the provisioning call. No browser pop-up.
  • Existing ModelGates account -- Stripe and ModelGates complete a headless OAuth 2.0 code exchange (against POST /api/v1/provisioning/oauth/token) to link your account. No browser pop-up in the common case.
  • Fallback -- In rare cases (for example, an idempotent replay before linking completes), you'll be prompted to open a browser to finish authorizing the connection. Once linked, the association persists across projects in the same Stripe account.

Plans and billing

ModelGates ships with two plans through Stripe Projects:

  • Free -- Access free AI models at zero cost. No payment method required.
  • Pay-as-you-go -- Per-token pricing across 300+ models with no minimum commitment. See modelgates.ai/models for rates.

When you choose a paid plan, Stripe tokenizes your Stripe-stored payment credentials into a Shared Payment Token and grants ModelGates a payment credential scoped to that upgrade. Your underlying card/bank details are never shared directly.

Manage your payment method on Stripe's side:

bash
# View the payment method on filestripe projects billing show # Add or update a payment methodstripe projects billing add

Using with Coding Agents

Stripe Projects is designed to work with coding agents. When you initialize a project, Stripe writes skill files into your project directory so agents can provision and manage services using the same deterministic CLI.

Example prompts for your agent:

  • "Add ModelGates to this project so I can call AI models."
  • "Rotate my ModelGates API key."
  • "What AI services are available in the Stripe Projects catalog?"

To avoid browser pop-ups during agent-driven provisioning, complete the following flow manually before starting your agent session:

bash
stripe loginstripe projects link modelgatesstripe projects billing add   # only if you plan to use pay-as-you-go

Then let the agent call stripe projects add modelgates/api.

For fully non-interactive provisioning (CI, scripts, agents), pass --json --yes:

bash
stripe projects add modelgates/api --json --yes

To give your agent a combined, up-to-date context document for every provider in your project (including ModelGates's quickstart, models, and SDK skills), run:

bash
stripe projects llm-context

Next Steps

  • Quickstart -- Learn the basics of calling the ModelGates API
  • Models -- Browse 300+ available models and compare pricing
  • API Key Rotation -- Best practices for credential management
  • Guardrails -- Set spending limits and model restrictions
  • Provider Selection -- Control which providers handle your requests