Skip to main content
POST

Authorizations

Authorization
string
header
required

W&B API key whose personal/default entity or teams own the selected task and providers.

Headers

OpenAI-Project
string

Weights & Biases entity/project owning the routing configuration. The caller must have access to the entity. Unknown projects return 404. The validated project is forwarded to Serverless Inference for attribution.

Example:

"my-team/my-project"

Forge-Cache-Mode
enum<string>

Opt a non-streaming project request into exact-response caching. Cache identity includes the project version, the routing revision, the effective upstream request body, and forwarded path/query parameters. Model overrides are additionally isolated by provider configuration, model, and passthrough user identity. readWrite reads and populates the cache, readOnly reads without populating it, and writeOnly populates without reading. Only successful responses up to 8 MiB are stored. Invalid values return HTTP 400. Response caching is not supported for streaming requests.

Available options:
readWrite,
readOnly,
writeOnly

Body

application/json
messages
object[]
required
Minimum array length: 1
model
string

With OpenAI-Project, omit, leave blank, or use router for configured routing. Use {provider}/{model-id} to override the model within the project.

metadata
object
stream
boolean
default:false
temperature
number
tools
object[]
tool_choice
any
response_format
object
reasoning_effort
string
max_tokens
integer
Required range: 1 <= x <= 9007199254740991
max_completion_tokens
integer
Required range: 1 <= x <= 9007199254740991
{key}
any

Response

Provider response. Streaming requests return server-sent events and end with [DONE].

id
string
object
string
created
integer
Required range: -9007199254740991 <= x <= 9007199254740991
model
string
choices
object[]
usage
object
{key}
any
Last modified on September 30, 2026