valite
Docs navigation

Docs/API Reference/Overview

API Overview

A transparent proxy data plane plus a small control-plane API for workflows and jobs.

Two surfaces

The data planeis your provider's own API, reached through a path prefix — valite adds no request or response schema of its own. The control plane lives under /valite/api and is plain JSON over HTTP: read workflow state, start jobs, poll results. Authentication for both is covered in Authentication.

base URL
https://gateway.valite.ai/<upstream>/...   # data plane (openai, anthropic, ...)
https://gateway.valite.ai/valite/api/...   # control plane

Data plane: the proxy

POST/{upstream}/{provider-path}

Forwards any method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS) to the named upstream with the remaining path and query string intact. Example: /openai/v1/chat/completions api.openai.com/v1/chat/completions.

An unknown prefix returns 404 listing the configured upstreams. Paths under /valite/api/ are never proxied.

Every proxied response includes an x-gateway-request-id header matching the call's log record. Attribution markers (x-valite-workflow, x-valite-run-id, wf/ and run/ path segments) are consumed by the gateway and stripped before forwarding.

Health checks

GET/healthz

Plain-text ok — for load balancers and scripts. No auth.

GET/api/v1/health

JSON status: {"status": "healthy", "timestamp": "...", "version": "0.2.0"}. No auth.

Errors

Data-plane errors from the provider pass through with the provider's own status and body. Gateway-originated errors are JSON with a single error field:

examples
401 {"error": "invalid valite api key"}
404 {"error": "unknown upstream prefix; expected /<upstream>/..., configured upstreams: ..."}
404 {"error": "unknown admin path"}
400 {"error": "invalid workflow name"}
403 {"error": "control-plane requests require x-valite-admin-secret"}

Reference pages

No client SDK required

The control plane is deliberately small, plain JSON — curl or any HTTP client is the SDK. Your model traffic keeps using the official OpenAI/Anthropic SDKs via the proxy.