Change agent settings
October 16, 2026 (November 16, 2026)
Table of contents
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
API tokenis required, see Setup useapi.net for details.
Request Body
{
"email": "john@gmail.com",
"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 }
}
emailis required, the Google Flow account, see GET /accounts.projectIdis optional, a Flow project of the account, from GET /assets/projects/email.
Default: the account’s agent project.approvalis 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).instructionsis 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,falsekeeps 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 thereferenceIdof an image the agent made.id, optional, theidof an existing instruction from GET /agent/settings, to keep it. A new id is given otherwise.
imageDefaultsis 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, asmodels.imagein 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 modelmodels.imagelists for the account.aspectRatio, required. Supported values:16:9,9:16,1:1,4:3,3:4.count, optional, images per request. Range:1to4. Default:1.
videoDefaultsis 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, asmodels.videoin 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 modelmodels.videolists for the account.aspectRatio, required. Supported values:16:9,9:16.count, optional, videos per request. Range:1to4. 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
-
The project’s settings after the change, with the account’s
modelsas 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 } ] } } -
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 } -
Invalid API token.
{ "error": "useapi.net ⁝ Unauthorized", "code": 401 } -
The account is not added, or
projectIdis not a project of the account.{ "error": "Google Flow account john@gmail.com not found", "code": 404 }When
projectIdis not a project of the account:{ "error": "Project not found", "code": 404 } -
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/
emailand add it again by following Setup Google Flow.
Model
The same as GET /agent/settings: the project’s settings after the change.
The agent settings, field by field
{ // TypeScript, all fields are optional
projectId: string // the project the settings belong to, the account's agent project unless you sent projectId (created when the account had none)
approval: 'ask' | 'auto' // ask: the agent asks before it spends credits
instructions: { // up to 3
id: string // the instruction's id
title?: string // its title, when it has one
text: string // what the agent is told
enabled: boolean // true: the agent follows it in every chat of the project
references: string[] // media ids of the instruction's reference images
}[]
imageDefaults: {
model: string // the model's name as models.image lists it
aspectRatio: string // 16:9, 9:16, 1:1, 4:3 or 3:4
count: number // images per request, 1 to 4
} | null // null: never set
videoDefaults: { // the video model, aspect ratio and count the agent uses by default, null: never set
model: string // the model's name as models.video lists it
aspectRatio: string // 16:9 or 9:16
count: number // videos per request, 1 to 4
} | null
models: { // the models the account's Google plan has, null: Google's model list could not be read
image: { // image models
model: string // the name to use in imageDefaults
label: string // the name the Google Flow web app shows
credits?: number // lowest cost of one generation on the account's plan, 0 is free, absent when the plan is not known
}[]
video: { // video models
model: string // the name to use in videoDefaults
label: string // the name the Google Flow web app shows
credits?: number // lowest cost of one generation on the account's plan, 0 is free, absent when the plan is not known
}[]
} | null
}
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": "john@gmail.com", "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: 'john@gmail.com', 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': 'john@gmail.com', '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."}].