SpyBara
Go Premium

Reference 2026-11-05 23:00 UTC to 2026-11-06 23:00 UTC

13 files changed +333 −23. View all changes and history on the product overview
2026
Wed 25 23:57 Tue 24 23:00 Sat 21 23:57 Fri 20 23:59 Thu 19 22:59 Wed 18 22:59 Tue 17 22:57 Mon 16 23:00 Fri 13 23:58 Thu 12 22:57 Wed 11 23:57 Tue 10 23:02 Mon 9 23:02 Sat 7 22:59 Fri 6 23:00 Thu 5 23:00 Wed 4 22:58 Tue 3 22:58
Details

1519 1519 

1520 `minItems: 0`, `maxItems: 2000`1520 `minItems: 0`, `maxItems: 2000`

1521 1521 

1522 - `prompt_cache_options: optional object { ttl } or null`

1523 

1524 Default prompt cache lifetime for turns in this session, when configured.

1525 

1526 - `ttl: "30m" or "12h"`

1527 

1528 - `"30m"`

1529 

1530 - `"12h"`

1531 

1522 - `review: optional "none" or "auto_review"`1532 - `review: optional "none" or "auto_review"`

1523 1533 

1524 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.1534 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.


1546 "type": "agent.session.created",1556 "type": "agent.session.created",

1547 "event_id": "event_id",1557 "event_id": "event_id",

1548 "session": {1558 "session": {

1559 "prompt_cache_options": {

1560 "ttl": "30m"

1561 },

1549 "review": "none",1562 "review": "none",

1550 "metadata": {1563 "metadata": {

1551 "foo": "string"1564 "foo": "string"


1900 1913 

1901 `format: int64`1914 `format: int64`

1902 1915 

1916 - `prompt_cache_options: optional object { ttl } or null`

1917 

1918 Prompt cache lifetime selected when this turn started, including an inherited session TTL. Null when the turn used the model default or no TTL was recorded.

1919 

1920 - `ttl: "30m" or "12h"`

1921 

1922 - `"30m"`

1923 

1924 - `"12h"`

1925 

1903- `turn_id: string`1926- `turn_id: string`

1904 1927 

1905 The ID of the turn associated with the event.1928 The ID of the turn associated with the event.


1927 "session_id": "session_id",1950 "session_id": "session_id",

1928 "turn_id": "turn_id",1951 "turn_id": "turn_id",

1929 "turn": {1952 "turn": {

1953 "prompt_cache_options": {

1954 "ttl": "30m"

1955 },

1930 "id": "id",1956 "id": "id",

1931 "object": "agent.session.turn",1957 "object": "agent.session.turn",

1932 "session_id": "session_id",1958 "session_id": "session_id",


2210 2236 

2211 `format: int64`2237 `format: int64`

2212 2238 

2239 - `prompt_cache_options: optional object { ttl } or null`

2240 

2241 Prompt cache lifetime selected when this turn started, including an inherited session TTL. Null when the turn used the model default or no TTL was recorded.

2242 

2243 - `ttl: "30m" or "12h"`

2244 

2245 - `"30m"`

2246 

2247 - `"12h"`

2248 

2213- `turn_id: string`2249- `turn_id: string`

2214 2250 

2215 The ID of the turn associated with the event.2251 The ID of the turn associated with the event.


2237 "session_id": "session_id",2273 "session_id": "session_id",

2238 "turn_id": "turn_id",2274 "turn_id": "turn_id",

2239 "turn": {2275 "turn": {

2276 "prompt_cache_options": {

2277 "ttl": "30m"

2278 },

2240 "id": "id",2279 "id": "id",

2241 "object": "agent.session.turn",2280 "object": "agent.session.turn",

2242 "session_id": "session_id",2281 "session_id": "session_id",


2520 2559 

2521 `format: int64`2560 `format: int64`

2522 2561 

2562 - `prompt_cache_options: optional object { ttl } or null`

2563 

2564 Prompt cache lifetime selected when this turn started, including an inherited session TTL. Null when the turn used the model default or no TTL was recorded.

2565 

2566 - `ttl: "30m" or "12h"`

2567 

2568 - `"30m"`

2569 

2570 - `"12h"`

2571 

2523- `turn_id: string`2572- `turn_id: string`

2524 2573 

2525 The ID of the turn associated with the event.2574 The ID of the turn associated with the event.


2551 "session_id": "session_id",2600 "session_id": "session_id",

2552 "turn_id": "turn_id",2601 "turn_id": "turn_id",

2553 "turn": {2602 "turn": {

2603 "prompt_cache_options": {

2604 "ttl": "30m"

2605 },

2554 "id": "id",2606 "id": "id",

2555 "object": "agent.session.turn",2607 "object": "agent.session.turn",

2556 "session_id": "session_id",2608 "session_id": "session_id",


2845 2897 

2846 `format: int64`2898 `format: int64`

2847 2899 

2900 - `prompt_cache_options: optional object { ttl } or null`

2901 

2902 Prompt cache lifetime selected when this turn started, including an inherited session TTL. Null when the turn used the model default or no TTL was recorded.

2903 

2904 - `ttl: "30m" or "12h"`

2905 

2906 - `"30m"`

2907 

2908 - `"12h"`

2909 

2848- `turn_id: string`2910- `turn_id: string`

2849 2911 

2850 The ID of the turn associated with the event.2912 The ID of the turn associated with the event.


2876 "session_id": "session_id",2938 "session_id": "session_id",

2877 "turn_id": "turn_id",2939 "turn_id": "turn_id",

2878 "turn": {2940 "turn": {

2941 "prompt_cache_options": {

2942 "ttl": "30m"

2943 },

2879 "id": "id",2944 "id": "id",

2880 "object": "agent.session.turn",2945 "object": "agent.session.turn",

2881 "session_id": "session_id",2946 "session_id": "session_id",


3170 3235 

3171 `format: int64`3236 `format: int64`

3172 3237 

3238 - `prompt_cache_options: optional object { ttl } or null`

3239 

3240 Prompt cache lifetime selected when this turn started, including an inherited session TTL. Null when the turn used the model default or no TTL was recorded.

3241 

3242 - `ttl: "30m" or "12h"`

3243 

3244 - `"30m"`

3245 

3246 - `"12h"`

3247 

3173- `turn_id: string`3248- `turn_id: string`

3174 3249 

3175 The ID of the turn associated with the event.3250 The ID of the turn associated with the event.


3201 "session_id": "session_id",3276 "session_id": "session_id",

3202 "turn_id": "turn_id",3277 "turn_id": "turn_id",

3203 "turn": {3278 "turn": {

3279 "prompt_cache_options": {

3280 "ttl": "30m"

3281 },

3204 "id": "id",3282 "id": "id",

3205 "object": "agent.session.turn",3283 "object": "agent.session.turn",

3206 "session_id": "session_id",3284 "session_id": "session_id",


5338 5416 

5339 `minItems: 0`, `maxItems: 2000`5417 `minItems: 0`, `maxItems: 2000`

5340 5418 

5419 - `prompt_cache_options: optional object { ttl } or null`

5420 

5421 Default prompt cache lifetime for turns in this session, when configured.

5422 

5423 - `ttl: "30m" or "12h"`

5424 

5425 - `"30m"`

5426 

5427 - `"12h"`

5428 

5341 - `review: optional "none" or "auto_review"`5429 - `review: optional "none" or "auto_review"`

5342 5430 

5343 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.5431 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.


5365 "type": "agent.session.idle",5453 "type": "agent.session.idle",

5366 "event_id": "event_id",5454 "event_id": "event_id",

5367 "session": {5455 "session": {

5456 "prompt_cache_options": {

5457 "ttl": "30m"

5458 },

5368 "review": "none",5459 "review": "none",

5369 "metadata": {5460 "metadata": {

5370 "foo": "string"5461 "foo": "string"


6447 6538 

6448 `minItems: 0`, `maxItems: 2000`6539 `minItems: 0`, `maxItems: 2000`

6449 6540 

6541 - `prompt_cache_options: optional object { ttl } or null`

6542 

6543 Default prompt cache lifetime for turns in this session, when configured.

6544 

6545 - `ttl: "30m" or "12h"`

6546 

6547 - `"30m"`

6548 

6549 - `"12h"`

6550 

6450 - `review: optional "none" or "auto_review"`6551 - `review: optional "none" or "auto_review"`

6451 6552 

6452 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.6553 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.


6474 "type": "agent.session.in_progress",6575 "type": "agent.session.in_progress",

6475 "event_id": "event_id",6576 "event_id": "event_id",

6476 "session": {6577 "session": {

6578 "prompt_cache_options": {

6579 "ttl": "30m"

6580 },

6477 "review": "none",6581 "review": "none",

6478 "metadata": {6582 "metadata": {

6479 "foo": "string"6583 "foo": "string"


7556 7660 

7557 `minItems: 0`, `maxItems: 2000`7661 `minItems: 0`, `maxItems: 2000`

7558 7662 

7663 - `prompt_cache_options: optional object { ttl } or null`

7664 

7665 Default prompt cache lifetime for turns in this session, when configured.

7666 

7667 - `ttl: "30m" or "12h"`

7668 

7669 - `"30m"`

7670 

7671 - `"12h"`

7672 

7559 - `review: optional "none" or "auto_review"`7673 - `review: optional "none" or "auto_review"`

7560 7674 

7561 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.7675 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.


7583 "type": "agent.session.requires_action",7697 "type": "agent.session.requires_action",

7584 "event_id": "event_id",7698 "event_id": "event_id",

7585 "session": {7699 "session": {

7700 "prompt_cache_options": {

7701 "ttl": "30m"

7702 },

7586 "review": "none",7703 "review": "none",

7587 "metadata": {7704 "metadata": {

7588 "foo": "string"7705 "foo": "string"


8665 8782 

8666 `minItems: 0`, `maxItems: 2000`8783 `minItems: 0`, `maxItems: 2000`

8667 8784 

8785 - `prompt_cache_options: optional object { ttl } or null`

8786 

8787 Default prompt cache lifetime for turns in this session, when configured.

8788 

8789 - `ttl: "30m" or "12h"`

8790 

8791 - `"30m"`

8792 

8793 - `"12h"`

8794 

8668 - `review: optional "none" or "auto_review"`8795 - `review: optional "none" or "auto_review"`

8669 8796 

8670 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.8797 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.


8692 "type": "agent.session.failed",8819 "type": "agent.session.failed",

8693 "event_id": "event_id",8820 "event_id": "event_id",

8694 "session": {8821 "session": {

8822 "prompt_cache_options": {

8823 "ttl": "30m"

8824 },

8695 "review": "none",8825 "review": "none",

8696 "metadata": {8826 "metadata": {

8697 "foo": "string"8827 "foo": "string"

Details

824 824 

825 Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters. Omission or null defaults to an empty map.825 Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters. Omission or null defaults to an empty map.

826 826 

827- `prompt_cache_options: optional object { ttl } or null`

828 

829 Default prompt cache lifetime for turns in this session. Omit to use the model default.

830 

831 - `ttl: optional "30m" or "12h" (default: "30m")`

832 

833 Minimum lifetime for new prompt cache entries. Defaults to 30 minutes.

834 

835 - `"30m"`

836 

837 - `"12h"`

838 

827- `review: optional "none" or "auto_review"`839- `review: optional "none" or "auto_review"`

828 840 

829 Action review mode. Omit to use none.841 Action review mode. Omit to use none.


856 868 

857### Returns869### Returns

858 870 

859- `AgentSession object { id, agent, created_at, 10 more }`871- `AgentSession object { id, agent, created_at, 11 more }`

860 872 

861 A Managed Agents session.873 A Managed Agents session.

862 874 


1822 1834 

1823 `minItems: 0`, `maxItems: 2000`1835 `minItems: 0`, `maxItems: 2000`

1824 1836 

1837 - `prompt_cache_options: optional object { ttl } or null`

1838 

1839 Default prompt cache lifetime for turns in this session, when configured.

1840 

1841 - `ttl: "30m" or "12h"`

1842 

1843 - `"30m"`

1844 

1845 - `"12h"`

1846 

1825 - `review: optional "none" or "auto_review"`1847 - `review: optional "none" or "auto_review"`

1826 1848 

1827 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.1849 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.


1942 "vault_ids": [1964 "vault_ids": [

1943 "string"1965 "string"

1944 ],1966 ],

1967 "prompt_cache_options": {

1968 "ttl": "30m"

1969 },

1945 "review": "none"1970 "review": "none"

1946}1971}

1947```1972```

Details

1012 1012 

1013 `minItems: 0`, `maxItems: 2000`1013 `minItems: 0`, `maxItems: 2000`

1014 1014 

1015 - `prompt_cache_options: optional object { ttl } or null`

1016 

1017 Default prompt cache lifetime for turns in this session, when configured.

1018 

1019 - `ttl: "30m" or "12h"`

1020 

1021 - `"30m"`

1022 

1023 - `"12h"`

1024 

1015 - `review: optional "none" or "auto_review"`1025 - `review: optional "none" or "auto_review"`

1016 1026 

1017 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.1027 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.


1150 "vault_ids": [1160 "vault_ids": [

1151 "string"1161 "string"

1152 ],1162 ],

1163 "prompt_cache_options": {

1164 "ttl": "30m"

1165 },

1153 "review": "none"1166 "review": "none"

1154 }1167 }

1155 ],1168 ],

Details

16 16 

17### Returns17### Returns

18 18 

19- `AgentSession object { id, agent, created_at, 10 more }`19- `AgentSession object { id, agent, created_at, 11 more }`

20 20 

21 A Managed Agents session.21 A Managed Agents session.

22 22 


982 982 

983 `minItems: 0`, `maxItems: 2000`983 `minItems: 0`, `maxItems: 2000`

984 984 

985 - `prompt_cache_options: optional object { ttl } or null`

986 

987 Default prompt cache lifetime for turns in this session, when configured.

988 

989 - `ttl: "30m" or "12h"`

990 

991 - `"30m"`

992 

993 - `"12h"`

994 

985 - `review: optional "none" or "auto_review"`995 - `review: optional "none" or "auto_review"`

986 996 

987 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.997 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.


1096 "vault_ids": [1106 "vault_ids": [

1097 "string"1107 "string"

1098 ],1108 ],

1109 "prompt_cache_options": {

1110 "ttl": "30m"

1111 },

1099 "review": "none"1112 "review": "none"

1100}1113}

1101```1114```

Details

4 4 

5**post** `/agents/sessions/{session_id}`5**post** `/agents/sessions/{session_id}`

6 6 

7Updates session tools, metadata, model, reasoning effort, or service tier. Model settings apply to subsequent turns. Omitted fields are unchanged. See [managing sessions](/api/docs/guides/agents-api/sessions/manage).7Updates session tools, metadata, model, reasoning effort, service tier, or the default prompt cache lifetime. Model settings apply to subsequent turns. Omitted fields are unchanged. See [managing sessions](/api/docs/guides/agents-api/sessions/manage).

8 8 

9### Path Parameters9### Path Parameters

10 10 


356 356 

357 Replaces all metadata. Omit to leave unchanged, or pass null or {} to clear it. Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters.357 Replaces all metadata. Omit to leave unchanged, or pass null or {} to clear it. Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters.

358 358 

359- `prompt_cache_options: optional object { ttl } or null`

360 

361 Default prompt cache lifetime for future turns. Send null to clear the session default.

362 

363 - `ttl: optional "30m" or "12h" (default: "30m")`

364 

365 Minimum lifetime for new prompt cache entries. Defaults to 30 minutes.

366 

367 - `"30m"`

368 

369 - `"12h"`

370 

359- `review: optional "none" or "auto_review"`371- `review: optional "none" or "auto_review"`

360 372 

361 Default action review for new root turns. Existing turns and their subagents keep their review mode.373 Default action review for new root turns. Existing turns and their subagents keep their review mode.


370 382 

371### Returns383### Returns

372 384 

373- `AgentSession object { id, agent, created_at, 10 more }`385- `AgentSession object { id, agent, created_at, 11 more }`

374 386 

375 A Managed Agents session.387 A Managed Agents session.

376 388 


1336 1348 

1337 `minItems: 0`, `maxItems: 2000`1349 `minItems: 0`, `maxItems: 2000`

1338 1350 

1351 - `prompt_cache_options: optional object { ttl } or null`

1352 

1353 Default prompt cache lifetime for turns in this session, when configured.

1354 

1355 - `ttl: "30m" or "12h"`

1356 

1357 - `"30m"`

1358 

1359 - `"12h"`

1360 

1339 - `review: optional "none" or "auto_review"`1361 - `review: optional "none" or "auto_review"`

1340 1362 

1341 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.1363 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.


1451 "vault_ids": [1473 "vault_ids": [

1452 "string"1474 "string"

1453 ],1475 ],

1476 "prompt_cache_options": {

1477 "ttl": "30m"

1478 },

1454 "review": "none"1479 "review": "none"

1455}1480}

1456```1481```

Details

1336 1336 

1337 `minItems: 0`, `maxItems: 2000`1337 `minItems: 0`, `maxItems: 2000`

1338 1338 

1339 - `prompt_cache_options: optional object { ttl } or null`

1340 

1341 Default prompt cache lifetime for turns in this session, when configured.

1342 

1343 - `ttl: "30m" or "12h"`

1344 

1345 - `"30m"`

1346 

1347 - `"12h"`

1348 

1339 - `review: optional "none" or "auto_review"`1349 - `review: optional "none" or "auto_review"`

1340 1350 

1341 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.1351 Review applied to eligible actions in this session. Omitted when review is none and automatic review is not enabled. Omission means none.


1566 1576 

1567 Best-effort token usage for the turn, or null if unknown. Recorded usage may change.1577 Best-effort token usage for the turn, or null if unknown. Recorded usage may change.

1568 1578 

1579 - `prompt_cache_options: optional object { ttl } or null`

1580 

1581 Prompt cache lifetime selected when this turn started, including an inherited session TTL. Null when the turn used the model default or no TTL was recorded.

1582 

1583 - `ttl: "30m" or "12h"`

1584 

1585 - `"30m"`

1586 

1587 - `"12h"`

1588 

1569 - `turn_id: string`1589 - `turn_id: string`

1570 1590 

1571 The ID of the turn associated with the event.1591 The ID of the turn associated with the event.

Details

282 282 

283 `format: int64`283 `format: int64`

284 284 

285 - `prompt_cache_options: optional object { ttl } or null`

286 

287 Prompt cache lifetime selected when this turn started, including an inherited session TTL. Null when the turn used the model default or no TTL was recorded.

288 

289 - `ttl: "30m" or "12h"`

290 

291 - `"30m"`

292 

293 - `"12h"`

294 

285- `first_id: string or null`295- `first_id: string or null`

286 296 

287 The ID of the first resource in `data`, or `null` if the page is empty.297 The ID of the first resource in `data`, or `null` if the page is empty.


341 "reasoning_tokens": 0351 "reasoning_tokens": 0

342 },352 },

343 "total_tokens": 0353 "total_tokens": 0

354 },

355 "prompt_cache_options": {

356 "ttl": "30m"

344 }357 }

345 }358 }

346 ],359 ],

Details

28 28 

29### Returns29### Returns

30 30 

31- `Turn object { id, agent_id, completed_at, 8 more }`31- `Turn object { id, agent_id, completed_at, 9 more }`

32 32 

33 The canonical public representation of a session turn.33 The canonical public representation of a session turn.

34 34 


260 260 

261 `format: int64`261 `format: int64`

262 262 

263 - `prompt_cache_options: optional object { ttl } or null`

264 

265 Prompt cache lifetime selected when this turn started, including an inherited session TTL. Null when the turn used the model default or no TTL was recorded.

266 

267 - `ttl: "30m" or "12h"`

268 

269 - `"30m"`

270 

271 - `"12h"`

272 

263### Example273### Example

264 274 

265```http275```http


295 "reasoning_tokens": 0305 "reasoning_tokens": 0

296 },306 },

297 "total_tokens": 0307 "total_tokens": 0

308 },

309 "prompt_cache_options": {

310 "ttl": "30m"

298 }311 }

299}312}

300```313```

Details

276 276 

277 `format: int64`277 `format: int64`

278 278 

279 - `prompt_cache_options: optional object { ttl } or null`

280 

281 Prompt cache lifetime selected when this turn started, including an inherited session TTL. Null when the turn used the model default or no TTL was recorded.

282 

283 - `ttl: "30m" or "12h"`

284 

285 - `"30m"`

286 

287 - `"12h"`

288 

279- `first_id: string or null`289- `first_id: string or null`

280 290 

281 The ID of the first resource in `data`, or `null` if the page is empty.291 The ID of the first resource in `data`, or `null` if the page is empty.


335 "reasoning_tokens": 0345 "reasoning_tokens": 0

336 },346 },

337 "total_tokens": 0347 "total_tokens": 0

348 },

349 "prompt_cache_options": {

350 "ttl": "30m"

338 }351 }

339 }352 }

340 ],353 ],

Details

22 22 

23### Returns23### Returns

24 24 

25- `Turn object { id, agent_id, completed_at, 8 more }`25- `Turn object { id, agent_id, completed_at, 9 more }`

26 26 

27 The canonical public representation of a session turn.27 The canonical public representation of a session turn.

28 28 


254 254 

255 `format: int64`255 `format: int64`

256 256 

257 - `prompt_cache_options: optional object { ttl } or null`

258 

259 Prompt cache lifetime selected when this turn started, including an inherited session TTL. Null when the turn used the model default or no TTL was recorded.

260 

261 - `ttl: "30m" or "12h"`

262 

263 - `"30m"`

264 

265 - `"12h"`

266 

257### Example267### Example

258 268 

259```http269```http


289 "reasoning_tokens": 0299 "reasoning_tokens": 0

290 },300 },

291 "total_tokens": 0301 "total_tokens": 0

302 },

303 "prompt_cache_options": {

304 "ttl": "30m"

292 }305 }

293}306}

294```307```

Details

118 118 

119 - `output_format: optional "png" or "webp" or "jpeg" or 2 more`119 - `output_format: optional "png" or "webp" or "jpeg" or 2 more`

120 120 

121 The output format of the generated image.121 The output format of the generated or edited image.

122 122 

123 - `"png"`123 - `"png"`

124 124 


166 166 

167 - `svg_usage: optional object { input_tokens, model, output_tokens, 2 more }`167 - `svg_usage: optional object { input_tokens, model, output_tokens, 2 more }`

168 168 

169 Token usage for the model that authored the SVG, separate from image rendering usage.169 Token usage for SVG authoring, separate from image rendering usage.

170 170 

171 - `input_tokens: integer`171 - `input_tokens: integer`

172 172 


180 180 

181 - `usage: optional object { input_tokens, input_tokens_details, output_tokens, 2 more }`181 - `usage: optional object { input_tokens, input_tokens_details, output_tokens, 2 more }`

182 182 

183 For `gpt-image-1` only, the token usage information for the image generation.183 Token usage information for image generation with GPT Image models.

184 184 

185 - `input_tokens: integer`185 - `input_tokens: integer`

186 186 

Details

170 170 

171 `minimum: 0`, `maximum: 100`171 `minimum: 0`, `maximum: 100`

172 172 

173- `output_format: optional "png" or "jpeg" or "webp" or "gif" or null (default: "png")`173- `output_format: optional "png" or "webp" or "jpeg" or 2 more or null (default: "png")`

174 174 

175 Output image format. Supported for GPT image models.175 Output image format. Supported for GPT image models. SVG output requires a supported image model and project access.

176 176 

177 - `"png"`177 - `"png"`

178 178 

179 - `"jpeg"`

180 

181 - `"webp"`179 - `"webp"`

182 180 

181 - `"jpeg"`

182 

183 - `"gif"`183 - `"gif"`

184 184 

185 - `"svg"`

186 

185- `partial_images: optional integer or null (default: 0)`187- `partial_images: optional integer or null (default: 0)`

186 188 

187 The number of partial images to generate. This parameter is used for189 The number of partial images to generate. This parameter is used for


239 241 

240 Stream partial image results as events.242 Stream partial image results as events.

241 243 

244- `svg: optional object { model, reasoning } or null`

245 

246 Selects the author model and reasoning effort for `output_format=svg`. Supply `svg.model` when SVG model selection is enabled. Otherwise, omit this object. SVG output requires `n=1` and cannot use streaming, partial images, or output compression.

247 

248 - `model: optional string`

249 

250 `minLength: 1`

251 

252 - `reasoning: optional object { effort } or null`

253 

254 Reasoning effort for SVG authoring. When omitted, uses the author model's default in both Images and Responses.

255 

256 - `effort: optional "none" or "minimal" or "low" or 4 more`

257 

258 Controls how much effort the model should spend on reasoning for this request.

259 

260 - `"none"`

261 

262 - `"minimal"`

263 

264 - `"low"`

265 

266 - `"medium"`

267 

268 - `"high"`

269 

270 - `"xhigh"`

271 

272 - `"max"`

273 

242- `user: optional string`274- `user: optional string`

243 275 

244 Deprecated: use `safety_identifier` instead. This parameter remains accepted for backward compatibility and is used when `safety_identifier` is omitted, null, or empty. [Learn more](/api/docs/guides/safety-best-practices#implement-safety-identifiers).276 Deprecated: use `safety_identifier` instead. This parameter remains accepted for backward compatibility and is used when `safety_identifier` is omitted, null, or empty. [Learn more](/api/docs/guides/safety-best-practices#implement-safety-identifiers).


283 315 

284 - `output_format: optional "png" or "webp" or "jpeg" or 2 more`316 - `output_format: optional "png" or "webp" or "jpeg" or 2 more`

285 317 

286 The output format of the generated image.318 The output format of the generated or edited image.

287 319 

288 - `"png"`320 - `"png"`

289 321 


331 363 

332 - `svg_usage: optional object { input_tokens, model, output_tokens, 2 more }`364 - `svg_usage: optional object { input_tokens, model, output_tokens, 2 more }`

333 365 

334 Token usage for the model that authored the SVG, separate from image rendering usage.366 Token usage for SVG authoring, separate from image rendering usage.

335 367 

336 - `input_tokens: integer`368 - `input_tokens: integer`

337 369 


345 377 

346 - `usage: optional object { input_tokens, input_tokens_details, output_tokens, 2 more }`378 - `usage: optional object { input_tokens, input_tokens_details, output_tokens, 2 more }`

347 379 

348 For `gpt-image-1` only, the token usage information for the image generation.380 Token usage information for image generation with GPT Image models.

349 381 

350 - `input_tokens: integer`382 - `input_tokens: integer`

351 383 

Details

117 117 

118 The compression level (0-100%) for the generated images. This parameter is only supported for the GPT image models with the `webp` or `jpeg` output formats, and defaults to 100.118 The compression level (0-100%) for the generated images. This parameter is only supported for the GPT image models with the `webp` or `jpeg` output formats, and defaults to 100.

119 119 

120- `output_format: optional "png" or "jpeg" or "webp" or 2 more or null (default: "png")`120- `output_format: optional "png" or "webp" or "jpeg" or 2 more or null (default: "png")`

121 121 

122 The format in which the generated images are returned. This parameter is only supported for the GPT image models.122 The format in which the generated images are returned. This parameter is only supported for the GPT image models.

123 123 

124 - `"png"`124 - `"png"`

125 125 

126 - `"jpeg"`

127 

128 - `"webp"`126 - `"webp"`

129 127 

128 - `"jpeg"`

129 

130 - `"gif"`130 - `"gif"`

131 131 

132 - `"svg"`132 - `"svg"`


224 224 

225- `svg: optional object { model, reasoning } or null`225- `svg: optional object { model, reasoning } or null`

226 226 

227 Selects the model and reasoning effort used to author SVG output. Requires output_format=svg and access to SVG model selection. When model selection is enabled, supply svg.model. When model selection is disabled, omit this object. The top-level model selects the image model that creates the reference image. SVG generation requires n=1 and does not support streaming, partial images, prompt_rewriter, or output_compression. SVG edits are not supported.227 Selects the model and reasoning effort used to author SVG output. Requires output_format=svg and access to SVG model selection. When model selection is enabled, supply svg.model. When model selection is disabled, omit this object. The top-level model selects the image model that creates the reference image. SVG generation requires n=1 and does not support streaming, partial images, prompt_rewriter, or output_compression.

228 228 

229 - `model: string`229 - `model: string`

230 230 


298 298 

299 - `output_format: optional "png" or "webp" or "jpeg" or 2 more`299 - `output_format: optional "png" or "webp" or "jpeg" or 2 more`

300 300 

301 The output format of the generated image.301 The output format of the generated or edited image.

302 302 

303 - `"png"`303 - `"png"`

304 304 


346 346 

347 - `svg_usage: optional object { input_tokens, model, output_tokens, 2 more }`347 - `svg_usage: optional object { input_tokens, model, output_tokens, 2 more }`

348 348 

349 Token usage for the model that authored the SVG, separate from image rendering usage.349 Token usage for SVG authoring, separate from image rendering usage.

350 350 

351 - `input_tokens: integer`351 - `input_tokens: integer`

352 352 


360 360 

361 - `usage: optional object { input_tokens, input_tokens_details, output_tokens, 2 more }`361 - `usage: optional object { input_tokens, input_tokens_details, output_tokens, 2 more }`

362 362 

363 For `gpt-image-1` only, the token usage information for the image generation.363 Token usage information for image generation with GPT Image models.

364 364 

365 - `input_tokens: integer`365 - `input_tokens: integer`

366 366