Conflux Docs
API and CLI

API overview

Use Conflux as one governed API layer across OpenAI-compatible and Anthropic-compatible clients.

API overview diagramClick to enlarge

Base URL

Production API traffic should use the API hostname.

https://api.yoiyoi.xyz

OpenAI-compatible endpoints

Use these when a client expects OpenAI-style APIs.

POST /v1/chat/completions
POST /v1/responses
GET  /v1/models
curl https://api.yoiyoi.xyz/v1/chat/completions \
  -H "Authorization: Bearer <CONFLUX_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [{ "role": "user", "content": "Explain the workspace memory graph." }]
  }'

Anthropic-compatible endpoint

Use this for Claude CLI and Anthropic-style message payloads.

POST /v1/messages

API keys

A Conflux API key belongs to a workspace and can be constrained by mode, model access, quota, and owner. Usage is recorded for analytics and quota accounting without deleting historical usage when a key is revoked.

Request history and payload retention

Look up a request with the same workspace API key that created it. Conflux can reconstruct deduplicated payload chunks before projecting the prompt and can return the retained normalized model response from the same request. Callers do not decompress or assemble data themselves.

curl https://api.yoiyoi.xyz/v1/request-history/lookup \
  -H "Authorization: Bearer <CONFLUX_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{ "response_id": "<CONFLUX_RESPONSE_ID>", "include": "prompt" }'
curl https://api.yoiyoi.xyz/v1/request-history/lookup \
  -H "Authorization: Bearer <CONFLUX_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{ "response_id": "<CONFLUX_RESPONSE_ID>", "include": "response" }'
curl https://api.yoiyoi.xyz/v1/request-history/lookup \
  -H "Authorization: Bearer <CONFLUX_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{ "request_id": "<CONFLUX_REQUEST_ID>", "include": "both" }'
curl https://api.yoiyoi.xyz/v1/request-history/lookup \
  -H "Authorization: Bearer <CONFLUX_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "lookup": "usage_fingerprint",
    "created_at": "2026-08-21T10:15:30.123Z",
    "timestamp_tolerance_ms": 5000,
    "model": "<MODEL_ID>",
    "usage": { "input_tokens": 1200, "output_tokens": 340, "total_tokens": 1540 },
    "include": "both"
  }'

The default remains prompt-only for backward compatibility. If a fingerprint matches multiple requests, Conflux returns candidate metadata first; repeat the lookup with that candidate's request_id orresponse_id to retrieve content. A retained response is the normalized final result stored by Conflux, not the raw upstream HTTP envelope.

Original request hashraw_payload.sha256 identifies the incoming request before secret redaction or payload truncation.
Stored payload hashraw_payload.stored_sha256 verifies the exact redacted and possibly truncated bytes reconstructed by Conflux.
Expired payloadWhen full-payload retention expires, request IDs, model, usage, timestamps, and hashes remain while raw_payload.stored becomes false.
Retained responseresponse_result.response reports availability, source, model, text length, SHA-256, and normalized text. raw_upstream is always false.

Context-window recovery

Direct passthrough preserves the original client payload first. If the upstream model rejects the request for context-window size, Conflux can retry with audited context optimization for eligible intermediate tool output. The latest user instruction and client-native conversation memory are not treated as generic noise.