Skip to content

Developers

Start building today: one URL, one header.

Create a key, point the client you already use at https://cloudsitus.com/api/v1, and set X-Region to the region you need — or connect your agent and approve a plan. Every response names the model, region and host that answered.

curl https://cloudsitus.com/api/v1/chat/completions \
  -H "Authorization: Bearer $CLOUDSITUS_API_KEY" \
  -H "X-Region: EU" \
  -H "Content-Type: application/json" \
  -d '{"model":"think","messages":[{"role":"user","content":"Summarise this contract."}]}'

# < x-situs-attempts: 1     the receipt rides on every response

Your first ten minutes

Keep your client. Change one URL.

No new SDK and no new request format: a key, a base URL and one header.

  1. 01
    Create a key

    Sign up, add prepaid credit (from $10), then create a key under Keys in the dashboard. Keys start with cs_live_; keep them server-side.

  2. 02
    Check it, free

    GET /v1/ping validates the key, dry-runs the route for your region and says whether billing is active. No model is called and nothing is billed.

  3. 03
    Change the base URL

    Point any OpenAI-compatible client at https://cloudsitus.com/api/v1. Your request code stays as it is.

  4. 04
    Set X-Region

    Per call or as a default header: US · LATAM · UK · EU · CH · MENA · INDIA · ASIA · ANZ · WORLD. Leave it out and the call runs as WORLD.

  5. 05
    Pick a class, not an id

    flash (cheapest), think (reasons) or pro (fastest) resolve per call in your region, so a model release never breaks your code. Or pin an id from GET /v1/models.

# pip install openai — the client you already use
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://cloudsitus.com/api/v1",
    api_key=os.environ["CLOUDSITUS_API_KEY"],
)

for region in ["US", "EU", "ASIA"]:
    raw = client.chat.completions.with_raw_response.create(
        model="flash",
        messages=[{"role": "user", "content": "Hello"}],
        extra_headers={"X-Region": region},
    )
    # the model and region that answered: <model>/<region>/general
    print(raw.headers["x-situs-routed"])

Build

Your agent builds it. You approve it.

Four ways in, one rule: everything is planned against the region before it exists.

MCP · no keys to paste

Say what you need. Approve the plan.

Connect the CloudSitus MCP server and describe the backend in plain words. The agent writes the spec, shows where every piece will run, and builds it only after you confirm.

  1. 01Connect. One MCP server, signed in with OAuth.
  2. 02Ask. “A notes app in the EU, with login and uploads.”
  3. 03Confirm. The plan is pinned by its hash; nothing exists until you say yes.
https://cloudsitus.com/mcp
your agent cloudsitus mcp

Set up a notes backend in the EU — Postgres, file uploads and a reasoning model.

spec_plan region EU · 5 resources

+ create database main in EU (cell eu) ~ $9.69/mo
+ create bucket uploads on database main (max 50 MB) in EU (cell eu)
+ create api key acme-notes
> use model chat: think — processed in the European Union — $1.27 in / $7.63 out per 1M tokens
> use model code: auto — processed in the European Union — $0.53 in / $3.18 out per 1M tokens
Apply this plan? Everything stays in the EU.ConfirmCancel

spec_apply created · env lines written

Start from a spec · examples

Six backends, planned for real.

Each example is a cloudsitus.yaml and the plan our engine returns for it right now — every resource in the region the file names, or refused. Copy one, change the region, plan again.

EU

Notes app with sign-in and uploads

Postgres behind your own sign-in, a bucket for files and a reasoning model — all in the EU.

version: 1
project: notes
region: EU
database:
  name: main
  auth:
    jwks_url: https://login.example.com/.well-known/jwks.json
    issuer: https://login.example.com/
    audience: notes
storage:
  - bucket: uploads
    max_file: 50MB
models:
  chat: think
  embed: qwen3-embedding-8b
CH

Contract search

Scanned contracts read page by page, embedded and searched with a reasoning model — in Switzerland.

version: 1
project: contracts
region: CH
database:
  name: contracts
storage:
  - bucket: originals
models:
  ocr: layout
  embed: qwen3-embedding-8b
  chat: think
US

Call notes

Calls transcribed and summarised, kept in a US database.

version: 1
project: call-notes
region: US
database:
  name: calls
models:
  stt: auto
  chat: flash
CH

Meeting minutes

Speech to text and a fast model, processed in Switzerland.

version: 1
project: minutes
region: CH
models:
  stt: auto
  chat: flash
EU

Receipt reader

Vision and OCR for receipts and invoices, in the EU.

version: 1
project: receipts
region: EU
models:
  vision: auto
  ocr: auto
ASIA

Product catalog

A database and an image bucket, resident in Asia-Pacific.

version: 1
project: catalog
region: ASIA
database:
  name: catalog
storage:
  - bucket: images

MCP · one click

Connect your agent. No key to paste.

One MCP server lets your agent set up a project for you: create a database in the region you choose, mint an API key, pick a model and write the settings to your env file.

Add the server and sign in when the app asks. You choose which parts of the account it may use (read-only is one click, and is what an app gets when it asks for nothing), and you can disconnect it at any time.

Anything that deletes, revokes or applies a change only describes it until the agent repeats the call with confirm: true, so you see it first. What cannot be undone (deleting a database, rotating or revoking keys) also waits for you to approve it in the dashboard, and a deleted database can be restored for 7 days. Servers and scripts can still send an API key as Authorization: Bearer.

https://cloudsitus.com/mcp
Scopes, approvals and every tool
  • Opens Cursor’s install prompt. Then sign in when Cursor asks.

  • Opens VS Code’s MCP install prompt (Copilot agent mode). Sign in when asked.

  • Claude Code
    claude mcp add --transport http cloudsitus https://cloudsitus.com/mcp

    Run it, then type /mcp in Claude Code and choose the server to sign in.

  • Claude

    Claude.ai or Claude Desktop: Customize → Connectors → Add custom connector, paste the URL, then Connect.

  • ChatGPT

    Add a custom MCP server in ChatGPT’s apps settings (developer mode) and paste the URL.

Read the receipt

Every response says where it ran.

You don’t take our word for residency: a response carries its own receipt in its headers. Log it, or assert on it in your tests.

response headers
< HTTP/2 200
< x-situs-routed: <model>/EU/general
< x-situs-attempts: 1
< x-situs-cost-micro: 4200
< x-situs-usage: verified
< x-request-id: 9f1c…

A streamed response carries the route headers but not the cost: usage is known only when the stream ends, and is billed then. We keep token counts and cost, never the prompt or the answer.

x-situs-routed
The model and region that answered. A test can fail any call that ran outside the region you set.
x-situs-attempts
Hosts tried. If one fails, the call moves to the next host in the same region — never across a border.
x-situs-provider
The named host that served the call. Only hosts listed for that region can appear.
x-situs-cost-micro
What the call cost, in millionths of a dollar. Reconcile per call, without an invoice export.
x-situs-usage
verified, missing or suspect: how far the billed count could be checked against the host’s own.
x-request-id
One id per call. Quote it to support: it finds the call’s route and cost, never its content.

Handle refusals

A refusal is a code, not a surprise.

Every error comes as { error: { code, message } }. Branch on code; the message is for people. A pinned model is served or refused, never swapped — and a call no host in your region can serve is refused at the door, never sent to another jurisdiction.

Error codes and what to do
Statuserror.codeWhat to do
400unknown_modelNo model by that id or alias. GET /v1/models lists what your region serves.
422model_not_available_in_regionThe model exists, not for this task or region. The error detail names the regions that serve it.
422no_routeNo host in this region serves the task. Choose another region on purpose; we never move it for you.
401invalid_api_keyapi_key_expiredThe key is wrong, revoked or expired. Create a new one under Keys.
402payment_requiredOut of credit. Top up, or turn on auto-recharge in Billing.
429rate_limitedspend_velocity_exceededEvery host in the region is throttled, or your hourly spending limit is reached. Wait for Retry-After; the OpenAI SDKs retry a 429 on their own.
502upstream_errorEvery host that could serve the call failed. Retry, or send a class name instead of a pinned id for more hosts to fail over to.

Reference

Where to look next.

API reference

Every /v1 endpoint, its parameters and its responses, with samples.

Databases API

Create resident Postgres, keys, SQL, migrations, sign-in, exports, restores and imports.

MCP & OAuth

The one MCP server: scopes, read-only by default, approval links, every tool.

Routing guide

How the host is chosen: residency, pinned models, class names and fail-over.

Network

What each X-Region value serves today, and what is refused where.

Pricing

The price of every model. GET /v1/pricing returns the same rate card to your code, free.

llms.txt

A plain-text summary of the API and its regions, for the coding agent you build with.

FAQ

Questions developers ask first.

Do I need a new SDK?
No. Any OpenAI-compatible client works: change the base URL to https://cloudsitus.com/api/v1 and the key, keep the rest of your code.
What happens if my region can’t serve a call?
It is refused with a stable code (no_route, model_not_available_in_region) — never sent to another jurisdiction to make it succeed. Choose another region on purpose if you want one.
Can I check my setup without paying?
Yes. GET /v1/ping validates the key, dry-runs the route for your X-Region and reports whether billing is active. It calls no model and bills nothing.
Do streamed responses carry the receipt?
They carry the route headers. The cost is known only when the stream ends, so it is billed then rather than sent as a header.
My integration uses phi-cloud.com — do I need to change it?
No. https://phi-cloud.com/api/v1 keeps serving the same API, and keys created before the rename keep working. New integrations should use https://cloudsitus.com/api/v1.
Should my agent use MCP or the REST API?
Either: they call the same operations. MCP signs in with OAuth and asks before anything destructive; the REST API takes an API key and suits servers and scripts.

Any or all location, securely, privately, easily.

Take control of where your data lives.

Situs is the legal word for where an asset sits, and so whose law governs it. CloudSitus makes that a setting on every call, every database and every file.

https://cloudsitus.com/mcp