# API Plaza gateway rules (append to .cursorrules) All LLM/image/video API calls in this project go through API Plaza (OpenAI-compatible gateway). - base_url: https://api.apiplaza.ai/v1 - auth: Authorization: Bearer $API_PLAZA_KEY (read from env, never hardcode keys) - Use the official OpenAI SDK. Do not switch providers or base URLs without asking. - Model ids come from GET /v1/models (live). Do not invent model names. - Chat: POST /v1/chat/completions (stream:true for SSE, tools supported). - Images: POST /v1/images/generations. Video is async: POST /v1/videos then poll GET /v1/videos/{task_id} (>=2s interval) until status=completed. - On 401 check the key; on 402 the balance is empty (stop and tell the user); on 429 retry with exponential backoff; 5xx are never billed, safe to retry. - Full machine-readable reference: https://apiplaza.ai/llms-full.txt