# Z Image Base > AI model for generating stable diffusion content ## Overview - **Model ID**: `z-image-base` - **Category**: stable diffusion - **Provider**: modelslab - **Status**: model_ready - **Screenshot**: `https://assets.modelslab.com/generations/0d8bf319-6684-4ffb-b7f3-b01aa191f1a3.png` ## API Information This model can be used via our HTTP API. See the API documentation and usage examples below. ### Endpoint - **URL**: `https://modelslab.com/api/v6/images/text2img` - **Method**: POST ### Parameters - **`prompt`** (required): Enter the text for the image you want to generate - Type: textarea - **`width`** (required): Max width supported is 1488 - Type: number (range: 512-1488) - **`height`** (required): Max height supported is 1488 - Type: number (range: 512-1488) - **`samples`** (required): Number of images that can be generated in a single request - Type: number (range: 1-2) ## Usage Examples ### cURL ```bash curl --request POST \ --url https://modelslab.com/api/v6/images/text2img \ --header "Content-Type: application/json" \ --data '{ "key": "YOUR_API_KEY", "model_id": "z-image-base", "prompt": "A highly detailed, ultra-realistic scene inside a modern McDonald’s restaurant. At the counter stands a friendly anthropomorphic creature resembling a furry monster or gentle beast. The creature has thick golden-brown fur, expressive round eyes, a wide flat nose, and a soft, friendly facial expression. It is wearing an official McDonald’s uniform: a dark grey short-sleeve button-up shirt with a red-and-yellow McDonald’s logo patch on the chest, dark trousers, and a navy-blue McDonald’s cap with the iconic yellow ‘M’. The creature has large, clawed hands covered in brown fur, and is handing over a classic McDonald’s brown takeaway bag with the yellow ‘M’ printed on it. ", "width": "1024", "height": "1024", "samples": "1" }' ``` ### Python ```python import requests response = requests.post( "https://modelslab.com/api/v6/images/text2img", headers={ "Content-Type": "application/json" }, json={ "key": "YOUR_API_KEY", "model_id": "z-image-base", "prompt": "A highly detailed, ultra-realistic scene inside a modern McDonald’s restaurant. At the counter stands a friendly anthropomorphic creature resembling a furry monster or gentle beast. The creature has thick golden-brown fur, expressive round eyes, a wide flat nose, and a soft, friendly facial expression. It is wearing an official McDonald’s uniform: a dark grey short-sleeve button-up shirt with a red-and-yellow McDonald’s logo patch on the chest, dark trousers, and a navy-blue McDonald’s cap with the iconic yellow ‘M’. The creature has large, clawed hands covered in brown fur, and is handing over a classic McDonald’s brown takeaway bag with the yellow ‘M’ printed on it. ", "width": "1024", "height": "1024", "samples": "1" } ) print(response.json()) ``` ### JavaScript ```javascript fetch("https://modelslab.com/api/v6/images/text2img", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "key": "YOUR_API_KEY", "model_id": "z-image-base", "prompt": "A highly detailed, ultra-realistic scene inside a modern McDonald’s restaurant. At the counter stands a friendly anthropomorphic creature resembling a furry monster or gentle beast. The creature has thick golden-brown fur, expressive round eyes, a wide flat nose, and a soft, friendly facial expression. It is wearing an official McDonald’s uniform: a dark grey short-sleeve button-up shirt with a red-and-yellow McDonald’s logo patch on the chest, dark trousers, and a navy-blue McDonald’s cap with the iconic yellow ‘M’. The creature has large, clawed hands covered in brown fur, and is handing over a classic McDonald’s brown takeaway bag with the yellow ‘M’ printed on it. ", "width": "1024", "height": "1024", "samples": "1" }) }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Links - [Model Playground](https://modelslab.com/models/z-image-base/z-image-base) - [API Documentation](https://docs.modelslab.com) - [ModelsLab Platform](https://modelslab.com)