> ## Documentation Index
> Fetch the complete documentation index at: https://surf-dcinside-api.kr.ask.surf/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Weights

> Inspect the configured score weights and their versions

<Note>
  **Not in scope for trial.** This weights-management endpoint is reference material for later integration. Surf configures the intended Model 0924 down-vote-weight-0 setting for the current trial.
</Note>

DCinside requested weights that can change without retraining. This reference route describes how current and previous configurations could be inspected in a later integration. The configuration capability and the scope of this client-facing endpoint are separate.

The intended starting model is the delivered Model 0924 with down-vote weight 0. Confirm the full configuration and model artifact before starting. Inspect `first_cycle_time` to determine when a scheduled version takes effect.

Version labels must match the actual score computation. The current implementation can expose a new weights version alongside cached scores computed earlier. Fix and verify that provenance behavior before enabling this endpoint for client-driven changes. See the [rehearsal start conditions](/rollout#before-starting).


## OpenAPI

````yaml openapi.json GET /v1/weights
openapi: 3.0.3
info:
  title: DCinside RTB API
  description: >-
    Proposed contract for DCinside's scoring-only dress rehearsal. Real queue
    candidates go to Surf; DCinside logs would-be picks while operators continue
    publishing. The model does not publish during rehearsal. The intended model
    is the delivered Model 0924 with down-vote weight 0; the deployed
    transport-test adapter is not that artifact. Five-minute cycles, inline
    responses, pending re-scoring, payload details and authentication are Surf
    proposals for confirmation. The response deadline is not yet agreed.
    DCinside's draft first-score target is at least 99% within two cycles of
    queue entry, with no separate scoring wait. This specification describes
    target rehearsal behavior, not deployment readiness. See the rehearsal
    documentation for implementation gaps and acceptance criteria.
  version: 1.1.0-draft
servers:
  - url: https://{host}
    description: Issued by Surf together with the API key.
    variables:
      host:
        default: rtb.example.com
        description: >-
          Host name issued by Surf for the environment (rehearsal or
          production). The default is a placeholder.
security:
  - ApiKey: []
tags:
  - name: Scoring
    description: >-
      Proposed cycle scoring and retrieval for rehearsal; cadence, refresh
      policy and deadline need confirmation.
  - name: Images
    description: >-
      Proposed one-time image transfer; layout and scoring readiness behavior
      need confirmation.
  - name: Outcomes
    description: >-
      Not in scope for trial. Reference for later outcomes-endpoint integration.
      Daily operator outcomes may be shared separately by agreement.
  - name: Weights
    description: >-
      Not in scope for trial. Reference for later client-facing
      weight-management integration. Surf configures the initial trial model and
      weights.
  - name: Health
    description: >-
      Service information; not proof of model readiness, durable state or alert
      delivery.
paths:
  /v1/weights:
    get:
      tags:
        - Weights
      summary: Get Weights
      description: >-
        Not in scope for trial. This client-facing management endpoint is
        reference material for later integration; Surf configures the initial
        trial weights. Inspect current and previous weight configurations.
        Verify score provenance before enabling client-driven changes: current
        version labels can accompany earlier cached scores. The intended
        starting model is delivered Model 0924 with down-vote weight 0.
      operationId: getWeights
      responses:
        '200':
          description: Current and previous weights.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WeightsState'
              example:
                current:
                  version: w-2
                  weights:
                    views: 1
                    comments: 0.5
                    up: 0.25
                    downvote_share: 0
                  note: add comments and up-votes
                  set_at: '2026-09-30T03:00:00+09:00'
                  first_cycle_time: '2026-09-30T03:05:00+09:00'
                previous:
                  version: w-1
                  weights:
                    views: 1
                    comments: 0
                    up: 0
                    downvote_share: 0
                  note: 'first trial: views only'
                  set_at: '2026-09-29T02:02:11+09:00'
                  first_cycle_time: '2026-09-29T02:05:00+09:00'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    WeightsState:
      type: object
      properties:
        current:
          $ref: '#/components/schemas/WeightsRecord'
        previous:
          allOf:
            - $ref: '#/components/schemas/WeightsRecord'
          nullable: true
          description: The version before the current one, or `null` if there is none.
      required:
        - current
        - previous
    WeightsRecord:
      type: object
      properties:
        version:
          type: string
          example: w-1
          description: Weights version.
        weights:
          $ref: '#/components/schemas/WeightSet'
        note:
          type: string
          nullable: true
          example: 'first trial: views only'
          description: The note sent with the weights, or `null`.
        set_at:
          type: string
          format: date-time
          description: When the weights were accepted.
          example: '2026-09-29T02:02:11+09:00'
          pattern: >-
            ^\d{4}-\d{2}-\d{2}[Tt]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:[Zz]|[+-]\d{2}:\d{2})$
        first_cycle_time:
          type: string
          format: date-time
          description: The first cycle the weights applied to.
          example: '2026-09-29T02:05:00+09:00'
          pattern: >-
            ^\d{4}-\d{2}-\d{2}[Tt]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:[Zz]|[+-]\d{2}:\d{2})$
      required:
        - version
        - weights
        - set_at
        - first_cycle_time
    Error:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      required:
        - error
    WeightSet:
      type: object
      properties:
        views:
          type: number
          minimum: 0
          example: 1
          description: Weight on `p_views`.
        comments:
          type: number
          minimum: 0
          example: 0
          description: Weight on `p_comments`.
        up:
          type: number
          minimum: 0
          example: 0
          description: Weight on `p_up`.
        downvote_share:
          type: number
          minimum: 0
          example: 0
          description: >-
            Weight on the predicted down-vote share. It is subtracted, so send
            it as a positive number.
        hide:
          type: integer
          enum:
            - 0
          example: 0
          description: Reserved for the later hide head. Must be 0 or left out.
        deletion:
          type: integer
          enum:
            - 0
          example: 0
          description: Reserved for the later deletion head. Must be 0 or left out.
      required:
        - views
        - comments
        - up
        - downvote_share
      description: >-
        Publish-score weights. At least one of `views`, `comments` and `up` must
        be above 0.
    ErrorBody:
      type: object
      properties:
        code:
          type: string
          example: bad_request
          description: Machine-readable code. See Errors.
        message:
          type: string
          example: 2 fields failed validation
          description: Human-readable summary.
        fields:
          type: array
          items:
            $ref: '#/components/schemas/ErrorField'
          description: Every failing field, when the error is about the body.
      required:
        - code
        - message
    ErrorField:
      type: object
      properties:
        path:
          type: string
          example: candidates[0].created_at
          description: Path of the failing field.
        problem:
          type: string
          example: timestamp must include an explicit offset
          description: Description of the validation failure.
      required:
        - path
        - problem
  responses:
    Unauthorized:
      description: The API key is missing or unknown.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: API key missing or unknown
    ServerError:
      description: >-
        Server failure. Skip late or unusable scores for the decision cycle,
        preserve unacknowledged data and reconcile delivery. Alert delivery must
        be verified separately.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: server_error
              message: internal error
  securitySchemes:
    ApiKey:
      type: apiKey
      name: Authorization
      in: header
      description: >-
        Proposed API key sent as the whole Authorization header value.
        Long-lived credential scope, handoff and rotation need confirmation.
        Per-endpoint scopes are not currently enforced.

````