> ## Documentation Index > Fetch the complete documentation index at: https://openrouter.ai/docs/llms.txt > Use this file to discover all available pages before exploring further. # Formats Text response format configuration ## Supported Types ### FormatTextConfig ```go theme={null} formats := components.CreateFormatsText(components.FormatTextConfig{/* values here */}) ``` ### FormatJSONObjectConfig ```go theme={null} formats := components.CreateFormatsJSONObject(components.FormatJSONObjectConfig{/* values here */}) ``` ### FormatJSONSchemaConfig ```go theme={null} formats := components.CreateFormatsJSONSchema(components.FormatJSONSchemaConfig{/* values here */}) ``` ## Union Discrimination Use the `Type` field to determine which variant is active, then access the corresponding field: ```go theme={null} switch formats.Type { case components.FormatsTypeText: // formats.FormatTextConfig is populated case components.FormatsTypeJSONObject: // formats.FormatJSONObjectConfig is populated case components.FormatsTypeJSONSchema: // formats.FormatJSONSchemaConfig is populated default: // Unknown type - use formats.GetUnknownRaw() for raw JSON } ```