GPT-6.1 Sol, Claude Opus 5.5, Gemini 4 Argon & DeepSeek V4.1 are now live. Try them now
Zopyr
  • Models
  • Rankings
  • Pricing
  • Docs
  • Blog
  • AgentSoon
Sign inGet API key
Zopyr
All articles
Sep 25, 2026·8 min read

On this page

  • 1. Uploading Documents with /v1/files and Indexing via /v1/embeddings
  • 2. Streaming Over Persistent WebSockets (/v1/realtime)

Published by

Zopyr Solutions Architecture

Applied AI Engineering

Models in this article

OpenAIopenai/gpt-6.1-sol-proGeminigoogle/gemini-4-argon
Tutorials

Building Low-Latency Realtime WebSocket & Multimodal RAG Pipelines on Zopyr

Step-by-step tutorial on combining /v1/files, /v1/embeddings, and persistent /v1/realtime WebSocket sessions for interactive multimodal assistants.

1. Uploading Documents with /v1/files and Indexing via /v1/embeddings

Zopyr provides an encrypted, organization-scoped /v1/files API that accepts PDFs, Markdown, CSVs, and source code up to 20 MB. Once uploaded, a file can be referenced directly by its file_id inside any /v1/chat/completions or /v1/responses request without re-transmitting megabytes of Base64 data on every turn.

For semantic retrieval over large repositories, call POST /v1/embeddings with configurable vector dimensions and store the resulting normalized vectors in pgvector.

typescriptZopyr Gateway v1
// Upload once via /v1/files, reference by file_id across turns
const upload = await fetch('https://api.zopyr.com/v1/files', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.ZOPYR_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    filename: 'runbook.md',
    purpose: 'user_data',
    content: '# Production Incident Runbook\n1. Check Redis latency...',
  }),
}).then((r) => r.json());

// Reference file_id in chat completions
const chat = await fetch('https://api.zopyr.com/v1/chat/completions', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.ZOPYR_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    model: 'google/gemini-4-argon',
    messages: [{
      role: 'user',
      content: [
        { type: 'text', text: 'Summarize step 1 of the attached runbook.' },
        { type: 'file', file: { file_id: upload.id } },
      ],
    }],
  }),
});

2. Streaming Over Persistent WebSockets (/v1/realtime)

When building voice assistants or live collaborative canvases, establishing a new HTTP connection per turn adds unnecessary handshake overhead. Connect to wss://api.zopyr.com/v1/realtime to maintain a stateful session where conversation.item.create and response.create stream response.text.delta frames in real time.

Continue reading
Benchmarks

GPT-6.1 Sol Pro vs Claude Opus 5.5 vs Gemini 4 Argon: 2026 Production Benchmark

Read article
Architecture

Inside Zopyr’s Zero-Postgres Hot Path: Sub-25ms Failover & Distributed Circuit Breaking

Read article
Engineering

Unified SDK Guide: OpenAI Responses API, Anthropic Messages & Claude Code on One Gateway

Read article

Test these models in production today

Create your account, generate an API key, and route across 300+ frontier models in under 3 minutes.

Get API Key
Featured Research & Architecture
All Engineering Articles
Browse Models
Zopyr

The unified API for frontier AI models. Route intelligently, pay from anywhere, and scale globally.

Status Page

Product

  • Models
  • Compare Models
  • Rankings
  • Pricing
  • Playground
  • Zopyr Agent

Features

  • Smart Routing
  • OpenAI Compatible
  • Monitoring & Logs
  • Budgets & Limits

Resources

  • Documentation
  • Engineering Blog
  • Error Catalog
  • Methodology
  • FAQ
  • Sitemap
  • /llms.txt

Company

  • About
  • Contact
  • Status Page
  • OpenAI SDK
  • Vercel AI SDK

© 2026 Zopyr AI. All rights reserved.

Privacy PolicyTerms of ServiceAcceptable UseDPASubprocessorsCookie Policy