Create AI API Proxy
Endpoint
POST /apiops/projects/{projectName}/apiProxies/ai/{apiProxyName}/
Creates an API proxy of type AI. AI proxies forward traffic to an LLM provider (OpenAI, Anthropic,
DeepSeek, Azure OpenAI, self-hosted vLLM/Ollama, …) instead of a classic backend address.
This is the APIops-native way to create an AI proxy. The classic /apiProxies/url/ and
/apiProxies/file/ endpoints produce REVERSE_PROXY / OPEN_API / WSDL proxies and cannot
produce type=AI.
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Permission: API_MANAGEMENT × MANAGE.
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | AI API proxy name. Overrides any name carried in the body. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| relativePath | string | Yes | Client-facing path the gateway listens on (for example /ai/chat) |
| description | string | No | Free-text description |
| llmProviderName | string | No | Name of an existing LLM provider connection in the same project. Resolved to its internal reference when the proxy is created. |
| modelId | string | No | Catalog model id to route to (for example gpt-4o-mini, deepseek-chat) |
| streaming | boolean | No | Enables SSE streaming responses |
llmProviderName, modelId and streaming populate the proxy's primary aiRouting
configuration. They are optional at creation time — a proxy may be created first and routed
afterwards through Update AI Routing or the Manager UI.
Full JSON Body Example
{
"relativePath": "/ai/chat",
"description": "Customer support assistant",
"llmProviderName": "openai-prod",
"modelId": "gpt-4o-mini",
"streaming": false
}
Minimal Body Example
{
"relativePath": "/ai/chat"
}
Response
Success Response (200 OK)
{
"status": "SUCCESS",
"deploymentResult": {
"success": false,
"detailList": []
}
}
Creation does not deploy the proxy. Deploy it separately with
POST /apiops/projects/{projectName}/apiProxies/{apiProxyName}/environments/{environmentName}/.
Error Responses
| HTTP Code | Condition |
|---|---|
| 400 | apiProxyName is empty, request body is missing, relativePath is empty, an API proxy with the same name already exists in the project, or llmProviderName does not match any LLM provider in the project |
| 401 | Token is missing or invalid |
| 500 | Unexpected server error |
{
"status": "FAIL",
"message": "LLM provider (name: openai-prod) was not found in project!"
}
Notes and Warnings
- References are by name.
llmProviderNameis the provider connection's name, not its identifier. APIops never accepts or returns raw object identifiers, because they are not portable between installations. - AI proxies use
aiRouting, notrouting. Backend selection, failover, timeouts, mTLS, outbound HTTP proxy and SSL behaviour all live inaiRouting. As a result the routing-dependentsettings/*endpoints (circuit breaker, proxy server, mTLS, NTLM, connection, error handling, custom message, gRPC, WebSocket, addresses, routing status, metadata) reject AI proxies with HTTP 400 and point to Update AI Routing instead. - Proxy-level settings still apply. CORS, cache, idempotency, error templates, forwarded-IP header, spec access type, client route, API keys, maintenance mode, trace and traffic-log settings work on AI proxies exactly as they do on classic proxies.
- Policies are attached the same way as for any other proxy, through
POST /apiops/projects/{projectName}/apiProxies/{apiProxyName}/policies/{policyName}/. All AI policy types (PII masking, prompt guard, token rate limit, semantic cache, DLP guard, loop guard, topic guard, RAG injection, MCP tool call, A2A agent call, …) are supported.