Skip to main content
PUT
Set Weights
Not in scope for trial. Client-driven weight changes through this endpoint are outside the current trial integration scope. The trial uses the delivered model with down-vote weight 0.
Surf computes the final score, with weights adjustable without retraining. The intended initial configuration has down-vote weight 0. Per-part predictions are optional. This endpoint proposes versioned configuration changes, taking effect on the next cycle. The activation cycle must be explicit, and every affected score must be computed with the reported version. Re-reading an older completed cycle preserves its original scores and versions. Before including this endpoint in a later phase, confirm who can change weights and how changes are coordinated. Do not assume per-endpoint credential scope enforcement is already implemented. Current validation requires non-negative weights and at least one positive value among views, comments and up. hide and deletion remain zero until the corresponding model support is available. There is no agreed upper bound of 10 on weights. Version-name and note-length protections are implementation choices, described in Conventions. Repeating the same version and configuration returns the original acknowledgement; changing a previously used version returns a conflict. Verify refresh behavior and restart durability before enabling client-driven configuration changes.

Authorizations

Authorization
string
header
required

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.

Body

application/json
version
string
required

Proposed stable configuration version. Current engineering protection: letters, digits, dot, underscore or hyphen, up to 64 characters. Same version/body can be retried; different configuration under that version conflicts.

Pattern: ^[A-Za-z0-9._-]{1,64}$
Example:

"w-1"

weights
object
required

Publish-score weights. At least one of views, comments and up must be above 0.

note
string

Optional annotation; current implementation protection is 500 characters, not a client-agreed business limit.

Maximum string length: 500
Example:

"first trial: views only"

Response

Accepted.

version
string
required

The accepted version, scheduled for first_cycle_time; not necessarily active at receipt time.

Example:

"w-1"

first_cycle_time
string<date-time>
required

The first cycle the weights apply to, which is the next one.

Pattern: ^\d{4}-\d{2}-\d{2}[Tt]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:[Zz]|[+-]\d{2}:\d{2})$
Example:

"2026-09-29T02:10:00+09:00"