# use-ai-gateway-provider

Helps you call AI models for text, images and video from PHP and WordPress code through Vercel AI Gateway.

Skill by Vercel. Category: Agent craft.

## Install

Project (for this project only):

```sh
npx skills add vercel-labs/ai-gateway-provider-php --skill use-ai-gateway-provider
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

Global (for every project on this machine):

```sh
npx skills add vercel-labs/ai-gateway-provider-php --skill use-ai-gateway-provider -g
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

## Tags

- Runs on your computer: It runs as a program on your machine, with your access.

## Security audits

- Gen Agent Trust Hub: Pass
- Socket: Pass
- Snyk: Pass

Installs: 8. Installs counted by skills.sh. [Open on skills.sh](https://www.skills.sh/vercel-labs/ai-gateway-provider-php/use-ai-gateway-provider)

## Source

[Open the source](https://github.com/vercel-labs/ai-gateway-provider-php/tree/HEAD/skills/use-ai-gateway-provider). Checked 2026-10-24. This summary may contain AI-generated text, so it can be wrong. Check the source before you rely on it.

## SKILL.md

````markdown
---
name: use-ai-gateway-provider
description: 'Use the Vercel AI Gateway provider for PHP (the `vercel-labs/ai-gateway-provider` Composer package and the Vercel AI Gateway Provider WordPress plugin) to call generative AI models from PHP. Use when: (1) writing PHP / WordPress code that generates text, images, or video via the AI Gateway, (2) working with the `ai_gateway` provider or the `WordPress/php-ai-client` SDK prompt builder, (3) adding AI features to a WordPress plugin or theme.'
---

# Vercel AI Gateway provider for PHP

A provider for the [`WordPress/php-ai-client`](https://github.com/WordPress/php-ai-client) SDK that routes generative AI requests through the [Vercel AI Gateway](https://vercel.com/ai-gateway). It ships both as a Composer package and as a WordPress plugin.

## Read the bundled docs before writing any code

The package bundles usage documentation that matches the installed version. Read the file for the context you are working in — do not write code against this provider without it.

### Scenario A: If in the context of a WordPress project

Read the docs at `wp-content/plugins/vercel-ai-gateway-provider/docs/wordpress.md`.

If more specific detail knowledge about low-level provider behavior is needed that the docs do not cover, you may inspect the source code in `wp-content/plugins/vercel-ai-gateway-provider/src/`.

If the plugin is not installed yet, install the [Vercel AI Gateway Provider plugin](https://wordpress.org/plugins/vercel-ai-gateway-provider/).

### Scenario B: If in the context of a non-WordPress PHP project

Read the docs at `vendor/vercel-labs/ai-gateway-provider/docs/php.md`.

If more specific detail knowledge about low-level provider behavior is needed that the docs do not cover, you may inspect the source code in `vendor/vercel-labs/ai-gateway-provider/src/`.

If the package is not installed yet, run `composer require vercel-labs/ai-gateway-provider`, then read the docs.

## Do not answer from memory

This provider and the underlying SDK are young and change between releases, and available models change constantly. Whatever you recall about entry points, method names, or model IDs is likely wrong or stale. Ground every API call in the bundled docs, and in the package source when the docs do not cover it.

If neither the docs nor the source support an answer, say so instead of guessing.
````

- Previous: [geist-learning-lab](https://syn4pse.dev/terminal/geist-learning-lab.md)
- Next: [mcp-server-yaml-creator](https://syn4pse.dev/terminal/mcp-server-yaml-creator.md)
- [Terminal](https://syn4pse.dev/terminal.md)
- [Suggest a change](mailto:terminal@syn4pse.dev?subject=Terminal%20suggestion)
