Change agent settings

October 16, 2026 (November 6, 2026)

Table of contents

  1. Request Headers
  2. Request Body
  3. Responses
  4. Model
  5. Examples
  6. Try It

Change the agent settings of a Flow project. They apply to every chat in the project, including chats in the Flow web app. Send only what you want to change: the fields you leave out keep their values. The response is the project’s settings after the change, the same as GET /agent/settings.

Without projectId, this changes the account’s own agent project, the one POST /agent/chats uses by default. It is created if the account has none yet.

https://api.useapi.net/v1/google-flow/agent/settings

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
Request Body
{
  "email": "[email protected]",
  "approval": "ask",
  "instructions": [
    { "text": "Keep every answer short. Prefer free image models." },
    { "title": "Brand look", "text": "Use the colors of the attached logo.", "references": ["user:12345-email:6a6f...-image:6bb4a078-..."] }
  ],
  "imageDefaults": { "model": "nano-banana-2", "aspectRatio": "16:9", "count": 1 },
  "videoDefaults": { "model": "veo-3.1-fast", "aspectRatio": "16:9", "count": 1 }
}
  • email is required, the Google Flow account, see GET /accounts.
  • projectId is optional, a Flow project of the account, from GET /assets/projects/email.
    Default: the account’s agent project.
  • approval is optional, whether the agent asks before it spends credits.
    Supported values: ask (the agent stops and shows the cost, see POST /agent/chats/chatId/approval), auto (the agent spends without asking).
  • instructions is optional, the project’s standing instructions, which the agent follows in every chat of the project. The array replaces all of the project’s instructions, so send the full list each time. An empty array removes them all.
    Up to 3 instructions, each an object with:
    • text, required, 1 to 5000 characters.
    • title, optional, up to 200 characters.
    • enabled, optional, false keeps the instruction without the agent following it. Default: true.
    • references, optional, an array of images of the same account for the agent to use with this instruction: ids from POST /assets/email, images made by POST /images, or the referenceId of an image the agent made.
    • id, optional, the id of an existing instruction from GET /agent/settings, to keep it. A new id is given otherwise.
  • imageDefaults is optional, what the agent uses for images when a message does not say otherwise, an object with:
    • model, required, a model the account’s Google plan has, as models.image in GET /agent/settings lists it with its credits.
      Supported values: nano-banana-pro, nano-banana-2 (Nano Banana 2.1), nano-banana-2-lite, and any other model models.image lists for the account.
    • aspectRatio, required. Supported values: 16:9, 9:16, 1:1, 4:3, 3:4.
    • count, optional, images per request. Range: 1 to 4. Default: 1.
  • videoDefaults is optional, what the agent uses for videos when a message does not say otherwise, an object with:
    • model, required, a model the account’s Google plan has, as models.video in GET /agent/settings lists it with its credits.
      Supported values: omni-flash-1.2 (accounts Google has given Omni 1.2 Flash), omni-flash, veo-3.1-lite, veo-3.1-fast, veo-3.1-quality, veo-3.1-lite-low-priority (Ultra plans only), and any other model models.video lists for the account.
    • aspectRatio, required. Supported values: 16:9, 9:16.
    • count, optional, videos per request. Range: 1 to 4. Default: 1.

Send at least one of approval, instructions, imageDefaults or videoDefaults.

A model that Google adds to Flow before this API names it shows in models under Google’s own name, and that name works as model too. A model the account’s plan does not have answers 400 with the models it does have.

Responses
  • 200 OK

    The project’s settings after the change, with the account’s models as in GET /agent/settings.

    {
      "projectId": "f166200a-ea22-461a-bc68-47ff6d3ee500",
      "approval": "ask",
      "instructions": [
        {
          "id": "2157F442-D2DB-4C22-BC53-E4B14FA4D667",
          "text": "Keep every answer short. Prefer free image models.",
          "enabled": true,
          "references": []
        },
        {
          "id": "C4B70536-E836-431B-B86B-0E3816CCE6B9",
          "text": "A switched-off instruction.",
          "enabled": false,
          "references": []
        }
      ],
      "imageDefaults": { "model": "nano-banana-2", "aspectRatio": "16:9", "count": 1 },
      "videoDefaults": { "model": "veo-3.1-fast", "aspectRatio": "16:9", "count": 1 },
      "models": {
        "image": [
          { "model": "nano-banana-pro", "label": "Nano Banana Pro", "credits": 0 },
          { "model": "nano-banana-2-lite", "label": "Nano Banana 2 Lite", "credits": 0 },
          { "model": "nano-banana-2", "label": "Nano Banana 2.1", "credits": 0 }
        ],
        "video": [
          { "model": "omni-flash", "label": "Omni 1.1 Flash", "credits": 4 },
          { "model": "veo-3.1-lite", "label": "Veo 3.1 - Lite", "credits": 10 },
          { "model": "veo-3.1-fast", "label": "Veo 3.1 - Fast", "credits": 20 },
          { "model": "veo-3.1-quality", "label": "Veo 3.1 - Quality", "credits": 100 }
        ]
      }
    }
    
  • 400 Bad Request

    A parameter is missing or invalid, a reference belongs to another account, a default model is not on the account’s Google plan, or nothing to change was sent.

    {
      "error": "Nothing to change: give approval, instructions, imageDefaults or videoDefaults",
      "code": 400
    }
    

    When the account’s plan does not have the model:

    {
      "error": "Model veo-3.1-lite-low-priority is not available on this account's Google plan. Available: omni-flash, veo-3.1-lite, veo-3.1-fast, veo-3.1-quality",
      "code": 400
    }
    
  • 401 Unauthorized

    Invalid API token.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 404 Not Found

    The account is not added, or projectId is not a project of the account.

    {
      "error": "Google Flow account [email protected] not found",
      "code": 404
    }
    

    When projectId is not a project of the account:

    {
      "error": "Project not found",
      "code": 404
    }
    
  • 503 Service Unavailable

    Google Flow could not be reached, and nothing happened. Retry shortly.

    {
      "error": "Google Flow is not reachable right now and could not save the agent settings. Retry",
      "code": 503
    }
    
  • 596 Session Error

    The account’s Google session is no longer valid. Delete the account with DELETE /accounts/email and add it again by following Setup Google Flow.

Model

The same as GET /agent/settings.

Examples
  • curl -X PUT "https://api.useapi.net/v1/google-flow/agent/settings" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer YOUR_API_TOKEN" \
         -d '{
           "email": "[email protected]",
           "approval": "ask",
           "imageDefaults": { "model": "nano-banana-2", "aspectRatio": "16:9", "count": 1 }
         }'
    
  • const token = 'YOUR_API_TOKEN'
    const response = await fetch('https://api.useapi.net/v1/google-flow/agent/settings', {
      method: 'PUT',
      headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${token}`
      },
      body: JSON.stringify({
        email: '[email protected]',
        approval: 'ask',
        imageDefaults: { model: 'nano-banana-2', aspectRatio: '16:9', count: 1 }
      })
    })
    console.log(response.status, await response.json())
    
  • import requests
    token = 'YOUR_API_TOKEN'
    r = requests.put(
        'https://api.useapi.net/v1/google-flow/agent/settings',
        headers={'Authorization': f'Bearer {token}'},
        json={
            'email': '[email protected]',
            'approval': 'ask',
            'imageDefaults': {'model': 'nano-banana-2', 'aspectRatio': '16:9', 'count': 1},
        },
    )
    print(r.status_code, r.json())
    
Try It

instructions takes a JSON array, for example [{"text": "Keep every answer short."}].