Panglong API Gateway Unified public access layer for chat, image, and video generation
Production AI access layer

One domain for real-world AI delivery.

Panglong API Gateway turns three separate AI backends into one clean external product surface. Callers get a single domain, a shared auth pattern, a consistent response envelope, and async task tracking for long-running video work.

Unified auth Use one bearer token format across text, image, video, and task lookups.
Response contract Every public route returns the same gateway envelope for success and failure states.
Video failover Long-running video jobs can route through an account pool with async polling support.
Safe exposure Internal upstream services stay behind Nginx and the FastAPI gateway instead of facing the public internet directly.

Chat

Forward text generation to the text upstream through one stable public contract. Existing upstream business logic stays untouched behind the gateway.

POST /api/v1/chat Send prompts or message arrays and receive a unified gateway result.
Direct sync output Designed for app integrations that want the text result immediately.

Image

Expose image generation through the same hostname and auth flow, while the gateway rewrites returned image paths into a public-safe proxy pattern.

POST /api/v1/image Submit image generation requests with one response envelope.
Proxy-safe assets Relative upstream image URLs are rewritten to public gateway paths.

Video

Video generation is modeled as an async task system so account-pool routing, retries, and failover can happen without blocking the caller.

POST /api/v1/video Create a video task through the account-pool pipeline.
GET /api/v1/tasks/{task_id} Poll progress, final outputs, or failure details from one place.

How external callers use it

The gateway is designed to feel like one product even though multiple upstream systems sit behind it.

1
Call one public domain Apps integrate with a single HTTPS hostname instead of learning multiple internal services.
2
Send one auth pattern Every protected route uses the same bearer token style, which keeps client implementation simple.
3
Receive one response envelope Callers can standardize error handling and logging because the gateway wraps upstream behavior consistently.
4
Track long tasks in place Video creation uses task IDs so clients do not need a second status system.

Operational shape

This hostname is a delivery surface, not an admin console. It exists to provide a clean browser entry and a machine-to-machine API front door.

4 public API endpoints
1 shared auth pattern
24/7 always-on gateway entry
Open the docs for interactive testing: /docs
Use the health route for monitoring and uptime checks: https://api.panglongyunying.cn/health
Keep administrative account operations on a separate surface instead of overloading the public API hostname.