North Model LabsNorth
Model Labs
ShowcaseResearchAPIPricingEnterpriseSolutionsFAQTeam
Dashboard

Models

  • Atlas Realtime Avatar
  • Showcase
  • Benchmark
  • Compare

Developers

  • Documentation
  • Examples
  • Pricing
  • Dashboard ↗

Solutions

  • Customer support
  • Sales / SDR
  • AI tutors
  • All solutions

Enterprise

  • Enterprise overview
  • Safety & identity
  • Compare
  • Book deployment review ↗
  • eric@northmodellabs.com

Company

  • Team
  • Partnerships
  • FAQ
  • eric@northmodellabs.com

Connect

  • GitHub ↗
  • Discord ↗
  • eric@northmodellabs.com
North Model Labs© 2026 North Model Labs
PrivacyTermseric@northmodellabs.comBook 30 min ↗

Integration examples

Offline generationRealtime example appBring your own speechCallbacksHistory and multiple jobsProduction checklist
← API reference

Code examples

Offline generation is upload → poll → download. The runnable snippets below use the public API. For a complete realtime voice application, use demo-atlas. There is no separate offline example app.

demo-atlas · Realtime example app ↗

Next.js, LiveKit, voice and captions. Installation and configuration.

Offline generation

Python: install requests. JavaScript: use Node.js 22 or later. Set ATLAS_API_KEY on the server and supply speech.mp3 plus face.jpg. These examples upload actual files, check HTTP errors, preserve the job ID, stop polling after twelve minutes, and download the signed output URL without exposing your key to storage.

"""Python 3: pip install requests; set ATLAS_API_KEY; supply speech.mp3 and face.jpg."""
import os
import time
import uuid
from pathlib import Path
import requests

BASE = "https://api.atlasv1.com"
HEADERS = {"Authorization": f"Bearer {os.environ['ATLAS_API_KEY']}"}


def checked(response):
    response.raise_for_status()
    return response.json()


def generate(audio_path="speech.mp3", image_path="face.jpg", output_path="output.mp4"):
    # Reuse this key if retrying this exact submission after a network failure.
    submission_key = str(uuid.uuid4())
    print(f"Save this submission key before submitting: {submission_key}")
    with open(audio_path, "rb") as audio, open(image_path, "rb") as image:
        job = checked(requests.post(
            f"{BASE}/v1/generate",
            headers={**HEADERS, "Idempotency-Key": submission_key},
            files={"audio": ("speech.mp3", audio, "audio/mpeg"),
                   "image": ("face.jpg", image, "image/jpeg")},
            timeout=120,
        ))
    job_id = job["job_id"]
    print(f"Job accepted: {job_id}; resume this ID rather than submitting again.")
    deadline = time.monotonic() + 12 * 60
    delay = 3
    while time.monotonic() < deadline:
        response = requests.get(f"{BASE}/v1/jobs/{job_id}", headers=HEADERS, timeout=30)
        if response.status_code == 429 or response.status_code >= 500:
            delay = min(30, delay * 2)
            time.sleep(delay)
            continue
        status = checked(response)
        if status["status"] == "failed":
            raise RuntimeError(status.get("error") or "Generation failed")
        if status["status"] == "completed":
            result = checked(requests.get(f"{BASE}/v1/jobs/{job_id}/result", headers=HEADERS, timeout=30))
            # The signed media URL needs no Atlas Authorization header.
            with requests.get(result["url"], stream=True, timeout=120) as download:
                download.raise_for_status()
                with open(output_path, "wb") as output:
                    for chunk in download.iter_content(1024 * 1024):
                        output.write(chunk)
            return Path(output_path)
        time.sleep(delay)
        delay = min(15, delay + 1)
    raise TimeoutError(f"Stopped polling; resume job {job_id}. Do not submit again.")


if __name__ == "__main__":
    print(generate())

The timeout stops this client’s polling; it does not cancel the server job. Resume the same job ID. If submission itself times out, reuse the saved Idempotency-Key for the same logical request; do not generate another key and silently create duplicate work.

Realtime voice and captions

Follow the current demo-atlas guide and repository lockfile. The app uses a private server-side Atlas key and an OpenAI Realtime voice connection. Its /api/session routes are application proxies, not additional endpoints on api.atlasv1.com.

Upload a face file. Do not submit face_url: production rejects caller-provided portrait URLs. Map session_id → sessionId and livekit_url → livekitUrl for the React hook. Preserve one audio track for RTP speech and explicitly end the exact server session on stop.

Bring your own speech

Generate supported WAV/MP3/Ogg/WebM bytes with your speech provider, then pass the audio file to the offline snippet above. For live conversation, use your STT/LLM/TTS pipeline and feed its output into Atlas. Voice-provider fees are separate. Atlas does not generate conversation or captions by itself.

Callbacks

Add X-Callback-URL to the submission headers after support configures webhook signing. Verify the raw request body using the documented HMAC signature, reject stale timestamps, and handle duplicate job events. Keep polling as a fallback; a callback URL alone does not ensure webhook delivery.

History and multiple jobs

GET /v1/jobs lists only the authenticated key’s offline jobs. Request limit=20 and increase offset by the page size until count is smaller than limit. count is page length, not total history. Store each accepted job ID and poll with bounded concurrency and backoff; one polling loop per job can exhaust the same rate budget used for submissions.

Before integrating

  • Keep the API key server-side; authenticate your own callers and enforce session ownership.
  • Bound uploads, requests, polling deadlines and retries. Validate supported file contents and handle 402, 413, 415 and 429.
  • Persist job/session IDs before waiting. Never blindly repeat a billable POST after an ambiguous network response.
  • Use expires_in for signed URL validity. It is not a statement of storage retention.
  • For realtime, confirm DELETE cleanup. Closing a browser player is not confirmed server teardown.
  • The snippets were exercised with deterministic HTTP fixtures. That verifies request and response handling, not GPU output quality or production capacity.