Skip to content
Veil

Chat completions

POST /v1/chat/completions in the OpenAI format.

POST https://veil.st/v1/chat/completions

The OpenAI chat completions format. Every model in the catalog is available here.

Request

curl https://veil.st/v1/chat/completions \
  -H "Authorization: Bearer ak_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash-1017-abliterated",
    "messages": [{"role": "user", "content": "Say hello in five words."}],
    "max_tokens": 200
  }'
FieldNotes
modelRequired. An id from the catalog.
messagesRequired. A non-empty array in the OpenAI format.
max_tokensOptional. Defaults to 4096. max_completion_tokens is accepted as another name for it. Values above the model limit are lowered to the limit.
streamOptional. See Streaming.
reasoning_effortOptional. Only the thinking model uses it. See Reasoning.
tools, temperature, othersPassed to the model unchanged. A parameter the model does not support can come back as a 400.

What we change

  • max_tokens is always set, and can be lowered when the balance is short. See Billing.
  • user and metadata are removed before the request leaves our servers, so identifiers you put there never reach a model host.
  • reasoning and reasoning_effort are replaced by the setting for the model id you chose.
  • In the reply, model is always the id you sent. system_fingerprint and provider are removed.

Response

{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "created": 1767268800,
  "model": "deepseek-v4.1-flash-1017-abliterated",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "Hello there, how are you?" },
      "finish_reason": "stop"
    }
  ],
  "usage": { "prompt_tokens": 14, "completion_tokens": 7, "total_tokens": 21 }
}

The reply comes from the model. Fields other than the ones named above are passed through as the model produced them. Replies are sent with Cache-Control: no-store and the rate limit headers.

Images

Send images as image_url content parts. A model without vision answers with 400 and the message This model does not accept images. The capabilities.vision field of GET /v1/models says which models accept them. The whole request body may be up to 12 MB. A request may carry at most 16 images (more returns 400), each at most 4 MB (larger returns 413).