> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abliteration.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an Anthropic Messages-compatible response



## OpenAPI

````yaml https://api.abliteration.ai/openapi.json post /v1/messages
openapi: 3.1.0
info:
  title: Abliteration Platform API
  summary: Greenfield Abliteration backend and API gateway.
  version: 0.1.0
servers: []
security: []
paths:
  /v1/messages:
    post:
      tags:
        - Messages
      summary: Create an Anthropic Messages-compatible response
      operationId: createMessage
      parameters:
        - name: Authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Bearer API key.
            title: Authorization
          description: Bearer API key.
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              API key alternative for Anthropic-compatible clients.
              Authorization takes precedence when both headers are present.
            title: X-Api-Key
          description: >-
            API key alternative for Anthropic-compatible clients. Authorization
            takes precedence when both headers are present.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnthropicMessagesRequest'
              description: Anthropic Messages-compatible request.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnthropicMessagesResponse'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Payment Required
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict
        '413':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Request Entity Too Large
        '415':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unsupported Media Type
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Gateway
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Service Unavailable
components:
  schemas:
    AnthropicMessagesRequest:
      properties:
        model:
          type: string
          minLength: 1
          title: Model
        max_tokens:
          type: integer
          maximum: 999990
          minimum: 1
          title: Max Tokens
        messages:
          items:
            $ref: '#/components/schemas/AnthropicMessage'
          type: array
          minItems: 1
          title: Messages
        system:
          anyOf:
            - type: string
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: System
        stream:
          type: boolean
          title: Stream
          default: false
        temperature:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Temperature
        top_p:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Top P
        top_k:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Top K
        stop_sequences:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Stop Sequences
        tools:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Tools
        tool_choice:
          anyOf:
            - $ref: '#/components/schemas/AnthropicToolChoice'
            - type: 'null'
        thinking:
          anyOf:
            - $ref: '#/components/schemas/AnthropicThinking'
            - type: 'null'
        output_config:
          anyOf:
            - $ref: '#/components/schemas/AnthropicOutputConfig'
            - type: 'null'
        context_management:
          anyOf:
            - $ref: '#/components/schemas/AnthropicContextManagement'
            - type: 'null'
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        service_tier:
          anyOf:
            - type: string
              enum:
                - auto
                - standard_only
            - type: 'null'
          title: Service Tier
        flagged_categories:
          items:
            enum:
              - harassment
              - harassment/threatening
              - hate
              - hate/threatening
              - illicit
              - illicit/violent
              - self-harm
              - self-harm/intent
              - self-harm/instructions
              - sexual
              - sexual/minors
              - violence
              - violence/graphic
          type: array
          title: Flagged Categories
      additionalProperties: false
      type: object
      required:
        - model
        - max_tokens
        - messages
      title: AnthropicMessagesRequest
      description: Versioned public V1 subset of Anthropic Messages create.
    AnthropicMessagesResponse:
      properties:
        id:
          type: string
          pattern: ^msg_
          title: Id
        type:
          type: string
          const: message
          title: Type
          default: message
        role:
          type: string
          const: assistant
          title: Role
          default: assistant
        content:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Content
        model:
          type: string
          title: Model
        stop_reason:
          anyOf:
            - type: string
              enum:
                - end_turn
                - max_tokens
                - stop_sequence
                - tool_use
            - type: 'null'
          title: Stop Reason
        stop_sequence:
          anyOf:
            - type: string
            - type: 'null'
          title: Stop Sequence
        usage:
          $ref: '#/components/schemas/AnthropicUsage'
      additionalProperties: true
      type: object
      required:
        - id
        - content
        - model
        - stop_reason
        - usage
      title: AnthropicMessagesResponse
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      type: object
      required:
        - error
      title: ErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AnthropicMessage:
      properties:
        role:
          type: string
          enum:
            - user
            - assistant
            - system
          title: Role
        content:
          anyOf:
            - type: string
            - items:
                additionalProperties: true
                type: object
              type: array
          title: Content
      additionalProperties: false
      type: object
      required:
        - role
        - content
      title: AnthropicMessage
    AnthropicToolChoice:
      properties:
        type:
          type: string
          enum:
            - auto
            - any
            - tool
            - none
          title: Type
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        disable_parallel_tool_use:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Disable Parallel Tool Use
      additionalProperties: false
      type: object
      required:
        - type
      title: AnthropicToolChoice
    AnthropicThinking:
      properties:
        type:
          type: string
          enum:
            - enabled
            - disabled
            - adaptive
          title: Type
        budget_tokens:
          anyOf:
            - type: integer
              maximum: 999990
              minimum: 1
            - type: 'null'
          title: Budget Tokens
        display:
          anyOf:
            - type: string
              enum:
                - summarized
                - omitted
            - type: 'null'
          title: Display
      additionalProperties: false
      type: object
      required:
        - type
      title: AnthropicThinking
    AnthropicOutputConfig:
      properties:
        effort:
          anyOf:
            - type: string
              enum:
                - low
                - medium
                - high
                - xhigh
                - max
                - ultracode
            - type: 'null'
          title: Effort
        format:
          anyOf:
            - $ref: '#/components/schemas/AnthropicJsonOutputFormat'
            - type: 'null'
      additionalProperties: false
      type: object
      title: AnthropicOutputConfig
    AnthropicContextManagement:
      properties:
        edits:
          items:
            $ref: '#/components/schemas/AnthropicClearThinkingContextEdit'
          type: array
          maxItems: 1
          minItems: 1
          title: Edits
      additionalProperties: false
      type: object
      required:
        - edits
      title: AnthropicContextManagement
      description: |-
        Supported beta context-management subset.

        ``keep=all`` does not remove any replayed thinking blocks, so it can be
        safely consumed at the compatibility boundary and omitted from the vLLM
        provider payload.
    AnthropicUsage:
      properties:
        input_tokens:
          type: integer
          minimum: 0
          title: Input Tokens
        output_tokens:
          type: integer
          minimum: 0
          title: Output Tokens
        cache_creation_input_tokens:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Cache Creation Input Tokens
        cache_read_input_tokens:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Cache Read Input Tokens
      additionalProperties: true
      type: object
      required:
        - input_tokens
        - output_tokens
      title: AnthropicUsage
    ErrorDetail:
      properties:
        code:
          type: string
          title: Code
          description: Stable machine-readable error code.
        message:
          type: string
          title: Message
          description: Bounded human-readable error message.
        type:
          $ref: '#/components/schemas/ErrorType'
          description: Broad stable error category.
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
          description: Request field related to the error.
        request_id:
          type: string
          title: Request Id
          description: Server-owned canonical request ID.
        doc_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Doc Url
          description: Documentation URL for the error.
      type: object
      required:
        - code
        - message
        - type
        - request_id
      title: ErrorDetail
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AnthropicJsonOutputFormat:
      properties:
        type:
          type: string
          const: json_schema
          title: Type
        schema:
          additionalProperties: true
          type: object
          title: Schema
      additionalProperties: false
      type: object
      required:
        - type
        - schema
      title: AnthropicJsonOutputFormat
    AnthropicClearThinkingContextEdit:
      properties:
        type:
          type: string
          const: clear_thinking_20251015
          title: Type
        keep:
          type: string
          const: all
          title: Keep
      additionalProperties: false
      type: object
      required:
        - type
        - keep
      title: AnthropicClearThinkingContextEdit
      description: Claude Code's non-destructive context-management compatibility edit.
    ErrorType:
      type: string
      enum:
        - auth_error
        - permission_error
        - validation_error
        - rate_limit_error
        - billing_error
        - moderation_error
        - media_error
        - not_found_error
        - conflict_error
        - provider_error
        - internal_error
      title: ErrorType

````