JUHE API Marketplace

How to Use the Google Gemini API for Text, Image, and Video Generation

3 min read
By Olivia Bennett

Introduction

The Google Gemini API enables advanced text, image, and video generation through a unified multimodal interface. By connecting via Wisdom-Gate, you can cut costs by up to 30% compared to other gateways.

Overview of the Gemini Multimodal API

  • Text Generation: Conversational AI, article drafting, code assistance.
  • Image Generation: AI-created designs, illustrations.
  • Video Generation: AI-driven video scripts and sequences.

Supported Models:

  • gemini-3-pro
  • GPT-5, Claude Sonnet 4

Pricing:

ModelOpenRouter Input / Output per 1M tokensWisdom-Gate Input / Output per 1M tokensSavings
GPT-5$1.25 / $10.00$1.00 / $8.00~20% lower
Claude Sonnet 4$3.00 / $15.00$2.00 / $10.00~30% lower
gemini-3-pro$3.00 / $15.00$2.00 / $10.00~30% lower

Setting Up Access

  1. Sign up at AI Studio.
  2. Retrieve your API Key.
  3. Base URL: https://wisdom-gate.juheapi.com/v1
  4. Include necessary headers in every request:
    • Authorization: YOUR_API_KEY
    • Content-Type: application/json

Text Generation

Core Endpoint

POST: /chat/completions

Example: cURL for Text Generation

curl --location --request POST 'https://wisdom-gate.juheapi.com/v1/chat/completions' \
--header 'Authorization: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model":"gemini-3-pro",
    "messages": [
      {
        "role": "user",
        "content": "Generate a welcome greeting for new users."
      }
    ]
}'

Example: Python for Text Generation

import requests

url = "https://wisdom-gate.juheapi.com/v1/chat/completions"
headers = {
    "Authorization": "YOUR_API_KEY",
    "Content-Type": "application/json"
}
payload = {
    "model": "gemini-3-pro",
    "messages": [{"role": "user", "content": "Write a short poem about sunrise."}]
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())

Image Generation

Endpoint Description

Use Gemini's image capabilities by sending prompts describing the desired image.

Example: cURL for Image Generation

curl --location --request POST 'https://wisdom-gate.juheapi.com/v1/images/generations' \
--header 'Authorization: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model":"gemini-3-pro",
    "prompt": "A futuristic cityscape at sunset"
}'

Example: Python for Image Generation

import requests

url = "https://wisdom-gate.juheapi.com/v1/images/generations"
headers = {
    "Authorization": "YOUR_API_KEY",
    "Content-Type": "application/json"
}
payload = {
    "model": "gemini-3-pro",
    "prompt": "An ancient temple in a jungle with golden light"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())

Video Generation

Endpoint Description

While Gemini handles video tasks differently, you can send multimodal prompts with video generation instructions.

Example: cURL for Video Generation

curl --location --request POST 'https://wisdom-gate.juheapi.com/v1/video/generations' \
--header 'Authorization: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model":"gemini-3-pro",
    "prompt": "Create a 30-second animation of a rocket launch"
}'

Example: Python for Video Generation

import requests

url = "https://wisdom-gate.juheapi.com/v1/video/generations"
headers = {
    "Authorization": "YOUR_API_KEY",
    "Content-Type": "application/json"
}
payload = {
    "model": "gemini-3-pro",
    "prompt": "Produce a short film of wildlife in the savanna"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())

Cost Advantages of Wisdom-Gate

Switching to Wisdom-Gate can yield up to 30% savings compared to other platform access. For high-volume projects, these savings are substantial.

Tips for Better Output

  • Prompt Engineering: Give clear, concise prompts.
  • Multimodal Prompts: Combine text, images, and video descriptions for richer output.
  • Iterative Requests: Refine outputs by feeding back results as prompts.

Troubleshooting

  • 401 Unauthorized: Check your API Key.
  • 400 Bad Request: Verify JSON structure.
  • Timeouts: Check internet connection or reduce payload size.

Conclusion

The Gemini API via Wisdom-Gate is a powerful, cost-effective tool for producing high-quality text, images, and videos. With its multimodal flexibility and lower pricing, it should be a go-to for developers seeking cutting-edge AI generation.

How to Use the Google Gemini API for Text, Image, and Video Generation | JuheAPI