AI ready · Integrate in seconds with your coding agent

Global TURN servers, one API call away.

turnix.io is a production-ready, globally distributed STUN/TURN service. Request short-lived ICE credentials from our REST API, hand them to RTCPeerConnection and your WebRTC and VoIP users connect through NATs and firewalls – every time.

Free plan with 10 GB relay traffic per month. No credit card required.

# Request ICE credentials for a call
curl -X POST \
  https://turnix.io/api/v1/credentials/ice \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "initiator_client": "alice",
    "receiver_client": "bob",
    "room": "daily-standup",
    "preferred_region": "us-west"
  }'
// 200 OK — pass straight to RTCPeerConnection
{
  "iceServers": [
    { "urls": ["stun:stun.turnix.io:3478"] },
    {
      "username": "35bb4eb4-b518-4059-…",
      "credential": "7ea616da55d417f4…",
      "urls": [
        "turn:us-west.turnix.io:3478?transport=udp",
        "turn:us-west.turnix.io:3478?transport=tcp"
      ]
    }
  ]
}
POST /api/v1/credentials/ice Nearest region chosen by GeoIP
Global regions
9
TURN transports
UDP · TCP · TLS
Nearest-region routing
GeoIP
Free traffic every month
10 GB

AI ready

Integrate in seconds.
Let your AI agent do it.

Every integration comes with a ready-made prompt for your coding agent. Paste it in, and Turnix is wired into your app the way a senior engineer would do it: token on the server, credentials refreshed in time, errors handled.

  1. 1

    Copy the prompt

    It contains everything your agent needs: endpoint, auth rules, response format and errors.

  2. 2

    Paste it into your agent

    Claude Code, Cursor, GitHub Copilot or any other coding agent, opened in your repository.

  3. 3

    Review the diff

    Backend endpoint, client wiring, error handling and tests, following your code conventions.

Integrate Turnix into an existing WebRTC app
Add Turnix (managed TURN/STUN servers) to the WebRTC app in this repository.

Context about Turnix:
- Endpoint: POST https://turnix.io/api/v1/credentials/ice
- Auth header: "Authorization: Bearer <token>". The token is a secret project API token. Read it from the environment variable TURNIX_API_TOKEN. Never send it to the browser or mobile client, never log it, never commit it.
- Optional body fields (JSON or form-encoded): ttl (integer seconds, digits only), room, initiator_client, receiver_client (letters, digits, "-" and "_" only), preferred_region or fixed_region (a region slug).
- Optional header X-TURN-CLIENT-IP: the end user's public IP. Set it, because otherwise Turnix picks the TURN region closest to the backend server instead of the user.
- Success (200) response: {"iceServers":[{"urls":["stun:stun.turnix.io:3478"]},{"username":"<uuid>","credential":"<hex>","urls":["turn:<region>.turnix.io:3478?transport=udp","turn:<region>.turnix.io:3478?transport=tcp","turns:<region>.turnix.io:443?transport=udp","turns:<region>.turnix.io:443?transport=tcp"]}],"expiresAt":"<ISO 8601 UTC timestamp>"}
- Errors are JSON with an "error" field: 401 (missing or unknown token), 422 (invalid parameter, unknown or offline region), 429 (the organization's data usage limit is reached; body also has "message", "limit" and "used").
- Docs: https://turnix.io/docs/api-reference/credentials

Do the following:
1. Inspect the repository. Find the backend framework, where the client creates RTCPeerConnection, and how the client already calls the backend (auth, fetch helper, base URL). Follow the existing conventions. If there is no backend, stop and ask me where the endpoint should live.
2. Backend: add an authenticated endpoint (for example GET /api/turn-credentials) that only signed-in users of this app can call. It calls the Turnix endpoint server-side with the token from TURNIX_API_TOKEN, forwards the caller's public IP in X-TURN-CLIENT-IP (respect the app's trusted-proxy setup when reading the IP), sends ttl=3600, and sends room/initiator_client when the app has a call or user identifier (sanitize to [A-Za-z0-9_-]). Use a 10-second timeout. Return only {"iceServers": [...], "expiresAt": "..."} to the client.
3. Error handling: if TURNIX_API_TOKEN is missing, fail at startup or return 500 with a clear log message. Map Turnix 401 to a 502 with a log line saying the token is invalid; pass 429 through as 503 with a "TURN usage limit reached" message; never include the token in errors or logs.
4. Frontend: before creating each RTCPeerConnection, fetch the new endpoint and pass iceServers into new RTCPeerConnection({ iceServers }). Keep any existing STUN servers only if the app needs them. If expiresAt has passed or is less than 60 seconds away when a new connection or ICE restart is needed, fetch fresh credentials first (for an ICE restart, call pc.setConfiguration({ ...pc.getConfiguration(), iceServers }) and then pc.restartIce()). Do not cache credentials in localStorage.
5. Configuration: add TURNIX_API_TOKEN to .env.example (or the project's equivalent) with an empty value and a comment, and document it in the README. Make sure .env is git-ignored.
6. Tests: add a backend test that mocks the Turnix API and checks that the endpoint sends the Bearer token and X-TURN-CLIENT-IP, returns iceServers, and does not expose the token. Then, if TURNIX_API_TOKEN is set in my environment, make one real call with curl to the Turnix endpoint and show me the status code and the number of iceServers (do not print the credentials).
7. Summarize the files you changed and anything I still need to do (for example, setting TURNIX_API_TOKEN in production).

Built for developers

Everything you need to ship reliable WebRTC

A REST API for credentials, native SDKs, granular monitoring and long-term credentials – so you can focus on your product instead of running relay servers.

RESTfull API

Use RESTfull API to generate Credentials, create Clients and Rooms. Integrate turnix with your project

  • Manage Credentials, Rooms, Clients via API
  • Get Usage Statistics via API
  • Integrate into your project via API

Turnix SDK

Native Turnix SDK libraries for JavaScript, RUBY, Python as well as for Flutter, Android and IOS

  • Easy installation with package manager
  • Reduce code complexity
  • Native WebRTC Integration

Granular Monitoring

We offer granular monitoring views on TURN/STUN Connections, Traffic Usage and Costs

  • Geo Location statistics
  • Credentials, Rooms and clients monitoring
  • Metrics retrieval by API.

Long Time Credentials

We fully support LTC (Long-Term Credentials) authentication for TURN. LTC provides a standardized way to manage user access with enhanced control and efficiency

  • RFC 5766, RFC 5389, RFC 5766
  • Personal AUTH Token
  • Supported by many software products.

TURN & STUN servers

All the core features, fully managed

Standards-based relays that work with every browser, mobile SDK and VoIP stack.

RFC Compliant

Turnix.io TURN servers are standards-compliant and conform to RFCs 5389, 5769, 5780, 5766, 6062, 6156, 5245, 5768, 6336, 6544 and 5928 over UDP, TCP, TLS and DTLS.

SSL and TURNS Support

Turnix.io TURN servers offer connections via TLS/TURNS over port 443.

TCP and UDP Support

Turnix.io TURN servers support both TCP and UDP for the best connectivity.

GeoIP Automatic Routing

Automatically issues credentials for the nearest TURN server.

API Support

Manage credentials and metrics via a RESTful API.

Time-Limited Credentials

Every credential is generated per session with its own TTL and expiry, so a leaked credential stops working on its own.

How it works

From sign-up to first relayed call in minutes

  1. 1

    Create a project

    Sign up for free, create a project in the dashboard and generate a project-scoped API token.

  2. 2

    Request ICE credentials

    From your backend, call POST /api/v1/credentials/ice. Turnix picks the nearest region via GeoIP and returns short-lived credentials.

  3. 3

    Connect your peers

    Pass the returned iceServers to RTCPeerConnection. Watch connections, traffic and costs live in the dashboard.

// In the browser — credentials fetched from your backend
const { iceServers } = await fetch('/my-backend/ice').then(r => r.json());
const pc = new RTCPeerConnection({ iceServers });

Global regions

GeoIP automatic routing

When a user starts a call, Turnix looks at their IP address, finds the nearest relay server and connects them there – automatically. Closer server, smoother audio and video. Nothing to configure, though you can pin traffic to a specific region whenever you need to.

  • EU Central Karlsruhe
  • US West Portland
  • US East Washington, D.C.
  • Singapore Singapore
  • Brazil Sao Paulo
  • Mexico Mexico City
  • Australia Sydney
  • Korea Seoul
  • EU West Valencia

Integrations

Works with the tools you already use

turnix.io integrates out of the box with popular open-source conferencing platforms.

Coturn alternative

Skip running coturn yourself

Coturn is a great open-source TURN server – but operating it across regions takes time. turnix.io is a hosted TURN/STUN service for teams that would rather ship features than babysit relays.

  • No server management

    No setup, updates or scaling to handle.

  • Global infrastructure

    Pre-deployed TURN servers across multiple regions.

  • Security built in

    Encrypted TURNS connections and managed, short-lived credentials.

  • Free plan available

    Start testing or run small projects at no cost.

Pricing

Simple, traffic-based pricing

Start free and scale as your users grow. Every plan includes global TURN servers, the REST API, integrations and monitoring.

Start free

10 GB of relay traffic every month on trial regions. Full API, SDKs and monitoring. No credit card required.

Get started free

Basic

Small apps and side projects

$30 /mo

40 GB traffic included

  • Overage $0.40 / GB
  • 4 regions
  • RESTful API, SDKs and integrations
  • Granular monitoring
Get started

Startup

Growing products

$90 /mo

150 GB traffic included

  • Overage $0.30 / GB
  • All regions
  • RESTful API, SDKs and integrations
  • Granular monitoring
Get started
Popular

Business

Mid-size businesses

$180 /mo

500 GB traffic included

  • Overage $0.15 / GB
  • All regions
  • RESTful API, SDKs and integrations
  • Granular monitoring
Get started

Corporate

High-traffic production systems

$450 /mo

2000 GB traffic included

  • Overage $0.07 / GB
  • All regions
  • RESTful API, SDKs and integrations
  • Granular monitoring
Get started

Enterprise

Custom traffic volumes, dedicated regions, SLAs and invoicing. Built around your infrastructure.

Contact sales
Free Basic Startup Business Corporate
Price per month Free $30 $90 $180 $450
Included traffic 10 GB 40 GB 150 GB 500 GB 2000 GB
Overage $0.40 / GB $0.30 / GB $0.15 / GB $0.07 / GB
Regions Trial regions 4 regions All All All
Global TURN & STUN
RESTful API & SDKs
Integrations
Monitoring

Prices in USD per month. Included traffic is relay traffic per billing period; overages are billed per GB on paid plans.

Learn

Docs & guides

API reference, SDKs, tutorials and hands-on guides for TURN, STUN and WebRTC.

All guides →

Ready to connect every call?

Create a free account, grab an API token and request your first ICE credentials in minutes.