Gemini API
Gemini、Veo、Nano Banana などを使用して、プロンプトから本番環境までを最速で実現します。
Python
from google import genai
client = genai.Client()
response = client.models.generate_content(
model="gemini-3-flash-preview",
contents="Explain how AI works in a few words",
)
print(response.text)
JavaScript
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
async function main() {
const response = await ai.models.generateContent({
model: "gemini-3-flash-preview",
contents: "Explain how AI works in a few words",
});
console.log(response.text);
}
await main();
Go
package main
import (
"context"
"fmt"
"log"
"google.golang.org/genai"
)
func main() {
ctx := context.Background()
client, err := genai.NewClient(ctx, nil)
if err != nil {
log.Fatal(err)
}
result, err := client.Models.GenerateContent(
ctx,
"gemini-3-flash-preview",
genai.Text("Explain how AI works in a few words"),
nil,
)
if err != nil {
log.Fatal(err)
}
fmt.Println(result.Text())
}
Java
package com.example;
import com.google.genai.Client;
import com.google.genai.types.GenerateContentResponse;
public class GenerateTextFromTextInput {
public static void main(String[] args) {
Client client = new Client();
GenerateContentResponse response =
client.models.generateContent(
"gemini-3-flash-preview",
"Explain how AI works in a few words",
null);
System.out.println(response.text());
}
}
C#
using System.Threading.Tasks;
using Google.GenAI;
using Google.GenAI.Types;
public class GenerateContentSimpleText {
public static async Task main() {
var client = new Client();
var response = await client.Models.GenerateContentAsync(
model: "gemini-3-flash-preview", contents: "Explain how AI works in a few words"
);
Console.WriteLine(response.Candidates[0].Content.Parts[0].Text);
}
}
REST
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-3-flash-preview:generateContent" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"contents": [
{
"parts": [
{
"text": "Explain how AI works in a few words"
}
]
}
]
}'
クイックスタート ガイドに沿って API キーを取得し、数分で最初の API 呼び出しを行います。
各モデルについて
すべて表示Gemini 3.1 Pro 新モデル
最先端の推論技術を基盤として構築された、マルチモーダル理解において世界最高水準の最もインテリジェントなモデル。
Gemini 3 Flash 新モデル
わずかな費用で大規模なモデルに匹敵するフロンティア クラスのパフォーマンス。
Gemini 3.1 Flash-Lite 新モデル
Gemini 3 シリーズのパフォーマンスと品質を備えた、大量のトラフィックをコスト重視で処理するワークホース モデル。
🍌 Nano Banana 2 と Nano Banana Pro
画像の生成と編集のための最先端モデル。
Veo 3.1
ネイティブ音声に対応した、Google の最先端の動画生成モデル。
Gemini Robotics
Gemini のエージェント機能をロボット工学に導入し、現実世界での高度な推論を可能にする視覚言語モデル(VLM)。
機能を確認する
ネイティブ画像生成(Nano Banana)
Gemini 2.5 Flash Image を使用して、コンテキストを高度に認識した画像をネイティブに生成、編集できます。
長いコンテキスト
Gemini モデルに数百万トークンを入力し、非構造化画像、動画、ドキュメントから理解を得ることができます。
構造化出力
Gemini が JSON(自動処理に適した構造化データ形式)で応答するように制約できます。
関数呼び出し
Gemini を外部 API やツールに接続して、エージェント ワークフローを構築できます。
Veo 3.1 による動画生成
Google の最先端モデルを使用して、テキストまたは画像のプロンプトから高品質の動画コンテンツを作成できます。
Live API を使用した音声エージェント
Live API を使用して、リアルタイムの音声アプリケーションとエージェントを構築できます。
ツール
Google 検索、URL コンテキスト、Google マップ、コード実行、パソコンの使用などの組み込みツールを使用して、Gemini を世界と接続できます。
ドキュメントの理解
マルチモーダル理解またはその他のテキストベースのファイル形式を使用して、最大 1,000 ページの PDF ファイルを処理できます。
思考モード
思考機能が複雑なタスクやエージェントの推論をどのように改善するかを確認できます。