All skills
cnemri avatar

/google-genai-sdk-python

@8caf714

Expert guidance for writing Python code using the official Google GenAI SDK (google-genai) for Gemini API and Vertex AI. Use for text generation, multimodal inputs, reasoning, tools, and media generation.

Use this Skill: https://skilld.dev/gh/cnemri/google-genai-skills/google-genai-sdk-python

This session only. Nothing lands on disk.

referencesmedia_generation.md

≈261 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Media Generation

Image Generation (Imagen)

Use gemini-2.5-flash-image (Nano Banana) or gemini-3-pro-image-preview (Nano Banana Pro).

response = client.models.generate_content(
    model='gemini-2.5-flash-image',
    contents='A futuristic city',
    config=types.GenerateContentConfig(
        image_config=types.ImageConfig(number_of_images=1)
    )
)
for part in response.parts:
    part.as_image().save('image.png')

Image Editing

Use chats for editing workflows.

chat = client.chats.create(model='gemini-2.5-flash-image')
response = chat.send_message(['Change the sky to purple', image])

Video Generation (Veo)

Use veo-3.0-generate-001 or veo-3.0-fast-generate-001.

operation = client.models.generate_videos(
    model='veo-3.0-fast-generate-001',
    prompt='A cat driving a car',
)
while not operation.done:
    time.sleep(5)
    operation = client.operations.get(operation)

# Download
for video in operation.response.generated_videos:
    video.video.save('video.mp4')

Source: SKILL.md on GitHub

1 warning16d4 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The Google GenAI Python SDK Skill is a documentation and code-reference skill designed to assist in developing Python applications using the Gemini API. It contains comprehensive setup guides, code examples for text/multimodal generation, chat interfaces, and tool usage. All external references are to official Google-owned GitHub repositories, which are recognized as trusted sources. No malicious patterns, unauthorized command execution, or data exfiltration behaviors were detected.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    11/11 files flagged

Signed by skilld at 8caf714. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 8 months ago

README badge

README badge for cnemri/google-genai-skills/google-genai-sdk-python