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 新機能
最先端の推論に基づいて構築された、Google の最もインテリジェントなモデルであり、マルチモーダル理解において世界最高水準のモデルです。
Gemini 3 Flash 新モデル
大規模モデルに匹敵するパフォーマンスを、わずかな費用で実現します。
Gemini 3.1 Flash-Lite 新モデル
Gemini 3 シリーズのパフォーマンスと品質を備えた、大量のトラフィックをコスト重視で処理するワークホース モデル。
Nano Banana 2 と Nano Banana Pro
最先端の画像生成および編集モデル。
Veo 3.1
ネイティブ音声付きの最先端の動画生成モデル。
Gemini Robotics
Gemini のエージェント機能をロボット工学に導入し、物理世界での高度な推論を可能にする視覚言語モデル(VLM)。
機能を確認する
ネイティブ画像生成(Nano Banana)
Gemini 2.5 Flash Image を使用して、コンテキストを高度に認識した画像をネイティブに生成、編集できます。
長いコンテキスト
Gemini モデルに数百万個のトークンを入力し、非構造化画像、動画、ドキュメントから理解を導き出します。
構造化出力
Gemini が JSON で応答するように制約します。JSON は、自動処理に適した構造化データ形式です。
関数呼び出し
Gemini を外部の API やツールに接続して、エージェント ワークフローを構築します。
Veo 3.1 による動画生成
Google の最先端のモデルを使用して、テキストや画像のプロンプトから高品質な動画コンテンツを作成できます。
Live API を使用した音声エージェント
Live API を使用して、リアルタイム音声アプリケーションとエージェントを構築します。
ツール
Gemini を Google 検索、URL コンテキスト、Google マップ、コード実行、コンピュータの使用などの組み込みツールを通じて世界に接続します。
ドキュメントの理解
最大 1,000 ページの PDF ファイルや、その他のテキストベースのファイル形式を、マルチモーダルで完全に理解して処理します。
思考
思考能力が複雑なタスクとエージェントの推論をどのように改善するかについて説明します。