Model Context Protocol (MCP)
Connect AI Portal to compatible AI agents and generate images and videos using your AI Portal models directly from chat or coding workflows.
Endpoint
The AI Portal MCP server uses the Streamable HTTP transport.
Authentication
Two authentication methods are supported. Choose the one that fits your client.
OAuth 2.1 + PKCE
For ChatGPT and other OAuth-capable agents. Authorize once — no token copy-paste.
Personal Access Token
For the MCP SDK, CLI, and any client that supports manual Bearer tokens.
Personal Access Token (PAT)
- Go to Settings → AI Portal MCP.
- Click Create new token, choose scopes, expiry, and total/daily credit caps.
- Copy the token — it is shown only once.
- Pass it as
Authorization: Bearer <token>. - Credit caps are nonnegative whole numbers. A cap of 0 blocks credit use; it does not mean unlimited. Daily usage resets at 00:00 UTC.
Connect ChatGPT via OAuth 2.1
ChatGPT uses OAuth 2.1 + PKCE. You do not need to create a token manually — ChatGPT handles the authorization flow automatically using the discovery endpoints below.
Check the client identity on the consent screen.
A dynamically registered (DCR) client may claim any display name. An “unverified” label means AI Portal has not verified that name or branding, so only approve it when you trust the app that initiated the request. You can also set total and UTC-daily credit caps before approval; a cap of 0 blocks credit use.
OAuth discovery endpoints (auto-discovered by ChatGPT)
/.well-known/oauth-protected-resource/api/mcp/.well-known/oauth-authorization-server/api/api/oauth/register/api/oauth/authorize/api/oauth/token/api/oauth/revokeHow to connect ChatGPT (requires an account with Developer mode access)
- Enable Developer mode in ChatGPT settings. Workspace accounts may require an administrator to enable it.
- Open the apps/plugins area and create a custom MCP app.
- Paste the MCP endpoint URL:
https://veogoogle.ai/api/mcp - Select OAuth as the authentication method. ChatGPT will auto-discover the OAuth endpoints.
- Click Scan Tools. ChatGPT will redirect you to AI Portal to sign in and approve access.
- Click Create. The connector appears in your workspace.
- Use it in a chat by selecting the app from the tools menu and prompting: "Generate an image of a sunset over the ocean."
Compatibility: Account eligibility and menu names vary by client. Claude supports custom remote connectors; Gemini custom-app availability depends on your region and account. Use the canonical MCP URL as the OAuth resource at authorization and token exchange. Access tokens expire after one hour; refresh tokens rotate and retain the same approved credit budget. Legacy discovery aliases remain supported. A successful connection must still be verified in your chosen client.
Connecting Clients
The official @modelcontextprotocol/sdk client has been tested with this Streamable HTTP endpoint and bearer authentication. Compatibility with Claude Code, Cursor, and Codex has not been verified and is not asserted.
Official JavaScript SDK
Keep the endpoint and Personal Access Token in environment variables.
Supported Models
These are the models currently mapped and supported by your AI Portal MCP connection.
Sign in to view models available on your account.
Sign InAvailable Tools
generate_image
Generate an image using a specified model.
prompt(string, required): Description of the image.model(string, required): Model ID (uselist_available_models).idempotency_key(string, optional): 8–128 character unique key. If omitted, the server creates and returns one. Reuse that key and the same inputs when retrying; omitting it again starts a new request.aspect_ratio(string): One of the selected model's advertised ratios.reference_images(array): Owned gallery image IDs,image:<asset-id>, or exact HTTPS URLs of owned gallery images. Arbitrary URLs and uploads/local files are rejected.
generate_video
Generate a video using a specified model.
prompt(string, required): Description of the video.model(string, required): Model ID.idempotency_key(string, optional): Reuse the supplied or server-returned key and the same inputs when retrying.duration,aspect_ratio,native_audio(optional): Use only values advertised by the model.reference_images,start_frame,end_frame(optional): Owned gallery references only; arbitrary URLs and uploads/local files are rejected.
get_generation
Retrieve the status and result of an async generation job.
generation_id(string, required): ID returned by generate tools.
list_available_models
List all image and video models you have access to.
Error Codes
| Code | Description |
|---|---|
| INVALID_MODEL | The model ID is incorrect or unavailable. |
| UNAUTHORIZED | Invalid or missing token. |
| INSUFFICIENT_CREDITS | You don't have enough credits. |
| RATE_LIMITED | Too many requests. Please slow down. |