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

# संरचित आउटपुट (AI SDK)

> Phaseo और Vercel AI SDK से schema-validated JSON objects बनाएँ।

Typed outputs के लिए `generateObject` उपयोग करें।

```ts theme={null}
import { phaseo } from "@phaseo/ai-sdk-provider";
import { generateObject } from "ai";
import { z } from "zod";

const { object } = await generateObject({
  model: phaseo("openai/gpt-5-nano"),
  schema: z.object({
    title: z.string(),
    priority: z.enum(["low", "medium", "high"]),
    actions: z.array(z.string()),
  }),
  prompt: "Create a short incident follow-up plan.",
});

console.log(object);
```

## नोट्स

* Schemas में explicit enums और required fields को प्राथमिकता दें।
* Prompts को schema structure के अनुरूप रखें।
* Caller code में parse/validation errors handle करें।


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