Novita AI - Serverless GPU Platform - Kodus

4 min read Original article ↗

How Novita works

Novita is a serverless infrastructure platform for AI, designed to scale open-source models with low latency and reduced cost. It supports hundreds of production-ready models — including Llama, Mistral, Claude, and Stable Diffusion — and provides optimized APIs, on-demand GPUs, and custom model deployments without any DevOps overhead.

We recommend good coding models with +100k context window.

ModelPricingContext Window
Deepseek v3 0324 recommended$0.33/1.3~128k tokens
Deepseek R1 0528$0.7/2.5~128k tokens
Llama 4 Maverick Instruct$0.17/0.85~100k tokens

Creating API Key

Go directly to Novita’s API Keys page to create a new API Key. Or, follow these steps:

  1. Go to your Novita console
  2. Click on the “Manage API Keys” button or go to your profile picture and click API Keys
  3. Click on “Add New Key” and fill with ‘Kodus’ or any name you want
  4. Click on “Confirm”
  5. Copy the API Key and save it somewhere safe

System Requirements

Domain Name Setup (Optional)

If you're planning to integrate Kodus with cloud-based Git providers (GitHub, GitLab, or Bitbucket), you'll need public-facing URLs for both the Kodus Web App and its API. This allows your server to receive webhooks for proper Code Review functionality and ensures correct application behavior. We recommend setting up two subdomains:

  • One for the Web Application, e.g., kodus-web.yourdomain.com.
  • One for the API, e.g., kodus-api.yourdomain.com.

Webhooks are handled by a separate service (port 3332). You can either:

  • Use a dedicated webhooks subdomain, e.g., kodus-webhooks.yourdomain.com, or
  • Keep using the API domain and route /github/webhook, /gitlab/webhook, etc. to the webhooks service in your reverse proxy.

Both subdomains should have DNS A records pointing to your server's IP address. Later in this guide, we will configure a reverse proxy (Nginx) to route requests to these subdomains to the correct internal services. This setup is essential for full functionality, including webhooks and authentication.

Note: If you're only connecting to self-hosted Git tools on your network and do not require public access or webhooks, you might be able to use a simpler setup, but this guide focuses on public-facing deployments.

Setup

Configure Novita in Environment File

Edit your .env file and configure the core settings. For LLM Integration, use Novita in Fixed Mode:

# Core System Settings (update with your domains)
WEB_HOSTNAME_API="kodus-api.yourdomain.com"    
WEB_PORT_API=443                               
NEXTAUTH_URL="https://kodus-web.yourdomain.com"

# Security Keys (generate with openssl commands above)
WEB_NEXTAUTH_SECRET="your-generated-secret"
WEB_JWT_SECRET_KEY="your-generated-secret"
API_CRYPTO_KEY="your-generated-hex-key"
API_JWT_SECRET="your-generated-secret"
API_JWT_REFRESHSECRET="your-generated-secret"

# Database Configuration
API_PG_DB_PASSWORD="your-secure-db-password"
API_MG_DB_PASSWORD="your-secure-db-password"

# Novita Configuration (Fixed Mode) 
API_LLM_PROVIDER_MODEL="deepseek-v3-0324"                    # Choose your preferred model
API_OPENAI_FORCE_BASE_URL="https://api.novita.ai/v3/openai"  # Novita API URL
API_OPEN_AI_API_KEY="your-novita-api-key"                    # Your Novita API Key

# Git Provider Webhooks (choose your provider)
API_GITHUB_CODE_MANAGEMENT_WEBHOOK="https://kodus-api.yourdomain.com/github/webhook"
# or API_GITLAB_CODE_MANAGEMENT_WEBHOOK="https://kodus-api.yourdomain.com/gitlab/webhook"
# or GLOBAL_BITBUCKET_CODE_MANAGEMENT_WEBHOOK="https://kodus-api.yourdomain.com/bitbucket/webhook"

Run the Installation Script

Set the proper permissions for the installation script:

chmod +x scripts/install.sh

Run the script:

What the Installer Does

Our installer automates several important steps:

  • Verifies Docker installation
  • Creates networks for Kodus services
  • Clones repositories and configures environment files
  • Runs docker-compose to start all services
  • Executes database migrations
  • Seeds initial data

🎉 Success! When complete, the Kodus Web App and backend services (API, worker, webhooks, MCP manager) should be running on your machine. You can verify your installation by visiting http://localhost:3000 - you should see the Kodus Web Application interface.

6. Set Up Reverse Proxy (For Production)

For webhooks and external access, configure Nginx:

# Web App (port 3000)
server {
    listen 80;
    server_name kodus-web.yourdomain.com;
    location / {
        proxy_pass http://localhost:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

# API (port 3001)  
server {
    listen 80;
    server_name kodus-api.yourdomain.com;
    location ~ ^/(github|gitlab|bitbucket|azure-repos)/webhook {
        proxy_pass http://localhost:3332;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    location / {
        proxy_pass http://localhost:3001;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Verify Novita Integration

In addition to the basic installation verification, confirm that Novita is working:

# Verify Novita API connection specifically
docker-compose logs api worker | grep -i novita

Troubleshooting