Documentation
ThankYou Open API — unified media generation through one developer-facing API
ThankYou provides official SDKs for TypeScript/JavaScript and Python, backed by a unified REST API for creative generation across image, video, and audio. Developers use one client or one submission endpoint, work with one generation resource, and use the same discovery model across every modality.
Quick Example
Install the SDK for your language:
npm install @thankyouai/sdkpip install thankyouaiimport { ThankYou } from "@thankyouai/sdk";
const thankyou = new ThankYou({
apiKey: process.env.THANKYOU_API_KEY!,
});
const result = await thankyou.run({
model: "google/nano-banana/pro/text-to-image",
input: {
prompt: "A mountain landscape at golden hour, photorealistic",
aspect_ratio: "16:9",
},
});
console.log(result.output[0]?.url);import { ThankYou } from "@thankyouai/sdk";
const thankyou = new ThankYou({
apiKey: process.env.THANKYOU_API_KEY,
});
const result = await thankyou.run({
model: "google/nano-banana/pro/text-to-image",
input: {
prompt: "A mountain landscape at golden hour, photorealistic",
aspect_ratio: "16:9",
},
});
console.log(result.output[0]?.url);import os
from thankyou import ThankYou
thankyou = ThankYou(api_key=os.environ["THANKYOU_API_KEY"])
result = await thankyou.run(
model="google/nano-banana/pro/text-to-image",
input={
"prompt": "A mountain landscape at golden hour, photorealistic",
"aspect_ratio": "16:9",
},
)
print(result.output[0]["url"])curl -X POST https://api.thankyouai.com/open/v1/generate \
-H "Authorization: Bearer tk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"model": "google/nano-banana/pro/text-to-image",
"input": {
"prompt": "A mountain landscape at golden hour, photorealistic",
"aspect_ratio": "16:9"
}
}'Core Shape
TypeScript SDK
Recommended client for JavaScript and TypeScript apps.
Python SDK
Official client for Python apps, published as thankyouai on PyPI.
One Submit Endpoint
POST /open/v1/generate is the single public entrypoint for new generations.
One Retrievable Resource
GET /open/v1/generations/{id} returns the full generation entity.
Quote Before Execute
POST /open/v1/generate/quote to preview cost, then execute with quote_id.
Model Discovery
GET /open/v1/models shows available models with input schemas.
How ThankYou Routes Work
- Use a canonical model id such as
google/nano-banana/pro/text-to-imagewhen you want direct model execution. - Use
GET /open/v1/models/detail?model_id=...to discover theinput_schemabefore hard-coding fields — all parameters go flat ininput.
Documentation Map
Quick Start
Get your first generation running in minutes.
TypeScript SDK
Install @thankyouai/sdk and use typed helpers.
Python SDK
Install thankyouai and use typed helpers.
Authentication
Create and manage API keys.
API Overview
Endpoints, lifecycle, request shape, and response envelope.
Request & Response
Shared headers, body fields, response fields, and idempotency.
Guides
Image Generation
Recommended image models, references, and response shapes.
Video Generation
Text-to-video and image-to-video through /generate.
Text to Speech
Audio generation using the same generation contract.
Agent Integration
Capability discovery, model selection, and tool generation for agents.