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

# Register a new ADC design

> Register an ADC design under a therapeutic candidate.

The design is a catalog record (linker + payload + conjugation
method); no compute runs at create time. Cross-org ``candidate_id``
values return ``404`` before any write.

**Plan gate.** None — registering designs is free; plan gates apply
at compute time (``POST /v1/adc-designs/{id}/analysis`` is free
today but may gate when payload/linker catalogues grow).

Cost: **write** — burns rate + quota. Does not debit credits.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/adc-designs
openapi: 3.1.0
info:
  title: Kallima API
  description: >-
    Antibody design API — humanization, structure, stability, immunogenicity,
    complex prediction, and codon optimization.
  version: 0.1.0
servers: []
security: []
tags:
  - name: identity
    description: >-
      Caller identity and credit balance — use ``GET /v1/me`` to inspect the
      resolved org, plan, and compute budget before submitting jobs.
  - name: projects
    description: >-
      Projects — top-level containers for source antibodies and therapeutic
      candidates.
  - name: source-antibodies
    description: Source (parental) antibody sequences registered under a project.
  - name: variants
    description: >-
      Variants descended from a therapeutic candidate — the unit of work for
      pipelines.
  - name: jobs
    description: >-
      Long-running pipeline jobs: humanization, structure, stability,
      immunogenicity. Submit and poll. Deprecated in favor of
      resource-per-job-type endpoints (``humanizations`` and the other Phase 3
      resources); scheduled for removal in ``/v2``.
  - name: humanizations
    description: >-
      Humanization pipeline runs — typed submit body and typed per-strategy
      results. First of the Phase 3 resource-per-job-type endpoints; the generic
      ``/v1/jobs`` shape is deprecated in favor of this.
  - name: structure-predictions
    description: >-
      ImmuneBuilder structure predictions — typed submit body and typed PDB /
      pLDDT / CDR results. Phase 3 resource-per-job-type endpoint.
  - name: stability-analyses
    description: >-
      Stability analyses — typed submit body and typed thermostability /
      aggregation / developability scorecard. Phase 3 resource-per-job-type
      endpoint.
  - name: immunogenicity-analyses
    description: >-
      Immunogenicity analyses — typed submit body and typed MHC-I / MHC-II /
      B-cell epitope + risk-score results. Phase 3 resource-per-job-type
      endpoint.
  - name: uploads
    description: >-
      Presigned Supabase Storage slots for caller-supplied files (e.g. antigen
      PDBs for complex prediction). The API never proxies bytes — clients PUT
      directly to the returned URL.
  - name: antigens
    description: >-
      Target protein sequences scoped to a project — the docking partner in a
      complex prediction. Register once, reference by ``antigen_id`` at submit
      time.
  - name: complex-predictions
    description: >-
      Boltz-2 antibody-antigen complex predictions — typed submit body and typed
      docked-PDB / iptm / interface-residues results. Phase 3
      resource-per-job-type endpoint. Complex runs are long-running (~20–40 min
      on GPU); always poll, never hold the connection.
  - name: therapeutic-candidates
    description: >-
      Therapeutic candidates — the top-of-lineage object under a project.
      Creating one auto-creates a baseline variant (``v1``) and its chain rows
      atomically; pipelines submit against the variant. Junction endpoints
      manage many-to-many links to source antibodies and antigens.
  - name: adc-designs
    description: >-
      ADC (antibody-drug conjugate) designs — catalog records attaching a linker
      + payload + conjugation method to a therapeutic candidate. Run the
      rule-based developability analysis via ``POST
      /v1/adc-designs/{id}/analysis``; pass ``structure_job_id`` to include
      SASA-based conjugation-site accessibility.
  - name: codon-exports
    description: >-
      Codon optimization exports — submit a batch of jobs (one per variant),
      poll until ``variable_cds`` is populated, then download the assembled CDS
      as FASTA, CSV, or GenBank+ZIP. Requires the Structure plan or above.
  - name: webhooks
    description: >-
      Webhook endpoint registration — register HTTPS URLs to receive signed
      event deliveries when jobs complete or fail. Signing uses HMAC-SHA256; see
      ``POST /v1/webhooks`` for verification details.
  - name: webhook-deliveries
    description: >-
      Webhook delivery log — inspect past delivery attempts and manually retry
      failed ones via ``POST /v1/webhook_deliveries/{id}/retry``.
paths:
  /v1/adc-designs:
    post:
      tags:
        - adc-designs
      summary: Register a new ADC design
      description: |-
        Register an ADC design under a therapeutic candidate.

        The design is a catalog record (linker + payload + conjugation
        method); no compute runs at create time. Cross-org ``candidate_id``
        values return ``404`` before any write.

        **Plan gate.** None — registering designs is free; plan gates apply
        at compute time (``POST /v1/adc-designs/{id}/analysis`` is free
        today but may gate when payload/linker catalogues grow).

        Cost: **write** — burns rate + quota. Does not debit credits.
      operationId: create_adc_design_v1_adc_designs_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdcDesignCreateBody'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/app__routers__v1_adc_designs__AdcDesign'
        '400':
          description: Malformed request body or parameter.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Missing or invalid API token.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '402':
          description: >-
            Payment required — insufficient credits or the caller's plan is
            below the required tier.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Resource does not exist in the caller's organization.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '422':
          description: Request failed validation.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '429':
          description: >-
            Rate limit or monthly write quota exceeded. `Retry-After` holds the
            number of seconds until the next admitted request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          headers:
            Retry-After:
              description: Seconds until the caller may retry. Present on 429 responses.
              schema:
                type: integer
                minimum: 1
            X-RateLimit-Limit:
              description: Per-minute rate ceiling for this API token's plan.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests remaining in the current rate window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: HTTP-date when the rate window resets.
              schema:
                type: string
                format: http-date
            X-Quota-Limit:
              description: Monthly write ceiling for this API token's plan.
              schema:
                type: integer
            X-Quota-Remaining:
              description: Writes remaining in the current monthly window.
              schema:
                type: integer
            X-Quota-Reset:
              description: >-
                HTTP-date when the monthly write quota resets (always the 1st of
                next month UTC).
              schema:
                type: string
                format: http-date
      security:
        - HTTPBearer: []
components:
  schemas:
    AdcDesignCreateBody:
      properties:
        candidate_id:
          type: string
          title: Candidate Id
          description: >-
            Therapeutic candidate this design attaches to. Must be owned by the
            caller's org; cross-org ids return ``404``.
          examples:
            - c0f5e4b1-a7d2-4e0b-9f8c-1b2d3e4f5a6b
        name:
          type: string
          maxLength: 120
          minLength: 1
          title: Name
          description: Short human label (e.g. ``MMAE + vc``).
          examples:
            - MMAE + vc
        linker_name:
          type: string
          maxLength: 80
          minLength: 1
          title: Linker Name
          description: >-
            Linker identifier. Free text — see ``GET /v1/adc-designs/catalogue``
            for common named linkers but any string is accepted.
          examples:
            - mc-vc-PAB
        linker_smiles:
          anyOf:
            - type: string
            - type: 'null'
          title: Linker Smiles
          description: Optional SMILES string for the linker. Not validated.
        linker_type:
          type: string
          enum:
            - cleavable_peptide
            - cleavable_disulfide
            - cleavable_ph
            - non_cleavable_thioether
            - non_cleavable_amide
            - self_immolative
            - custom
          title: Linker Type
          description: >-
            Mechanism class. ``cleavable_*`` linkers release the payload in the
            endosome; ``non_cleavable_*`` require lysosomal degradation of the
            antibody.
        payload_name:
          type: string
          maxLength: 80
          minLength: 1
          title: Payload Name
          description: Payload identifier (e.g. ``MMAE``, ``DXd``, ``DM1``).
          examples:
            - MMAE
        payload_smiles:
          anyOf:
            - type: string
            - type: 'null'
          title: Payload Smiles
          description: Optional SMILES string for the payload.
        payload_class:
          anyOf:
            - type: string
              enum:
                - maytansinoid
                - auristatin
                - camptothecin_analog
                - calicheamicin
                - pbd_dimer
                - other
            - type: 'null'
          title: Payload Class
          description: Mechanistic class. Drives the rule-based analysis.
        payload_clogp:
          anyOf:
            - type: number
            - type: 'null'
          title: Payload Clogp
          description: >-
            Computed log P for the payload. Used to flag aggregation risk when
            linker+payload hydrophobicity combine.
        conjugation_method:
          type: string
          enum:
            - lysine_native
            - cysteine_native
            - cysteine_engineered
            - sortase
            - spytag
            - other
          title: Conjugation Method
          description: >-
            Attachment chemistry. ``cysteine_engineered`` and enzymatic methods
            (``sortase``, ``spytag``) give the tightest DAR control.
        conjugation_site:
          anyOf:
            - type: string
            - type: 'null'
          title: Conjugation Site
          description: Residue label for site-specific methods (e.g. ``S239C``).
        dar_target:
          anyOf:
            - type: integer
              maximum: 20
              minimum: 1
            - type: 'null'
          title: Dar Target
          description: >-
            Target drug-to-antibody ratio. Analysis flags mismatches with
            payload tolerances.
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
          description: Optional freeform note shown alongside the design.
      type: object
      required:
        - candidate_id
        - name
        - linker_name
        - linker_type
        - payload_name
        - conjugation_method
      title: AdcDesignCreateBody
      description: |-
        Body for ``POST /v1/adc-designs``.

        Mirrors :class:`app.schemas.adc.AdcDesignCreate` but annotated for
        the /v1 OpenAPI surface (examples, explicit descriptions). Cross-org
        ``candidate_id`` values return ``404`` — no existence leak.
      example:
        candidate_id: c0f5e4b1-a7d2-4e0b-9f8c-1b2d3e4f5a6b
        conjugation_method: cysteine_engineered
        conjugation_site: S239C
        dar_target: 4
        linker_name: mc-vc-PAB
        linker_type: cleavable_peptide
        name: MMAE + vc
        payload_class: auristatin
        payload_clogp: 4
        payload_name: MMAE
    app__routers__v1_adc_designs__AdcDesign:
      properties:
        id:
          type: string
          title: Id
          description: Opaque design identifier (UUID).
          examples:
            - dd11aa22-bb33-cc44-dd55-eeff66778899
        object:
          type: string
          const: adc_design
          title: Object
          description: Polymorphic discriminator. Always ``adc_design``.
          default: adc_design
        candidate_id:
          type: string
          title: Candidate Id
          description: Therapeutic candidate this design belongs to.
          examples:
            - c0f5e4b1-a7d2-4e0b-9f8c-1b2d3e4f5a6b
        name:
          type: string
          title: Name
        linker_name:
          type: string
          title: Linker Name
        linker_smiles:
          anyOf:
            - type: string
            - type: 'null'
          title: Linker Smiles
        linker_type:
          type: string
          title: Linker Type
        payload_name:
          type: string
          title: Payload Name
        payload_smiles:
          anyOf:
            - type: string
            - type: 'null'
          title: Payload Smiles
        payload_class:
          anyOf:
            - type: string
            - type: 'null'
          title: Payload Class
        payload_clogp:
          anyOf:
            - type: number
            - type: 'null'
          title: Payload Clogp
        conjugation_method:
          type: string
          title: Conjugation Method
        conjugation_site:
          anyOf:
            - type: string
            - type: 'null'
          title: Conjugation Site
        dar_target:
          anyOf:
            - type: integer
            - type: 'null'
          title: Dar Target
        analysis:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Analysis
          description: >-
            Cached analysis result, populated by ``POST
            /v1/adc-designs/{id}/analysis``. ``null`` until the first run.
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        created_at:
          type: string
          title: Created At
          description: ISO-8601 timestamp (UTC).
        updated_at:
          type: string
          title: Updated At
          description: ISO-8601 timestamp (UTC).
      type: object
      required:
        - id
        - candidate_id
        - name
        - linker_name
        - linker_type
        - payload_name
        - conjugation_method
        - created_at
        - updated_at
      title: AdcDesign
      description: An ADC design as returned by /v1.
    ProblemDetails:
      additionalProperties: true
      description: RFC 9457 problem+json body returned by every non-2xx response.
      example:
        code: insufficient_credits
        credit_balance: 0
        credit_cost: 1
        detail: Humanization costs 1 credit; balance is 0.
        instance: /v1/jobs
        request_id: req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D
        status: 402
        title: Insufficient credits
        type: https://docs.kallima.bio/errors/insufficient_credits
      properties:
        type:
          description: >-
            Stable URI identifying the error class. Dereferenceable at
            docs.kallima.bio/errors/{code}.
          examples:
            - https://docs.kallima.bio/errors/insufficient_credits
          title: Type
          type: string
        title:
          description: Short human-readable summary of the error class.
          examples:
            - Insufficient credits
          title: Title
          type: string
        status:
          description: HTTP status code. Matches the response status line.
          examples:
            - 402
          title: Status
          type: integer
        detail:
          description: Human-readable explanation with values substituted.
          examples:
            - Humanization costs 1 credit; balance is 0.
          title: Detail
          type: string
        instance:
          description: The specific request URI that failed.
          examples:
            - /v1/jobs
          title: Instance
          type: string
        code:
          description: >-
            Machine-readable short code. SDKs switch on this, not on `title`.
            See app.errors.ErrorCode for the full taxonomy.
          examples:
            - insufficient_credits
          title: Code
          type: string
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: ULID stamped on every request. Include when contacting support.
          examples:
            - req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D
          title: Request Id
      required:
        - type
        - title
        - status
        - detail
        - instance
        - code
      title: ProblemDetails
      type: object
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````