Resources
Official SDKs
Use official E2X SDK packages for TypeScript (@e2x/sdk), Python (e2x), and Go (github.com/e2xai/e2x-go) with zero-drift micro-cent accounting, adaptive polling, and HMAC verification.
Official Client Libraries
Visit the SDKs overview page or browse the unified E2XAI/e2x-sdks monorepo for release notes and issue tracking. Every SDK automatically reads E2X_API_KEY from your environment.
| Language | Package | Install Command | Links |
|---|---|---|---|
TypeScript & Node.js Node.js 18+, Bun, Deno, Edge Workers | @e2x/sdk | npm install @e2x/sdk | |
Python Python 3.9+ (Sync & AsyncIO, Pydantic v2) | e2x | pip install git+https://github.com/E2XAI/e2x-python.git | |
Go Go 1.21+ (Pure Standard Library) | github.com/e2xai/e2x-go | go get github.com/e2xai/e2x-go |
SDK Usage Across Runtimes
import { E2X } from '@e2x/sdk';
const client = new E2X(); // reads E2X_API_KEY
const job = await client.run('openai/gpt-image-2.6-sunburst/text-to-image', {
prompt: 'Editorial architectural concrete pavilion at dusk',
aspect_ratio: '16:9',
resolution: '1K',
}, {
onUpdate: (snap) => console.log(`Progress: ${snap.progress}%`),
});
console.log(job.output?.outputs?.[0]?.url);from e2x import E2X
client = E2X()
job = client.run(
"openai/gpt-image-2.6-sunburst/text-to-image",
{
"prompt": "Editorial architectural concrete pavilion at dusk",
"aspect_ratio": "16:9",
"resolution": "1K",
},
on_update=lambda j: print(f"Progress: {j.progress}%"),
)
print(job.output_urls[0])package main
import (
"context"
"fmt"
"github.com/e2xai/e2x-go"
)
func main() {
ctx := context.Background()
client, _ := e2x.New()
job, _ := client.Run(ctx, e2x.RunParams{
Model: "openai/gpt-image-2.6-sunburst/text-to-image",
Input: map[string]any{
"prompt": "Editorial architectural concrete pavilion at dusk",
"aspect_ratio": "16:9",
"resolution": "1K",
},
})
fmt.Println("Result:", job.OutputURL())
}SDK Architecture Guarantees
Every official SDK tracks both integer cost_micro_cents and cost_usd, performs adaptive 1s-burst to 2s-steady polling with Retry-After jitter backoff, and includes built-in constant-time HMAC-SHA256 webhook verification.