> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hitheo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 图片、视频、代码、研究、文档

> 用于媒体生成与内容创作的 SDK 方法。

## 图片

```typescript theme={null}
const res = await theo.images({
  prompt: "A minimalist tech logo, blue and white",
  style: "photorealistic",
  aspect_ratio: "1:1",
  count: 2,
});

for (const img of res.images) {
  console.log(img.url, img.engine);
}
```

## 视频（异步）

视频生成是异步的。API 会返回一个任务 ID，供你轮询。

```typescript theme={null}
const job = await theo.video({
  prompt: "A 5-second animation of a rocket launch",
  duration: "5s",
  style: "cinematic",
});

// Poll until complete
const result = await theo.waitForJob(job.job_id);
console.log(result.result); // Video URL
```

## 代码

```typescript theme={null}
const res = await theo.code({
  prompt: "Write a TypeScript Express middleware for JWT auth",
  language: "typescript",
  framework: "express",
});

console.log(res.content);    // Generated code
console.log(res.artifacts);  // Any files created
```

## 研究（异步）

研究是异步的——它涉及网络搜索与信息源整合。

```typescript theme={null}
const job = await theo.research({
  prompt: "Compare React, Vue, and Svelte for enterprise apps in 2026",
  depth: "advanced",
  max_sources: 10,
});

const result = await theo.waitForJob(job.job_id, 3000, 120_000);
console.log(result.result); // Full research report with citations
```

## 文档

```typescript theme={null}
const res = await theo.documents({
  prompt: "Create a Q1 2026 sales report with executive summary",
  format: "pdf",  // or "docx", "pptx", "xlsx", "csv"
});

console.log(res.title);         // "Q1 2026 Sales Report"
console.log(res.download_url);  // Presigned S3 URL
console.log(res.content);       // Document text content
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.