App Store template
New API icon

New API

Open-source AI model gateway compatible with the OpenAI API, with multi-provider routing, quota management, channel orchestration, and an admin dashboard.

Launch in your Sealos workspace.

New API template preview
Template previewFull screenshot
Template deployments
104 on Sealos
Deployment
Your own instance
Category
AI

About this template

Overview

New API is a next-generation LLM gateway and AI asset management system that exposes a unified OpenAI-compatible API. This template deploys New API as a single persistent application backed by KubeBlocks-managed PostgreSQL and Redis on Sealos Cloud.

From the documentation

New API sits between your applications and upstream AI providers, giving you one endpoint for model routing, quota control, channel orchestration, and operational visibility. It helps teams standardize provider access while keeping user, token, and channel management in one web console.

How to deploy New API

  1. Choose Deploy now to start New API in your Sealos workspace.
  2. Sign in to Sealos and review the template configuration in your workspace.
  3. Launch the template, then inspect the application status and resource cards in Canvas.

Resources to plan for

Start with the resources defined by the New API template. Review CPU, memory, persistent storage, and network allocations for every service in Canvas. Capacity needs depend on your data and workload; monitor usage as they grow.

Template configuration and setup

Access after deployment

Use the application URL or connection details shown in Canvas. Follow the deployment guide for first-time account setup or client configuration, and keep generated credentials available for that step.

Hosting and billing

Sealos monthly plans include compute, memory, storage, and traffic. Size your plan for all deployed services. Software licenses and external AI or API services may have separate terms and charges. Confirm the applicable plan and optional charges in Cost Center.

Compare Sealos resource plans
Read full documentationCollapse documentation

For current cloud charges, refer to Sealos plan pricing. Upstream documentation may reference earlier billing models.

Deploy and Host New API on Sealos

New API is a next-generation LLM gateway and AI asset management system that exposes a unified OpenAI-compatible API. This template deploys New API as a single persistent application backed by KubeBlocks-managed PostgreSQL and Redis on Sealos Cloud.

New API Logo

About Hosting New API

New API sits between your applications and upstream AI providers, giving you one endpoint for model routing, quota control, channel orchestration, and operational visibility. It helps teams standardize provider access while keeping user, token, and channel management in one web console.

This Sealos template provisions the application runtime together with PostgreSQL, Redis, persistent storage, HTTPS ingress, and the database bootstrap job. The result is a ready-to-run deployment that keeps application data and logs durable across restarts while exposing the service through a Sealos-managed public URL.

Common Use Cases

  • Unified OpenAI-Compatible Gateway: Route requests from multiple model providers through one stable API endpoint.
  • Team Quota Management: Manage users, channels, quotas, and access rules from a central dashboard.
  • Provider Fallback and Traffic Steering: Shift traffic across vendors without changing client-side integrations.
  • Internal AI Platform: Offer a shared gateway for engineering, product, or operations teams inside your own cluster.
  • Self-Hosted Model Operations: Keep gateway state, credentials, and routing policies under your own infrastructure control.

Dependencies for New API Hosting

The Sealos template includes all required dependencies for running New API:

  • New API application container
  • PostgreSQL 16.4 provided by KubeBlocks
  • Redis 7.2.7 provided by KubeBlocks
  • PostgreSQL init job for the new-api database
  • Kubernetes StatefulSet, Service, and Ingress
  • Persistent storage for /data and /app/logs
Deployment Dependencies
Implementation Details

Architecture Components:

This template deploys the following services:

  • New API StatefulSet (calciumion/new-api:v0.13.2): Serves the web UI and OpenAI-compatible API on port 3000
  • PostgreSQL Cluster: Stores users, channels, quotas, and application configuration
  • Redis Cluster: Provides cache and Redis-backed runtime state
  • PostgreSQL Init Job: Waits for database readiness and creates the new-api database idempotently, using the same small Sealos resource ladder as the application container
  • Service, Ingress, and App Resources: Publish the application over Sealos-managed HTTPS

Configuration:

  • SQL_DSN is composed from the KubeBlocks secret ${{ defaults.app_name }}-pg-conn-credential.
  • REDIS_CONN_STRING is built from ${{ defaults.app_name }}-redis-redis-account-default and the internal Redis service DNS.
  • SESSION_SECRET and CRYPTO_SECRET are generated by default so the deployment starts with stable runtime secrets.
  • Health checks target /api/status, and persistent volumes are mounted at /data and /app/logs.
  • The application and init containers use 200m CPU / 256Mi memory limits with 20m CPU / 25Mi memory requests. Each application PVC requests 103Mi, which passed live cold-start validation for the application data and log directories.

License Information:

New API is licensed under the GNU Affero General Public License v3.0. The upstream project also notes that organizations with commercial licensing concerns can contact the maintainers directly.

Why Deploy New API on Sealos?

Sealos is an AI-assisted Cloud Operating System built on Kubernetes, so you get Kubernetes-grade deployment primitives without maintaining the manifests and operational wiring yourself. For New API, that means the gateway, database, cache, storage, and public HTTPS entrypoint are delivered as one packaged template.

By deploying New API on Sealos, you get:

  • One-Click Deployment: Launch the full stack from a template instead of assembling PostgreSQL, Redis, ingress, and storage by hand.
  • Managed Kubernetes Foundation: Run on standard Kubernetes resources with service discovery, stable storage, and controlled rollouts.
  • Easy Customization: Change resources and configuration later through Canvas, AI dialog, and resource cards.
  • Persistent Storage Included: Keep application data and logs durable across pod restarts and upgrades.
  • Instant Public HTTPS Access: Expose the UI and API through a Sealos-managed ingress with TLS enabled.
  • Pay-As-You-Go Efficiency: Start with a small footprint and scale resources only when traffic or data size requires it.

Deployment Guide

  1. Open the New API template and click Deploy Now.
  2. Configure the deployment parameters in the popup dialog:
    • app_host
    • app_name
    • session_secret
    • crypto_secret
  3. Wait for deployment to complete, which typically takes 2-3 minutes. After deployment, you will be redirected to Canvas. For later changes, describe the update in AI dialog or use the relevant resource cards.
  4. Access New API at https://<app_host>.<SEALOS_CLOUD_DOMAIN>. On first launch, the setup wizard checks PostgreSQL, asks you to create the root administrator account, asks you to choose a usage mode, and then initializes the system. After setup, sign in at /login with the administrator username and password you created.

Configuration

After deployment, you can configure New API through:

  • Web UI: Add providers, channels, quotas, groups, and runtime settings from the dashboard
  • AI Dialog: Ask Sealos AI to adjust resource sizes or template-backed settings
  • Resource Cards: Open the application, PostgreSQL, Redis, ingress, or storage cards to make targeted changes
Template Parameters
ParameterDescriptionDefault
app_hostPublic hostname prefix for the New API ingressnew-api-<random>
app_nameKubernetes resource name prefix for the deploymentnew-api-<random>
session_secretSession secret used by New APIRandom 32-character value
crypto_secretEncryption secret used for Redis-backed encrypted stateRandom 32-character value
Operational Notes
  • Keep session_secret stable if you reuse the same deployment state.
  • Keep crypto_secret stable if Redis-backed encrypted data is already in use.
  • The init job creates the new-api PostgreSQL database only when it does not already exist.
  • The template is intentionally single-replica by default. Validate your own session and runtime behavior before increasing replicas.

Scaling

To scale New API on Sealos:

  1. Open the deployment in Canvas.
  2. Click the New API StatefulSet resource card.
  3. Adjust CPU and memory requests or limits as needed.
  4. Apply the change and monitor the rollout.

For stateful components, scale PostgreSQL and Redis separately through their own resource cards if your workload requires it. Keep the application replica count at 1 unless you have validated your own multi-replica strategy.

Troubleshooting

Common Issues

Issue: Setup or login behaves inconsistently after a redeploy

  • Cause: SESSION_SECRET changed after the initial deployment.
  • Solution: Restore the original secret value and restart the application pod.

Issue: Redis-backed encrypted data cannot be decrypted

  • Cause: CRYPTO_SECRET changed while encrypted data already exists in Redis.
  • Solution: Restore the original crypto_secret value before restarting the workload.

Issue: The application starts but database initialization fails

  • Cause: PostgreSQL was not ready when the app first attempted to start, or the init job did not complete successfully.
  • Solution: Check the ${{ defaults.app_name }}-pg-init job status and the PostgreSQL cluster health in Canvas, then retry the application rollout if needed.
Getting Help

Additional Resources

License

This Sealos template is provided under the license policy of the Sealos templates repository. New API itself is licensed under the GNU Affero General Public License v3.0.

From launch to everyday operations

Why deploy
on Sealos

A shorter path from an app you want to an app you can run. Sealos brings deployment and ongoing operations into one place.

  1. One-click deployment

    Start with a ready-made template. Review its configuration and launch from the Sealos console.

  2. Managed Kubernetes

    Run on managed infrastructure with built-in workload scheduling and recovery.

  3. Automatic HTTPS

    Give your application a public HTTPS endpoint with certificates managed for you.

  4. Persistent storage

    Keep application data on persistent volumes across container restarts.

  5. Room to grow

    Adjust CPU, memory, and replicas from the console as your workload changes.

One template. Connected resources.

You Get the Whole Stack

Sealos provisions the resources defined by your template and brings them together in your workspace.

  • App Service

    Container workloads with configurable CPU, memory, and replicas.

  • Public HTTPS URL

    An address for your app, with managed TLS certificates.

  • Database

    A database provisioned alongside your app when the template calls for one.

  • Persistent Volume

    Storage for the files and data your application needs to keep.

  • Environment Variables

    Application settings and secrets configured in one place.

  • Logs & Metrics

    Inspect container logs and resource usage from the console.

Resources and their configuration vary by template. Review the deployment form for this app’s exact setup.

Explore more production-ready templates.

More