https://api.abliteration.ai/v1 and your API key to an ak_... key from the console. abliteration.ai implements the OpenAI /v1/chat/completions, /v1/responses, and /v1/models endpoints — no other code changes needed.
Configuration
Python
Node
Streaming
Setstream: true. See streaming.
Prompt caching
Prompt-prefix caching is automatic. Set a stableprompt_cache_key for each logical conversation or reusable workload to improve routing affinity. It does not guarantee a cache hit; check the cached-token count in the response usage. See prompt caching.
Tool calling
Passtools and tool_choice exactly as with OpenAI. See tool calling.
Policies
Published policies scoped to your project apply automatically. Passpolicy_ids to add published policies selected for this request. See Policies in API requests.
Reasoning
All models reason before answering. Control the depth with an effort level:- Chat Completions —
reasoning_effort(minimal…max). All models accept the full ladder. - Responses —
reasoning.effort. The base model accepts up toxhigh(it rejectsmax);abliterated-model-largeandabliterated-model-large-v2accept up tomax. - Compatibility alias — a top-level
effortworks on both surfaces, aliasing the field above. Standard clients should preferreasoning_effort/reasoning.effort. - Legacy toggle — top-level
thinking: falsedisables reasoning on Chat Completions, except onabliterated-model-large-v2, where it runs at low and hides the trace.
reasoning_effort: "none" (or reasoning.effort: "none") to disable reasoning on the base or previous large model. Large V2 maps none and other disable-shaped controls to low reasoning with the trace hidden. Use include_reasoning: false to keep the selected reasoning depth but drop the trace from the response. See thinking & reasoning effort for the full behavior, per-model differences, and where the trace is returned.
Structured outputs
Passresponse_format to constrain the output:
{"type": "json_object"}— valid JSON.{"type": "json_schema", "json_schema": {...}}— JSON matching your schema.
/v1/chat/completions.
See the compatibility matrix for a full feature-by-feature list.
abliterated-model-large and abliterated-model-large-v2 are text-only. Requests with image content are rejected with a 400 — send image inputs to abliterated-model. Video inputs are not supported by any model.