Tuti APIProject

Update the AI models

Pick the model an AI role uses for this project, or each group's level. Roles left out keep theirs. Autopilot's roles take only models with tool calls, and the server may cap a model's price (the config file's ai.maxPrice).

Needs a read + write key.

PATCH/ai-models

Authorization Bearer token

Body

application/json · object · required

  • answersstring · at most 200 characters

    Answers to readers' questions in the help center and the widget. A model id the AI endpoint lists (OpenRouter's, e.g. anthropic/claude-sonnet-5.5), or "" for the server's default; "off" skips Autopilot's checks (code_changes_check only: 400 for another role). Picking a model puts the role's group on the custom level, which needs a plan with it (402); "off" and "" work on every plan

  • escalationsstring · at most 200 characters

    Passing a question the help center couldn't answer to the team. A model id the AI endpoint lists (OpenRouter's, e.g. anthropic/claude-sonnet-5.5), or "" for the server's default; "off" skips Autopilot's checks (code_changes_check only: 400 for another role). Picking a model puts the role's group on the custom level, which needs a plan with it (402); "off" and "" work on every plan

  • support_draftstring · at most 200 characters

    The Inbox's drafted replies. A model id the AI endpoint lists (OpenRouter's, e.g. anthropic/claude-sonnet-5.5), or "" for the server's default; "off" skips Autopilot's checks (code_changes_check only: 400 for another role). Picking a model puts the role's group on the custom level, which needs a plan with it (402); "off" and "" work on every plan

  • support_summarystring · at most 200 characters

    The Inbox's summaries of a conversation. A model id the AI endpoint lists (OpenRouter's, e.g. anthropic/claude-sonnet-5.5), or "" for the server's default; "off" skips Autopilot's checks (code_changes_check only: 400 for another role). Picking a model puts the role's group on the custom level, which needs a plan with it (402); "off" and "" work on every plan

  • changelogstring · at most 200 characters

    Drafting and rewriting changelog entries. A model id the AI endpoint lists (OpenRouter's, e.g. anthropic/claude-sonnet-5.5), or "" for the server's default; "off" skips Autopilot's checks (code_changes_check only: 400 for another role). Picking a model puts the role's group on the custom level, which needs a plan with it (402); "off" and "" work on every plan

  • code_changes_decidestring · at most 200 characters

    Autopilot deciding what a code change means for the docs, changelog and posts. A model id the AI endpoint lists (OpenRouter's, e.g. anthropic/claude-sonnet-5.5), or "" for the server's default; "off" skips Autopilot's checks (code_changes_check only: 400 for another role). Picking a model puts the role's group on the custom level, which needs a plan with it (402); "off" and "" work on every plan

  • code_changes_checkstring · at most 200 characters

    Autopilot checking its own work (off skips the checks). A model id the AI endpoint lists (OpenRouter's, e.g. anthropic/claude-sonnet-5.5), or "" for the server's default; "off" skips Autopilot's checks (code_changes_check only: 400 for another role). Picking a model puts the role's group on the custom level, which needs a plan with it (402); "off" and "" work on every plan

  • code_changesstring · at most 200 characters

    Autopilot writing, and Verify. A model id the AI endpoint lists (OpenRouter's, e.g. anthropic/claude-sonnet-5.5), or "" for the server's default; "off" skips Autopilot's checks (code_changes_check only: 400 for another role). Picking a model puts the role's group on the custom level, which needs a plan with it (402); "off" and "" work on every plan

  • levelsobject

    Sets a group's level (affordable, balanced, best or custom): 402 where the plan doesn't include it, 400 where the server doesn't offer it or its models cost more than the server allows

    Show 4 properties
    • answersstring

      One of"affordable""balanced""best""custom"

    • supportstring

      One of"affordable""balanced""best""custom"

    • changelogstring

      One of"affordable""balanced""best""custom"

    • code_changesstring

      One of"affordable""balanced""best""custom"

Responses

  • 200Each AI role's model and each group's level

    application/json · object

    Each AI role's model and each group's level

    • answersAiRoleModelrequired

      Answers to readers' questions in the help center and the widget

      Show 3 properties
      • modelstring · nullablerequired

        The model the project picked (off: skipped), or null for the server's default

      • defaultstringrequired

        The server's default model for the role

      • usedstringrequired

        The model its work runs on now

    • escalationsAiRoleModelrequired

      Passing a question the help center couldn't answer to the team

      Show 3 properties
      • modelstring · nullablerequired

        The model the project picked (off: skipped), or null for the server's default

      • defaultstringrequired

        The server's default model for the role

      • usedstringrequired

        The model its work runs on now

    • support_draftAiRoleModelrequired

      The Inbox's drafted replies

      Show 3 properties
      • modelstring · nullablerequired

        The model the project picked (off: skipped), or null for the server's default

      • defaultstringrequired

        The server's default model for the role

      • usedstringrequired

        The model its work runs on now

    • support_summaryAiRoleModelrequired

      The Inbox's summaries of a conversation

      Show 3 properties
      • modelstring · nullablerequired

        The model the project picked (off: skipped), or null for the server's default

      • defaultstringrequired

        The server's default model for the role

      • usedstringrequired

        The model its work runs on now

    • changelogAiRoleModelrequired

      Drafting and rewriting changelog entries

      Show 3 properties
      • modelstring · nullablerequired

        The model the project picked (off: skipped), or null for the server's default

      • defaultstringrequired

        The server's default model for the role

      • usedstringrequired

        The model its work runs on now

    • code_changes_decideAiRoleModelrequired

      Autopilot deciding what a code change means for the docs, changelog and posts

      Show 3 properties
      • modelstring · nullablerequired

        The model the project picked (off: skipped), or null for the server's default

      • defaultstringrequired

        The server's default model for the role

      • usedstringrequired

        The model its work runs on now

    • code_changes_checkAiRoleModelrequired

      Autopilot checking its own work (off skips the checks)

      Show 3 properties
      • modelstring · nullablerequired

        The model the project picked (off: skipped), or null for the server's default

      • defaultstringrequired

        The server's default model for the role

      • usedstringrequired

        The model its work runs on now

    • code_changesAiRoleModelrequired

      Autopilot writing, and Verify

      Show 3 properties
      • modelstring · nullablerequired

        The model the project picked (off: skipped), or null for the server's default

      • defaultstringrequired

        The server's default model for the role

      • usedstringrequired

        The model its work runs on now

    • levelsobjectrequired

      Each group's level (answers, support, changelog, code_changes), which its roles run on

      Show 4 properties
      • answersAiGroupLevelrequired

        A group of roles' level

        Show 3 properties
        • levelstringrequired

          The level saved

          One of"affordable""balanced""best""custom"

        • usedstringrequired

          The level its work runs on: balanced when the plan doesn't include the saved one or the server no longer offers it

          One of"affordable""balanced""best""custom"

        • availablearray of stringrequired

          The levels this plan may pick on this server

          Each item one of"affordable""balanced""best""custom"

      • supportAiGroupLevelrequired

        A group of roles' level

        Show 3 properties
        • levelstringrequired

          The level saved

          One of"affordable""balanced""best""custom"

        • usedstringrequired

          The level its work runs on: balanced when the plan doesn't include the saved one or the server no longer offers it

          One of"affordable""balanced""best""custom"

        • availablearray of stringrequired

          The levels this plan may pick on this server

          Each item one of"affordable""balanced""best""custom"

      • changelogAiGroupLevelrequired

        A group of roles' level

        Show 3 properties
        • levelstringrequired

          The level saved

          One of"affordable""balanced""best""custom"

        • usedstringrequired

          The level its work runs on: balanced when the plan doesn't include the saved one or the server no longer offers it

          One of"affordable""balanced""best""custom"

        • availablearray of stringrequired

          The levels this plan may pick on this server

          Each item one of"affordable""balanced""best""custom"

      • code_changesAiGroupLevelrequired

        A group of roles' level

        Show 3 properties
        • levelstringrequired

          The level saved

          One of"affordable""balanced""best""custom"

        • usedstringrequired

          The level its work runs on: balanced when the plan doesn't include the saved one or the server no longer offers it

          One of"affordable""balanced""best""custom"

        • availablearray of stringrequired

          The levels this plan may pick on this server

          Each item one of"affordable""balanced""best""custom"

  • 400The request isn't valid: a field is missing, has the wrong type or is out of range, or the body isn't a JSON object. The message names the field.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 401No API key was sent, or it isn't valid: it was revoked, or whoever created it left the team.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 402The project's plan doesn't include this or is at its limit, it's out of AI credits, or a payment didn't go through. The message says what's needed.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 403It isn't allowed: the key is read-only, its creator isn't a project owner or admin where only they may, only a person can do it in the app, a setting is off, or someone's address isn't confirmed. The code says which.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 429Too many requests: past 600 a minute per key, try again after the seconds in the Retry-After header. Some operations have limits of their own (their description gives them), whose 429 has no Retry-After.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 500Something went wrong on Tuti's side. Try again in a moment.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 502A service Tuti uses failed (the AI model, Stripe, DNS or email). Try again in a moment.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

curl 'https://tuti.so/api/v1/ai-models' \
  --request PATCH \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "answers": "anthropic/claude-sonnet-5.5",
  "changelog": ""
}'
const response = await fetch("https://tuti.so/api/v1/ai-models", {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "answers": "anthropic/claude-sonnet-5.5",
    "changelog": ""
  }),
});
const text = await response.text();
import requests

response = requests.patch(
    "https://tuti.so/api/v1/ai-models",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    data="{\n  \"answers\": \"anthropic/claude-sonnet-5.5\",\n  \"changelog\": \"\"\n}",
)
print(response.text)
{
  "answers": {
    "model": null,
    "default": "anthropic/claude-sonnet-5.5",
    "used": "anthropic/claude-sonnet-5.5"
  },
  "escalations": {
    "model": null,
    "default": "anthropic/claude-sonnet-5.5",
    "used": "anthropic/claude-sonnet-5.5"
  },
  "support_draft": {
    "model": null,
    "default": "anthropic/claude-sonnet-5.5",
    "used": "anthropic/claude-sonnet-5.5"
  },
  "support_summary": {
    "model": null,
    "default": "anthropic/claude-sonnet-5.5",
    "used": "anthropic/claude-sonnet-5.5"
  },
  "changelog": {
    "model": null,
    "default": "anthropic/claude-sonnet-5.5",
    "used": "anthropic/claude-sonnet-5.5"
  },
  "code_changes_decide": {
    "model": null,
    "default": "anthropic/claude-sonnet-5.5",
    "used": "anthropic/claude-sonnet-5.5"
  },
  "code_changes_check": {
    "model": null,
    "default": "anthropic/claude-sonnet-5.5",
    "used": "anthropic/claude-sonnet-5.5"
  },
  "code_changes": {
    "model": null,
    "default": "anthropic/claude-sonnet-5.5",
    "used": "anthropic/claude-sonnet-5.5"
  },
  "levels": {
    "answers": {
      "level": "balanced",
      "used": "balanced",
      "available": [
        "affordable",
        "balanced",
        "best"
      ]
    },
    "support": {
      "level": "balanced",
      "used": "balanced",
      "available": [
        "affordable",
        "balanced",
        "best"
      ]
    },
    "changelog": {
      "level": "balanced",
      "used": "balanced",
      "available": [
        "affordable",
        "balanced",
        "best"
      ]
    },
    "code_changes": {
      "level": "balanced",
      "used": "balanced",
      "available": [
        "affordable",
        "balanced",
        "best"
      ]
    }
  }
}
{
  "error": {
    "code": "invalid_input",
    "message": "title: Title is too short"
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "This API key isn't valid or was revoked"
  }
}
{
  "error": {
    "code": "plan_required",
    "message": "A custom domain needs the Pro plan. See Settings → Billing."
  }
}
{
  "error": {
    "code": "forbidden",
    "message": "This key can only read. Create a read + write key to change things."
  }
}
{
  "error": {
    "code": "rate_limited",
    "message": "Up to 600 requests a minute per key"
  }
}
{
  "error": {
    "code": "internal_error",
    "message": "Something went wrong"
  }
}
{
  "error": {
    "code": "ai_failed",
    "message": "The AI couldn't write a draft. Try again in a moment."
  }
}