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

Completions

Create text completions from a prompt. Legacy API for non-chat models. OpenAI-compatible.

Create a text completion

POST
/api/v1/completions
AuthorizationBearer <token>

API key authentication using Bearer token format

In: header

Request Body

application/json

best_of?integer|null

Number of completions to generate and return the best

Formatint64
echo?boolean|null

Echo the prompt in the response

frequency_penalty?number|null

Penalize repeated tokens (-2.0 to 2.0)

Formatdouble
logit_bias?object

Token bias map

logprobs?integer|null

Number of log probabilities to return

Formatint64
max_tokens?integer|null

Maximum tokens to generate

Formatint64
metadata?object

Hadrian Extension: Request metadata for tracking and filtering

model?string|null

Model to use for completion

models?|null

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

n?integer|null

Number of completions to generate

Formatint64
presence_penalty?number|null

Penalize new topics (-2.0 to 2.0)

Formatdouble
prompt*object

The prompt to generate completions for

response_format?object

Hadrian Extension: Response format (OpenAI only supports this on chat/completions)

seed?integer|null

Random seed for reproducibility

Formatint64
stop?object

Stop sequence(s)

stream?boolean

Enable streaming

stream_options?object

Stream options

suffix?string|null

Text to append after completion

temperature?number|null

Sampling temperature (0.0 to 2.0)

Formatdouble
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

curl -X POST "https://loading/api/v1/completions" \  -H "Content-Type: application/json" \  -d '{    "prompt": {}  }'
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"
  }
}