---
name: xai-sdk-python
slug: xai-sdk-python
type: github
source_url: https://github.com/xai-org/xai-sdk-python
organization: xAI
organization_slug: xai
total_releases: 26
latest_version: v1.13.0
latest_date: 2026-05-16
last_updated: 2026-05-26
tracking_since: 2025-06-13
canonical: https://releases.sh/xai/xai-sdk-python
organization_url: https://releases.sh/xai
---

<Release version="v1.13.0" date="May 16, 2026" published="2026-05-16T18:00:46.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.13.0">
## What's Changed
* feat: add prepare_extension() for batch video extension by @double-di in https://github.com/xai-org/xai-sdk-python/pull/141


**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.12.2...v1.13.0
</Release>

<Release version="v1.12.2" date="May 7, 2026" published="2026-05-07T00:07:20.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.12.2">
## What's Changed
* Add none and medium reasoning effort levels by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/139
* Bump version from 1.12.1 to 1.12.2 by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/140


**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.12.1...v1.12.2
</Release>

<Release version="v1.12.1" date="April 30, 2026" published="2026-04-30T22:35:52.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.12.1">
## What's Changed
* Update the CHANGELOG with missing entries by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/135
* Add grok-4.3 to ChatModel by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/137
* Bump version from 1.12.0 to 1.12.1 by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/138


**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.12.0...v1.12.1
</Release>

<Release version="v1.12.0" date="April 29, 2026" published="2026-04-29T18:43:26.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.12.0">
## What's Changed
* docs: add video generation and extension documentation to README by @double-di in https://github.com/xai-org/xai-sdk-python/pull/127
* Add collection descriptions, field definition updates, and bytes chunking by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/130
* Add `expires_after` to file uploads, drop `team_id` from `File` by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/131
* Add `cost_usd` tracking, model migration, example fixes by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/132
* docs: update default API requests timeout from 15min(900s) to 27min(1620s) by @dcbert in https://github.com/xai-org/xai-sdk-python/pull/101
* Add `cost_usd` property to image and video responses by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/133
* Prepare to release v1.12.0 of the xAI Python SDK by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/134

## New Contributors
* @dcbert made their first contribution in https://github.com/xai-org/xai-sdk-python/pull/101

**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.11.0...v1.12.0
</Release>

<Release version="v1.11.0" date="March 27, 2026" published="2026-03-27T18:23:29.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.11.0">
## What's Changed
* Support inline file attachments by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/122
* Add url support for FileContent by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/123
* Bump version from 1.10.0 to 1.11.0 by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/124


**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.10.0...v1.11.0
</Release>

<Release version="v1.10.0" date="March 24, 2026" published="2026-03-24T17:25:18.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.10.0">
## What's Changed
* Add video extension API and reference_image_urls support by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/120
* Prepare to release v1.10.0 of the xAI Python SDK by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/121


**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.9.1...v1.10.0
</Release>

<Release version="v1.9.1" date="March 19, 2026" published="2026-03-19T22:58:07.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.9.1">
## What's Changed
* Update grok-4.20 and multi-agent model variants in ChatModel by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/117
* Bump version from 1.9.0 to 1.9.1 by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/118


**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.9.0...v1.9.1
</Release>

<Release version="v1.9.0" date="March 19, 2026" published="2026-03-19T01:02:11.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.9.0">
## What's Changed
* feat: add image/video batch support and input_file_id by @double-di in https://github.com/xai-org/xai-sdk-python/pull/112
* Fix unknown status handling in polling loops by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/113
* Use model type aliases in image and video method signatures by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/114
* Prepare to release v1.9.0 of the xAI Python SDK by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/116

## New Contributors
* @double-di made their first contribution in https://github.com/xai-org/xai-sdk-python/pull/112

**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.8.2...v1.9.0
</Release>

<Release version="v1.8.2" date="March 16, 2026" published="2026-03-16T18:07:49.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.8.2">
## What's Changed
* Handle video generation failure case by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/110
* Prepare to release v1.8.2 of the xAI Python SDK by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/111


**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.8.1...v1.8.2
</Release>

<Release version="v1.8.1" date="March 11, 2026" published="2026-03-11T03:05:41.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.8.1">
## What's Changed
* Update grok-4.20 beta and multi-agent model variants in ChatModel by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/107
* Bump version from 1.8.0 to 1.8.1 by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/109


**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.8.0...v1.8.1
</Release>

<Release version="v1.8.0" date="March 5, 2026" published="2026-03-05T06:51:09.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.8.0">
## What's Changed
* Add grok-imagine-image-pro to ImageGenerationModel by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/103
* Add agent_count parameter to chat API for multi-agent models by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/104
* Add grok-4.20 experimental beta and multi-agent model variants to ChatModel by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/105
* Bump version from 1.7.0 to 1.8.0 by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/106


**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.7.0...v1.8.0
</Release>

<Release version="v1.7.0" date="February 18, 2026" published="2026-02-18T20:53:56.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.7.0">
## What's Changed
* Deprecate `BaseImageResponse.prompt` after `up_sampled_prompt` proto removal by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/96
* Add 2K image resolution support by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/97
* Reduce default PollTimer poll interval and introduce default video polling settings by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/98
* Add support for multi-reference image editing with new `image_urls` parameter by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/99
* Prepare to release v1.7.0 of the xAI Python SDK by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/100


**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.6.1...v1.7.0
</Release>

<Release version="v1.6.1" date="January 29, 2026" published="2026-01-29T03:13:27.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.6.1">
## What's Changed
* Update changelog by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/90
* Add Imagine image/video API support by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/91
* Bump version from 1.6.0 to 1.6.1 by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/92


**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.6.0...v1.6.1
</Release>

<Release version="v1.6.0" date="January 27, 2026" published="2026-01-27T12:31:36.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.6.0">
## What's Changed
* Add user-location support for web-search tool by @mark-xai in https://github.com/xai-org/xai-sdk-python/pull/80
* Add `tool_call_id` field by @mark-xai in https://github.com/xai-org/xai-sdk-python/pull/81
* Add `developer` role by @mark-xai in https://github.com/xai-org/xai-sdk-python/pull/86
* Add batch API support (#46) by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/82
* Instrument Collections Methods by @aaditjuneja in https://github.com/xai-org/xai-sdk-python/pull/85
* Instrument File Methods by @aaditjuneja in https://github.com/xai-org/xai-sdk-python/pull/84
* Update Emitted Chat Spans to be compliant with OTEL `gen_ai` spec's changes by @aaditjuneja in https://github.com/xai-org/xai-sdk-python/pull/83
* Bump version from v1.5.0 -> v1.6.0 by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/89

## New Contributors
* @aaditjuneja made their first contribution in https://github.com/xai-org/xai-sdk-python/pull/85

**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.5.0...v1.6.0
</Release>

<Release version="v1.5.0" date="December 5, 2025" published="2025-12-05T03:27:54.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.5.0">
## What's Changed
* Add `end_index`, rename document search tools, and add `verbose_streaming` include option by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/71
* Add inline citations support to Chunk and Response classes by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/73
* Add new features to Collections API client by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/74
* Add util functions to retrieve server-side tool outputs by @mark-xai in https://github.com/xai-org/xai-sdk-python/pull/75
* Bump version from 1.4.1 to 1.5.0 by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/76


**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.4.1...v1.5.0
</Release>

<Release version="v1.4.1" date="November 26, 2025" published="2025-11-26T23:43:26.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.4.1">
## What's Changed
* Update changelog following the v.1.4.0 release by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/63
* Update the metadata sent on requests to also include the language by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/62
* Update proto definitions to include new tool call status field on tool calls by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/65
* Add max_turns parameter in chat creation for agentic conversations by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/67
* Support including tool output and inline citations by @mark-xai in https://github.com/xai-org/xai-sdk-python/pull/68
* Restructure the literals for chat API by @mark-xai in https://github.com/xai-org/xai-sdk-python/pull/69
* Bump version from 1.4.0 to 1.4.1 by @mark-xai in https://github.com/xai-org/xai-sdk-python/pull/70


**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.4.0...v1.4.1
</Release>

<Release version="v1.4.0" date="November 7, 2025" published="2025-11-07T23:55:23.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.4.0">
## What's Changed
* Add xai-sdk-version to the request metadata by @mark-xai in https://github.com/xai-org/xai-sdk-python/pull/41
* Remove double await in async interceptor by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/42
* Add context manager support and proper channel cleanup to clients by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/43
* Add ability to exclude sensitive attributes for traces by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/44
* Rename internal ChoiceChunk class to CompletionOutputChunk by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/45
* Add support for encrypted content in chat responses by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/47
* Add debug output support in chat responses by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/48
* Optimize streaming chat response memory usage with lazy buffering by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/46
* Add option to use an insecure gRPC channel in clients by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/49
* Support `ToolCallType` in `ToolCall` by @mark-xai in https://github.com/xai-org/xai-sdk-python/pull/50
* Add util function for retrieving tool-call-type by @mark-xai in https://github.com/xai-org/xai-sdk-python/pull/51
* Add remote MCP tool by @gyang-xai in https://github.com/xai-org/xai-sdk-python/pull/52
* Add SERVER_SIDE_TOOL_MCP and SERVER_SIDE_TOOL_COLLECTIONS_SEARCH to usage enum by @gyang-xai in https://github.com/xai-org/xai-sdk-python/pull/53
* Add proto changes and util function for collections-search  by @mark-xai in https://github.com/xai-org/xai-sdk-python/pull/54
* Set index correctly in `parse` method by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/55
* Append all output entries for agentic response by @mark-xai in https://github.com/xai-org/xai-sdk-python/pull/56
* Allow passing a Pydantic BaseModel to `response_format` directly in `chat.create` by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/57
* Implement Files API client SDK support by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/58
* Add new server-side tools examples by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/59
* Auto-detect server-side implicit tool additions in chat by @shawnthapa in https://github.com/xai-org/xai-sdk-python/pull/60
* Bump version from v1.3.1 -> v1.4.0 by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/61

## New Contributors
* @shawnthapa made their first contribution in https://github.com/xai-org/xai-sdk-python/pull/43
* @gyang-xai made their first contribution in https://github.com/xai-org/xai-sdk-python/pull/52

**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.3.1...v1.4.0
</Release>

<Release version="v1.3.1" date="October 17, 2025" published="2025-10-17T16:22:09.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.3.1">
## What's Changed
* Support multiple outputs in chunk and response of chat service by @mark-xai in https://github.com/xai-org/xai-sdk-python/pull/39
* Bump version from v1.3.0 -> v.1.3.1 by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/40

## New Contributors
* @mark-xai made their first contribution in https://github.com/xai-org/xai-sdk-python/pull/39

**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.3.0...v1.3.1
</Release>

<Release version="v1.3.0" date="October 15, 2025" published="2025-10-15T19:20:31.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.3.0">
## What's Changed
* Update changelog by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/31
* Add proto support for server side tools by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/32
* Bump version from v1.2.0 -> v1.3.0a0 by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/33
* Add convenience functions for using new server-side tools by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/35
* Updated response handling to use 'outputs' instead of 'choices' by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/37
* Bump version from v1.3.0a0 -> v1.3.0 by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/38


**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.2.0...v1.3.0
</Release>

<Release version="v1.3.0a0" date="September 29, 2025" published="2025-09-29T18:14:51.000Z" url="https://github.com/xai-org/xai-sdk-python/releases/tag/v1.3.0a0">
## What's Changed
* Update changelog by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/31
* Add proto support for server side tools by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/32
* Bump version from v1.2.0 -> v1.3.0a0 by @Omar-V2 in https://github.com/xai-org/xai-sdk-python/pull/33


**Full Changelog**: https://github.com/xai-org/xai-sdk-python/compare/v1.2.0...v1.3.0a0
</Release>

<Pagination cursor="2025-09-29T18:14:51.000Z|2026-05-26T12:24:32.726Z|rel_-nYUZZ0nj_PyhfG3L8CQg" next="https://releases.sh/xai/xai-sdk-python.md?cursor=2025-09-29T18%3A14%3A51.000Z%7C2026-05-26T12%3A24%3A32.726Z%7Crel_-nYUZZ0nj_PyhfG3L8CQg&limit=20" />
