Netlify AI Gateway API

The AI Gateway API from Netlify — 3 operation(s) for ai gateway.

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /ai-gateway/providers List AI Gateway providers · Get AI gateway providers #
Ask an LLM
“Which model providers can I reach through the AI Gateway?”
“What AI providers and models does the gateway support?”
Tell an agent
List the providers available in the AI Gateway.
Show which AI model providers the gateway supports.
GET /sites/{site_id}/ai-gateway/token Get an AI Gateway token for a site · Get AI gateway token #
Ask an LLM
“Can I get an AI Gateway token scoped to one site?”
“Where do I get credentials for my site to call the AI Gateway?”
Tell an agent
Get an AI Gateway token for site {site}.
Fetch site {site}'s AI Gateway token.
GET /accounts/{account_id}/ai-gateway/token Get an AI Gateway token for a team · Get account AI gateway token #
Ask an LLM
“Can I get an AI Gateway token for my whole team instead of one site?”
“Is there an account-level AI Gateway token?”
Tell an agent
Get an AI Gateway token for account {account}.
Fetch the team-wide AI Gateway token for account {account}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/netlify:netlify-ai-gateway-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

netlify-ai-gateway-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 2.57.0
  title: Netlify's API documentation AI Gateway API
  description: Netlify is a hosting service for the programmable web.
  termsOfService: https://www.netlify.com/legal/terms-of-use/
  x-logo:
    url: netlify-logo.png
    href: https://www.netlify.com/docs/
    altText: Netlify
servers:
- url: https://api.netlify.com/api/v1
security:
- netlifyAuth: []
tags:
- name: AI Gateway
paths:
  /ai-gateway/providers:
    get:
      operationId: getAIGatewayProviders
      tags:
      - AI Gateway
      security: []
      responses:
        '200':
          description: The mapping of providers and supported models
          content:
            application/json:
              schema:
                type: object
                properties:
                  providers:
                    additionalProperties:
                      type: object
                      properties:
                        token_env_var:
                          type: string
                        url_env_var:
                          type: string
                        models:
                          type: array
                          items:
                            type: string
        default:
          description: error
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  code:
                    type: integer
                    format: int64
                  message:
                    type: string
      summary: Get AI gateway providers
      x-summary-source: derived
  /sites/{site_id}/ai-gateway/token:
    parameters:
    - name: site_id
      in: path
      required: true
      description: The site ID
      schema:
        type: string
    get:
      operationId: getAIGatewayToken
      tags:
      - AI Gateway
      responses:
        '200':
          description: AI Gateway token for the site
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: The AI Gateway authentication token
                  url:
                    type: string
                    description: AI gateway base url
                  expires_at:
                    type: integer
                    format: int64
                    description: Unix timestamp when the token expires
        '404':
          description: AI Gateway not available for this site
        default:
          description: error
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  code:
                    type: integer
                    format: int64
                  message:
                    type: string
      description: Returns an AI Gateway token for a specific site
      summary: Get AI gateway token
      x-summary-source: derived
  /accounts/{account_id}/ai-gateway/token:
    parameters:
    - name: account_id
      in: path
      required: true
      description: The account ID
      schema:
        type: string
    get:
      operationId: getAccountAIGatewayToken
      tags:
      - AI Gateway
      responses:
        '200':
          description: AI Gateway token for the account
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: The AI Gateway authentication token
                  url:
                    type: string
                    description: AI gateway base url
                  expires_at:
                    type: integer
                    format: int64
                    description: Unix timestamp when the token expires
        '404':
          description: AI Gateway not available for this account
        default:
          description: error
          content:
            application/json:
              schema:
                type: object
                required:
                - message
                properties:
                  code:
                    type: integer
                    format: int64
                  message:
                    type: string
      description: Returns an AI Gateway token scoped to an account
      summary: Get account AI gateway token
      x-summary-source: derived
components:
  securitySchemes:
    netlifyAuth:
      type: oauth2
      flows:
        implicit:
          scopes: {}
          authorizationUrl: https://app.netlify.com/authorize
externalDocs:
  url: https://www.netlify.com/docs/api/
  description: Online documentation
x-tagGroups:
- name: OAuth
  tags:
  - ticket
  - accessToken
- name: User accounts
  tags:
  - user
  - accountMembership
  - member
  - accountType
  - paymentMethod
  - auditLog
- name: Site
  tags:
  - site
  - environmentVariables
  - file
  - metadata
  - purge
  - snippet
- name: Domain names
  tags:
  - dnsZone
  - sniCertificate
- name: Deploys
  tags:
  - deploy
  - deployedBranch
  - deployKey
- name: Builds
  tags:
  - build
  - buildLogMsg
- name: Dev servers
  tags:
  - devServer
- name: Webhooks and notifications
  tags:
  - hook
  - hookType
  - buildHook
  - devServerHook
- name: Services
  tags:
  - service
  - serviceInstance
- name: Functions
  tags:
  - function
- name: Database
  tags:
  - database
- name: Forms
  tags:
  - form
  - submission
- name: Split tests
  tags:
  - splitTest
- name: Large media
  tags:
  - asset
  - assetPublicSignature