# Introduction to Gemini's Image Generation Request Parameters
Introduction to Gemini's Image Generation Request Parameters
Welcome to the second lesson of our course, "Creating Images with Gemini's Image Generation and Symfony." In this course, you will explore the fascinating world of AI-driven image generation using Google's Gemini API and its native image generation model. This lesson builds upon our previous lesson where we built the GeminiImageGenerator wrapper class. Now, we'll focus on using this wrapper to generate images with various configurations and parameters. We'll also explore Symfony, a powerful PHP web framework that will help us integrate and display our generated images.
Setting Up the Environment
Before we dive into generating images, it's crucial to set up our environment correctly. First, ensure you have PHP installed on your system (PHP 8.1 or higher is required for this setup). You'll need Composer, PHP's dependency manager, to install the required packages. On CodeSignal, many libraries come pre-installed; however, it's good practice to know how to install them on your own device.
For this lesson, we'll use Symfony's HTTP Client component to make API requests and handle environment variables. You can install these dependencies using Composer:
If you're setting up a complete Symfony project, you can use:
Next, you should create a .env file in your project root to store your Gemini API key and base URL. The code in this course reads both values, so a local project must define each one:
Make sure to add .env to your .gitignore file to prevent accidentally committing your API key to version control.
Using the GeminiImageGenerator Wrapper
With the environment set up, the next step is to use the GeminiImageGenerator wrapper we built in the first lesson. Let's load our environment variables and instantiate the wrapper:
