---
title: "Mark the primary provider"
method: PUT
path: "/v1/model-template/primary"
tags: ["Conversations"]
---

# Mark the primary provider

`PUT /v1/model-template/primary`

## Request

- Base URL: `https://api.shardflux.dev`
- URL: `https://api.shardflux.dev/v1/model-template/primary`
- Auth: HTTP bearer

The provider whose models run masters, builders and hard work. Without `project_id`: the organization’s default (owners and admins). With it: that project’s override (owners and admins, or the project’s API key). `provider: null` removes the mark (then the first provider connected is primary).

## Request body

- object
  - `provider` 'claude' | 'codex', nullable, required
  - `project_id` string, uuid: UUIDv7, lowercase canonical form.
  - `organization_id` string, uuid: UUIDv7, lowercase canonical form.

## Response `200`

Default Response

- ModelTemplate
  - `primary` 'claude' | 'codex', nullable, required
  - `primary_source` 'marked' | 'project' | 'first_connected', nullable, required: marked: the organization’s mark; project: this project’s override; first_connected: no mark, the first provider connected.
  - `secondary` 'claude' | 'codex', nullable, required
  - `connected` object[], required
    - `provider` 'claude' | 'codex', required
    - `plan_type` string, nullable, required
    - `connected_at` string, date-time, required
    - `limited_until` string, date-time, nullable, required
  - `task_harness` 'claude' | 'codex', nullable, required
  - `attempt` integer, required
  - `roles` object, required
    - `master` object, required
      - `harness` 'claude' | 'codex', required
      - `model` string, required: Pass as `model` when you start the conversation.
      - `effort` 'low' | 'medium' | 'high' | 'xhigh' | 'max', nullable, required
      - `label` string, required: Plain words: "Claude Opus 5.5, high effort".
      - `planning_effort` 'low' | 'medium' | 'high' | 'xhigh' | 'max'
      - `wait` object, nullable, required: The role’s provider is out of usage. Nothing switches on its own: offer the alternative to the person.
        - `until` string, date-time, required: When the provider’s used-up window resets: the task waits until then.
        - `alternative` object, nullable, required
          - `harness` 'claude' | 'codex', required
          - `model` string, required: Pass as `model` when you start the conversation.
          - `effort` 'low' | 'medium' | 'high' | 'xhigh' | 'max', nullable, required
          - `label` string, required: Plain words: "Claude Opus 5.5, high effort".
    - `builder` object, required
      - `harness` 'claude' | 'codex', required
      - `model` string, required: Pass as `model` when you start the conversation.
      - `effort` 'low' | 'medium' | 'high' | 'xhigh' | 'max', nullable, required
      - `label` string, required: Plain words: "Claude Opus 5.5, high effort".
      - `planning_effort` 'low' | 'medium' | 'high' | 'xhigh' | 'max'
      - `wait` object, nullable, required: The role’s provider is out of usage. Nothing switches on its own: offer the alternative to the person.
        - `until` string, date-time, required: When the provider’s used-up window resets: the task waits until then.
        - `alternative` object, nullable, required
          - `harness` 'claude' | 'codex', required
          - `model` string, required: Pass as `model` when you start the conversation.
          - `effort` 'low' | 'medium' | 'high' | 'xhigh' | 'max', nullable, required
          - `label` string, required: Plain words: "Claude Opus 5.5, high effort".
    - `hard` object, required
      - `harness` 'claude' | 'codex', required
      - `model` string, required: Pass as `model` when you start the conversation.
      - `effort` 'low' | 'medium' | 'high' | 'xhigh' | 'max', nullable, required
      - `label` string, required: Plain words: "Claude Opus 5.5, high effort".
      - `planning_effort` 'low' | 'medium' | 'high' | 'xhigh' | 'max'
      - `wait` object, nullable, required: The role’s provider is out of usage. Nothing switches on its own: offer the alternative to the person.
        - `until` string, date-time, required: When the provider’s used-up window resets: the task waits until then.
        - `alternative` object, nullable, required
          - `harness` 'claude' | 'codex', required
          - `model` string, required: Pass as `model` when you start the conversation.
          - `effort` 'low' | 'medium' | 'high' | 'xhigh' | 'max', nullable, required
          - `label` string, required: Plain words: "Claude Opus 5.5, high effort".
    - `light` object, required
      - `harness` 'claude' | 'codex', required
      - `model` string, required: Pass as `model` when you start the conversation.
      - `effort` 'low' | 'medium' | 'high' | 'xhigh' | 'max', nullable, required
      - `label` string, required: Plain words: "Claude Opus 5.5, high effort".
      - `planning_effort` 'low' | 'medium' | 'high' | 'xhigh' | 'max'
      - `wait` object, nullable, required: The role’s provider is out of usage. Nothing switches on its own: offer the alternative to the person.
        - `until` string, date-time, required: When the provider’s used-up window resets: the task waits until then.
        - `alternative` object, nullable, required
          - `harness` 'claude' | 'codex', required
          - `model` string, required: Pass as `model` when you start the conversation.
          - `effort` 'low' | 'medium' | 'high' | 'xhigh' | 'max', nullable, required
          - `label` string, required: Plain words: "Claude Opus 5.5, high effort".
    - `reviewer` object, required
      - `harness` 'claude' | 'codex', required
      - `model` string, required: Pass as `model` when you start the conversation.
      - `effort` 'low' | 'medium' | 'high' | 'xhigh' | 'max', nullable, required
      - `label` string, required: Plain words: "Claude Opus 5.5, high effort".
      - `planning_effort` 'low' | 'medium' | 'high' | 'xhigh' | 'max'
      - `wait` object, nullable, required: The role’s provider is out of usage. Nothing switches on its own: offer the alternative to the person.
        - `until` string, date-time, required: When the provider’s used-up window resets: the task waits until then.
        - `alternative` object, nullable, required
          - `harness` 'claude' | 'codex', required
          - `model` string, required: Pass as `model` when you start the conversation.
          - `effort` 'low' | 'medium' | 'high' | 'xhigh' | 'max', nullable, required
          - `label` string, required: Plain words: "Claude Opus 5.5, high effort".

## Other responses

- `4XX`: Default Response
- `5XX`: Default Response

---

[API](https://skmtc.dev/shardflux/apis/shardflux-api.md) · [All operations](https://skmtc.dev/shardflux/apis/shardflux-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shardflux/apis/shardflux-api/revisions/ea685f7b39c4?raw)
