Content-based asset creation

Last updated Oct 13, 2025 Combining text-generation models with text-to-image models can lead to powerful AI systems capable of generating visual content based on input prompts. This integration can be achieved through a collaborative framework where a text-generation model generates prompts for the text-to-image model based on input text.

Here's how the process can work:

  • Input Text Processing: The input text is provided to the system, which can be anything from a simple sentence to multiple paragraphs. This text serves as the basis for generating visual content.
  • Prompt Generation: The text-generation model generates prompts based on the input text. These prompts are specifically crafted to guide the text-to-image model in generating images that are contextually relevant to the input text. The prompts can include descriptions, keywords, or other cues to guide the image generation process.
  • Content Moderation: Text-classification models can be employed to ensure that the generated assets comply with content policies
  • Text-to-Image Model: A text-to-image model takes the prompts generated by the text-generation model as input and produces corresponding images. The text-to-image model learns to translate textual descriptions into visual representations, aiming to capture the essence and context conveyed by the input text.

Example uses of such compositions of AI models can be employed to generation visual assets for marketing, publishing, presentations, and more.

Asset generation

Figure 1:Content-based asset generation

Figure 1: Content-based asset generation

  1. Client upload: Send POST request with content to API endpoint.
  2. Prompt generation: Generate prompt for later-stage text-to-image model by calling Workers AI text generation models with content as input.
  3. Safety check: Check for compliance with safety guidelines by calling Workers AI text classification models with the previously generated prompt as input.
  4. Image generation: Generate image by calling Workers AI text-to-image models previously generated prompt.

Was this helpful?

YesNo

On this page

Content-based asset creation - 图2Docs

{"@context":"https://schema.org","@type":"WebPage","@id":"https://developers.cloudflare.com/reference-architecture/diagrams/ai/ai-asset-creation/#page","headline":"Content-based asset creation","description":"AI systems combine text-generation and text-to-image models to create visual content from text. They generate prompts, moderate content, and produce images for various applications.","url":"https://developers.cloudflare.com/reference-architecture/diagrams/ai/ai-asset-creation/","inLanguage":"en","image":"https://developers.cloudflare.com/reference-architecture/diagrams/ai/ai-asset-creation/og.png?v=6f1e36d1dc1725da","dateModified":"2025-10-13","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"},"keywords":["AI"]}


description: The architecture diagram illustrates how AI applications can be built end-to-end on Cloudflare, or single services can be integrated with external infrastructure and services. title: Composable AI architecture image: https://developers.cloudflare.com/reference-architecture/diagrams/ai/ai-composable/og.png?v=b1f478fc573bee40


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/reference-architecture/llms.txt
Use this file to discover all available pages before exploring further.