Skip to content

HTTP API

Client configuration URL
Inference origin https://inference.valgix.com
OpenAI-compatible SDK base URL https://inference.valgix.com/v1
Anthropic SDK base URL https://inference.valgix.com
Full Chat Completions URL https://inference.valgix.com/v1/chat/completions
Full Responses URL https://inference.valgix.com/v1/responses
Full Anthropic Messages URL https://inference.valgix.com/v1/messages

Use the SDK base URL for the protocol selected in your client. If the client asks for the full endpoint URL, include the specific request path.

Use your Inference API key with either Authorization: Bearer <key> or x-api-key: <key>. Send one key header. For JSON requests include Content-Type: application/json. For Anthropic Messages send anthropic-version: 2023-06-01.

All /v1 routes require a key. GET /health is an unauthenticated process health check.

Method Path Result
GET /v1/models List public model IDs
GET /v1/models/{id} Get a model’s metadata

The default response uses OpenAI model objects. Add the anthropic-version header to receive Anthropic model objects. The Anthropic list accepts limit from 1 to 1000 and one optional cursor, after_id or before_id.

Send POST /v1/chat/completions with a public model ID and a messages array. Read text from choices[0].message.content.

{
"model": "deepseek-v4.1-flash-uncensored",
"messages": [{"role": "user", "content": "Explain what a health check verifies."}],
"max_tokens": 256
}

Use max_tokens or max_completion_tokens to limit output. If both are present, max_completion_tokens takes precedence. When supplied, n must be a positive integer no greater than 32. Model support for multiple choices can vary.

Send POST /v1/responses with a public model ID and input. For a follow-up request, send the relevant history in input again. Inference runs Responses in stateless HTTP mode and requires store: false when store is supplied.

{
"model": "kimi-k3.1-pro-uncensored",
"input": "Explain why a database index speeds up lookups.",
"store": false,
"max_output_tokens": 256
}

Read returned items from output. A request that supplies previous_response_id or store: true returns 400. Stored-response retrieval, WebSocket transport, and server-side compaction routes are outside this API.

Send POST /v1/messages with a public model ID, messages, and an explicit max_tokens value. Read the text blocks in the response’s content array.

{
"model": "deepseek-v4.1-flash-uncensored",
"max_tokens": 256,
"messages": [{"role": "user", "content": "Describe a good retry policy for a read-only request."}]
}

Inference exposes Messages and model discovery. Clients that use the optional Anthropic token-counting endpoint need their client-side estimate.

  • JSON request bodies can be up to 64 MiB.
  • The API caps the output request at the model’s limit and uses a maximum output target of 16,000 tokens by default.
  • The generation deadline is 10 minutes, including streaming. Your client can set a shorter timeout.

Streaming and tool calling · Error reference