API7 Docs
AISIX AI GatewayOpen-Source AISIX Gateway Admin APICreate Playground Chat Completion

Create Playground Chat Completion

POST /playground/chat/completions

POST /playground/chat/completions

Interactive request editor loads with JavaScript.

Authorization

ProxyBearer
AuthorizationBearer <token>

Proxy API key. Used only by /playground/chat/completions.

In: header

Request Body

application/json

OpenAI-compatible chat completion request forwarded through the in-process proxy router.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://127.0.0.1:3001/playground/chat/completions" \  -H "Content-Type: application/json" \  -d '{}'

OK. OpenAI-compatible chat completion response.

{}
Complete operation details and schema variants

POST /playground/chat/completions

Create Playground Chat Completion

Forwards a chat completion through the proxy path for local playground testing. Use a proxy API key, not an admin key.

Parameters

Request body

OpenAI-compatible chat completion request forwarded through the in-process proxy router.

Content type: application/json

Responses

  • 200: OK. OpenAI-compatible chat completion response.
  • 400: Malformed or invalid JSON request body.
  • 401: Missing or invalid proxy API key.
  • 403: Requested model is not allowed for the proxy API key or client IP.
  • 404: Requested model is not configured.
  • 413: Request body exceeds the proxy body-size limit.
  • 422: Proxy validation or guardrail error.
  • 429: Proxy rate limit or budget limit exceeded.
  • 501: Proxy router is not wired into this admin router.
  • error_msg (string, required): Human-readable error message.
  • 502: Upstream proxy error.
  • 503: Proxy route unavailable or all routing targets filtered.

cURL

curl -X POST 'http://127.0.0.1:3001/playground/chat/completions'