Skip to content
Niu DocsNiu 牛元文档
Dashboard控制台

GenerateContentResponse

Generated from the checked-in source. Do not edit this reference by hand.

SDK source. All SDK types.

TypeScript
export type GenerateContentResponse = {
candidates: Array<{
index: 0;
content: {
role: 'model';
parts: Array<{
text: string;
}>;
};
finishReason: 'STOP' | 'MAX_TOKENS';
}>;
modelVersion: string;
responseId?: string;
/** Missing categories remain null; usage is not a settlement receipt. */
usageMetadata: {
promptTokenCount: number | null;
candidatesTokenCount: number | null;
totalTokenCount: number | null;
cachedContentTokenCount: number | null;
thoughtsTokenCount: number | null;
};
};