mckaywrigley / takeoff-google-gen-ai-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Takeoff: Google Gen AI API

This module is a guide to the Google Gen AI API.

Resources

Recommendations

We recommend using Cursor to write code.

Prerequisites

You will need an Google Gen AI API Key.

Get one here.

Copy the .env.example file to .env.

cp .env.example .env

In .env, fill in the API key.

GOOGLE_GEN_AI_API_KEY=your-google-gen-ai-api-key

Install Packages

npm i

Structure

The example code is in the examples folder.

Your code is in the me folder.

Run Code

Install tsx to run the examples.

npm i -g tsx

Example: Run the audio-create-speech-example and audio-create-speech-me files.

Copy the relative path of the file.

For the example code, run the following command:

tsx examples/audio/create-speech.ts

For your code, run the following command:

tsx me/audio/create-speech.ts

About

License:MIT License


Languages

Language:TypeScript 100.0%