From google import genai from google.genai import types client = genai.Client(api_key="GEMINI_API_KEY") response = client.models.generate_content( model="gemini-2.0-flash-exp", contents=( "Generate a story about a cute baby turtle in a 3

from google import genai
from google.genai import types

client = genai.Client(api_key=“GEMINI_API_KEY”)

response = client.models.generate_content(
model=“gemini-2.0-flash-exp”,
contents=(
"Generate a story about a cute baby turtle in a 3d digital art style. "
“For each scene, generate an image.”
),
config=types.GenerateContentConfig(
response_modalities=[“Text”, “Image”]
),
)

1 Like

Hi @Mehmet_arda ,

Python only accepts standard straight quotes but in your code, you’re using curly quotes – these often come from coping text from documents

Try this corrected version of your code:

from google import genai

from google.genai import types

client = genai.Client(api_key="GEMINI_API_KEY")

response = client.models.generate_content(

model="gemini-2.0-flash-exp",

contents=(

"Generate a story about a cute baby turtle in a 3d digital art style. "

"For each scene, generate an image."

),

config=types.GenerateContentConfig(

response_modalities=["Text", "Image"]

),

)

Why is there an influx of old topic bumps with reply posters that are adding nothing to months-old conversations?

Directional quotes are from the Discourse-based forum, and because the pasted code wasn’t enclosed in a markdown code fence with the formatting button.

You are responding to someone not seen on the forum since account creation date, about an issue that does not exist.