> ## Documentation Index > Fetch the complete documentation index at: https://www.canva.dev/docs/apps/llms.txt > Use this file to discover all available pages before exploring further. # Generations The Canva REST APIs for generating designs and images. The generation APIs are currently provided as a preview. Be aware of the following: * There might be unannounced breaking changes. * Any breaking changes to preview APIs won't produce a new [API version](https://www.canva.dev/docs/apps/rest-apis/versions/). * Public apps that use preview APIs will not pass the review process, and can't be made available to all Canva users. The generation APIs let you generate content from a text prompt: * **Design generation:** Generate a Canva document or presentation. * **Image generation:** Generate an image. ## Design generation The `generations` endpoint lets you generate a Canva document or presentation from a text brief. ### Design generation APIs * [Create design generation job](https://www.canva.dev/docs/apps/rest-apis/reference/generations/create-design-generation-job/): Create an asynchronous job to generate a design. * [Get design generation job](https://www.canva.dev/docs/apps/rest-apis/reference/generations/get-design-generation-job/): Get the status and results of the generation job, including the generated design. ## Image generation The image generation APIs let you generate an image from a plain-text prompt. A successful job returns the generated image as a download URL that's valid for 24 hours. You can also save the image to the user's Canva account as an image asset, so it appears in their uploads. For how to generate your first image, see [Generate images with CRAFT](https://www.canva.dev/docs/apps/rest-apis/generate-images-with-craft/). A public or private app needs the `asset:write` scope, and the job uses the user's [AI credit allowance](https://www.canva.com/help/ai-access/). A service app needs the `service:asset:write` scope, and the job uses your team's [API credits](https://www.canva.dev/docs/apps/rest-apis/credit-rates/). ### Models You can choose the model that generates the image with the `model` parameter. If you don't set `model`, Canva selects the best available model for the request. | Model | Value | Status | | ------------- | --------------- | --------- | | CRAFT-1 2K | `craft_v1_2k` | Available | | Lucid Origin | `lucid_origin` | Available | | Z Image Turbo | `z_image_turbo` | Available | If you request a specific model, Canva never uses a different model to serve the request. If that model can't serve the request, the job fails with one of the following error codes: * `model_not_available`: The model can't serve the request right now. This is usually temporary. Try again later, try again without `model`, or use a different model. * `model_retired`: The model has been permanently retired from this version of the API. Use a different model. Any model can return `model_not_available` at any time, so your app must handle this error. A retired model keeps its `model` value for the lifetime of the API version, and its status in the table above changes to **Retired**. The model is then removed in the next API version. ### Results and retries * A completed job, and the download URL for its image, are available for 24 hours. Download the image or save it as an asset within that time. * If you retry a request with the same `idempotency_key`, you get the original job, even if that job failed. To start a new attempt, use a new key. * Canva checks both the prompt and the generated image for unsafe content. A prompt can be rejected when you create the job, or the job can fail with the `unsafe_input` error code. ### Image generation APIs * [Create image generation job](https://www.canva.dev/docs/apps/rest-apis/reference/generations/create-image-generation-job/): Create an asynchronous job to generate an image from a text prompt. * [Get image generation job](https://www.canva.dev/docs/apps/rest-apis/reference/generations/get-image-generation-job/): Get the status and results of an image generation job, including the generated image.