Hadrian is experimental alpha software. Do not use in production.
Hadrian

Chat

Create chat completions using conversational message format. Supports streaming, tool use, vision, and reasoning models. OpenAI-compatible.

Create a chat completion

POST
/api/v1/chat/completions
AuthorizationBearer <token>

API key authentication using Bearer token format

In: header

Request Body

application/json

frequency_penalty?number|null

Penalize repeated tokens (-2.0 to 2.0)

Formatdouble
logit_bias?object

Token bias map

logprobs?boolean|null

Return log probabilities

max_completion_tokens?integer|null

Maximum completion tokens

Formatint64
Range0 <= value
max_tokens?integer|null

Maximum tokens (deprecated, use max_completion_tokens)

Formatint64
Range0 <= value
messages*

Conversation messages

metadata?object

Request metadata

model?string|null

Model to use for completion

models?|null

Hadrian Extension: List of models for multi-model routing (alternative to single model)

presence_penalty?number|null

Penalize new topics (-2.0 to 2.0)

Formatdouble
reasoning?null|
response_format?null|
seed?integer|null

Random seed for reproducibility

Formatint64
stop?null|
stream?boolean

Enable streaming

stream_options?null|
temperature?number|null

Sampling temperature (0.0 to 2.0)

Formatdouble
tool_choice?null|
tools?|null

Available tools

top_logprobs?integer|null

Number of top log probabilities to return (0-20)

Formatint32
Range0 <= value
top_p?number|null

Nucleus sampling probability (0.0 to 1.0)

Formatdouble
user?string|null

User identifier for abuse detection

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/v1/chat/completions" \  -H "Content-Type: application/json" \  -d '{    "messages": [      {        "content": "Hello, how are you?",        "role": "user"      }    ],    "model": "openai/gpt-4o"  }'
Empty
{
  "error": {
    "code": "routing_error",
    "message": "Model 'invalid-model' not found"
  }
}
{
  "error": {
    "code": "invalid_api_key",
    "message": "Invalid API key provided"
  }
}
{
  "error": {
    "code": "rate_limit_exceeded",
    "details": {
      "limit": 100,
      "retry_after_secs": 30,
      "window": "minute"
    },
    "message": "Rate limit exceeded: 100 requests per minute"
  }
}
{
  "error": {
    "code": "provider_error",
    "message": "Upstream provider returned error: Service temporarily unavailable"
  }
}

Create a response

POST
/api/v1/responses
AuthorizationBearer <token>

API key authentication using Bearer token format

In: header

Request Body

application/json

background?boolean|null

Run in background

include?array<string>

Items to include in response

input?object

Input messages/items

instructions?string|null

System instructions

max_output_tokens?number|null

Maximum output tokens

Formatdouble
metadata?object

Request metadata

model?string|null

Model to use

models?|null

Hadrian Extension: List of models for multi-model routing (alternative to single model)

parallel_tool_calls?boolean|null

Allow parallel tool calls

plugins?

Hadrian Extension: Plugins to enable for this request

previous_response_id?string|null

Previous response ID for conversation continuation

prompt?object

Prompt template reference

prompt_cache_key?string|null

Prompt cache key

provider?object

Hadrian Extension: Provider routing configuration

reasoning?object

Reasoning configuration

safety_identifier?string|null

Safety identifier

service_tier?object

Service tier

store?boolean|null

Store response

stream?boolean

Enable streaming

temperature?number|null

Sampling temperature (0.0 to 2.0)

Formatdouble
text?object

Text configuration

tool_choice?object

Tool choice configuration

tools?

Available tools

top_k?number|null

Hadrian Extension: Top-k sampling (supported by some providers like Anthropic)

Formatdouble
top_p?number|null

Nucleus sampling probability (0.0 to 1.0)

Formatdouble
truncation?object

Truncation strategy

user?string|null

User identifier for abuse detection

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/responses" \  -H "Content-Type: application/json" \  -d '{}'
Empty
{
  "error": {
    "code": "budget_exceeded",
    "message": "Budget limit exceeded for monthly period",
    "param": null,
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "invalid_request_error"
  }
}
{
  "error": {
    "code": "budget_exceeded",
    "message": "Budget limit exceeded for monthly period",
    "param": null,
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "invalid_request_error"
  }
}