On this page: Quickstart
Developer docs

One API for OpenAI, Anthropic and content checks

withConflux is OpenAI-compatible. Point any OpenAI SDK at our base URL, use your withConflux key, and call GPT or Claude models. The same base URL checks images, video and text for moderation, AI generation and deepfakes.

Get started freeSee pricingFree to start, no card.
LLM gateway
Call GPT and Claude models
Chat completions with streaming and tool calls, embeddings, one model list. Change the base URL and the key.
Chat completions →
Content checks
Check images, video and text
Ask for a check, not a vendor. Repeat files are recognised and not billed twice.
Check an asset →

Quickstart

  1. Create a free accountSign up at withconflux.com/get-started. No card needed.
  2. Copy your keyDashboard › API keys. Use a cflx_test_ key while you build, a cflx_live_ key in production.
  3. Make your first callUse the official OpenAI SDK, or plain HTTP.
import OpenAI from "openai";

const ai = new OpenAI({
  baseURL: "https://withconflux.com/v1",
  apiKey: process.env.CONFLUX_KEY,
});

const res = await ai.chat.completions.create({
  model: "claude-sonnet-5-5", // or "gpt-6-astra", any model in the list
  messages: [{ role: "user", content: "Hello" }],
});

console.log(res.choices[0].message.content);

Keys and authentication

Send your key as a bearer token on every request. Keys are created, paused and revoked in the dashboard; give each app or service its own key so its usage shows separately.

HTTP
Authorization: Bearer cflx_live_…
KeyUse it forBilling
cflx_test_…Building and testingNot billed, and never counts toward your monthly checks or spend cap. Content checks still run for real, so test with your own sample files.
cflx_live_…Production trafficBilled as normal.
One account, one product. An account is set up either for the LLM gateway (chat completions, models, embeddings) or for content checks. Its keys work on that product's endpoints; the other endpoints answer 403.

Base URL

https://withconflux.com/v1

https://withconflux.com/api/v1 also works. Both reach the same API.

Chat completions

POST/v1/chat/completions

Same request and response as OpenAI's chat completions, for OpenAI and Anthropic models alike. Streaming (stream: true) and tool calls work for both. Errors come back in OpenAI's format, so SDK clients show them as usual.

const stream = await ai.chat.completions.create({
  model: "gpt-6-astra",
  messages: [{ role: "user", content: "Write a tagline" }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

Models

GET/v1/models

Returns the models on the gateway, each with the price for your account. Use the id as model. Every model and its price is also listed on withconflux.com/llm-gateway/models.

const { data } = await ai.models.list();
console.log(data.map((m) => m.id));

Embeddings

POST/v1/embeddings

Same as OpenAI's embeddings endpoint, for example text-embedding-3-small.

const emb = await ai.embeddings.create({
  model: "text-embedding-3-small",
  input: "withConflux docs",
});

BYOK or Managed

BYOKManaged
Provider keysYours, added under Provider keysOurs, nothing to set up
Token priceBilled by OpenAI or AnthropicProvider price plus a small margin, from prepaid credits
Code changes to switchNone. Same key, same base URL.

Check an asset

POST/v1/check

Send an asset and the checks you need. Each check runs on its own and returns its own result.

curl https://withconflux.com/v1/check \
  -H "Authorization: Bearer $CONFLUX_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "asset": { "url": "https://example.com/upload.jpg" },
    "needs": ["moderation", "ai-image", "deepfake"]
  }'

Checks you can ask for

NeedWhat it checksAsset
moderationNudity, violence, hate and self-harm in an imageurl
video-moderationThe same, across a video fileurl
text-moderationHarmful or abusive texttext
ai-imageWhether an image is AI-generatedurl
ai-videoWhether a video is AI-generatedurl
deepfakeFace swaps and manipulated faces in an imageurl

Images and videos go in asset.url (a public link to the file); text goes in asset.text.

Text and video
{ "asset": { "text": "The comment to check" }, "needs": ["text-moderation"] }

{ "asset": { "url": "https://example.com/clip.mp4" },
  "needs": ["video-moderation", "ai-video"] }
Video files, not live streams. Video checks take a stored file URL. For a live stream, send frames or short clips as they are recorded.

Response

A valid key gets 200 back, with each check's outcome in results[] and its own status. Build on verdict and score: they have the same shape for every check.

Response (trimmed)
{
  "ok": true,
  "org": "Acme Media",
  "requestId": "req_q3XbT0kM1sVz9yAa",
  "contentHash": "4f1c9e2ab07d63f58e21c4d09b7a6e35f2d8c1b0",
  "cachedCount": 1,
  "latencyMs": 412,
  "keyMode": "managed",
  "results": [
    { "need": "moderation", "status": 200, "cached": false, "mode": "live",
      "verdict": "clean", "score": 0.03, "detail": { … } },
    { "need": "ai-image", "status": 200, "cached": false, "mode": "live",
      "verdict": "ai-generated", "score": 0.94, "detail": { … } },
    { "need": "deepfake", "status": 200, "cached": true, "mode": "cache",
      "verdict": "real", "score": 0.07 }
  ]
}
FieldMeaning
requestIdIdentifies this request. Quote it when you contact us.
contentHashThe hash the asset was recognised by (see Repeat files).
cachedCountHow many checks were answered from a repeat file.
keyModemanaged or byok.
results[].statusThe outcome of that check: 200, or an error code from the table under Errors.
results[].verdictclean or flagged for the moderation checks, ai-generated or real for ai-image and ai-video, deepfake or real for deepfake.
results[].score0 to 1: how sure the check is that the content is the flagged class. Can be null when the check gives no number, for example on text.
results[].cachedtrue when the answer came from a repeat file (mode: "cache").
results[].detailThe full analysis for that check. Its fields depend on the check and can change; not present on repeat-file answers.
results[].errorPresent when the check didn't run, with the reason.

A check that can't run comes back with its status and reason, while the other checks in the request still run:

Refused check
{ "need": "ai-image", "status": 402, "cached": false, "mode": "none",
  "error": "Monthly spend cap reached." }

Repeat files

Every asset is recognised by a hash of what you send: the URL or the text. If you already have a content hash (for example the file's SHA-256), send it as asset.hash and the same file is recognised under any URL. If the same asset and check were seen in the last 30 days, the stored result comes back with cached: true and you are not billed again. You don't need your own cache.

Spend caps and limits

Set a monthly spend cap in the dashboard. Once it is reached, paid calls are refused with 402 and nothing is billed; repeat-file results stay free. The cap is checked as each request starts, so calls already in flight can finish a little over it.

Each key has a request limit per minute. Above it you get 429 with a Retry-After header in seconds. Each key can also be paused on its own in the dashboard.

Errors

When the whole request is refused, the status code says why. The LLM endpoints answer in OpenAI's error format ({ "error": { "message", "type", "code" } }); /v1/check answers { "ok": false, "error" }.

CodeMeaningWhat to do
400Body is missing something: needs, messages or modelFix the request body
401Missing, invalid, revoked or paused keyCheck the key in the dashboard
402LLM gateway: credits used up, or monthly spend cap reachedTop up or raise the cap
403Account suspended, key used on the other product, or model not enabled for your accountUse the right key or model, or contact us
429Too many requests for this keyRetry after the seconds in Retry-After

Per-check status in results[]

/v1/check answers 200 when the key is valid; each check then carries its own status.

StatusMeaningWhat to do
200The check ran, or came from a repeat fileRead verdict and score
402Spend cap or free monthly limit reached. Nothing billedRaise the cap or upgrade
403Check not enabled on your accountAsk us to turn it on
422Unknown check name, or the asset can't be processedCheck the need name and the asset URL or text
424BYOK only: no provider key set up for this checkAdd it under Vendor keys
5xxThe check failed on the way. Nothing billedRetry

Pricing

Free to start: 10,000 content checks a month, and €40 in credits for models on Managed. While you are on the free credits, the most expensive models and very long replies are held back until you add balance. BYOK is a flat €19 a month with no token markup. Full plans on withconflux.com/pricing.

Get your key
Free account, no card. Test keys work from the first minute.
Get started free
We use a single analytics cookie to understand traffic to this site. Nothing loads until you choose. See our Privacy Policy.