Get API

Gemini 3.1 Pro

Google's multimodal model with an extended context window.

google/gemini-3.1-pro

Capabilities

Gemini 3.1 Pro is a language model served through the Pika developer API. Send it a list of chat messages and it streams back a text reply, using the GenAI generateContent shape.

Authentication

api key header

The Pika API uses API keys to authenticate requests. Send your key in the X-API-Key header. Your API key is a secret. Don't expose it in browsers or other client-side code. Instead, call the API from your server. The signed-in playground uses a portal session and never sends your API key.

header
X-API-Key: YOUR_API_KEY

Endpoint

synchronous · chat completions

POSThttps://api.dev.pika.art/genai/v1beta/models/gemini-3.1-pro:generateContent

Request

POST /genai/v1beta/models/gemini-3.1-pro:generateContent

Request

curl -X POST https://api.dev.pika.art/genai/v1beta/models/gemini-3.1-pro:generateContent \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{ "role": "user", "parts": [{ "text": "Hello, who are you?" }] }
]
}'

Pass google/gemini-3.1-pro as the model and a messages array of { role, content } turns. Set stream: true to receive tokens incrementally over server-sent events.

The Python and TypeScript examples use the official Google GenAI SDK with its base URL pointed at https://api.dev.pika.art/genai — no Pika-specific SDK is needed. Keep your Pika API key and existing Google GenAI code works without a rewrite.

Errors

shared across calls

Errors use conventional HTTP status codes with a JSON body of the shape {"message": "..."}. A missing or invalid key returns 401.

Pricing

billed per token

TierPrice
Input$1.60 / 1M tokens
Output$9.60 / 1M tokens
Cached input$0.16 / 1M tokens

Per-model pricing

Transparent, usage-based rates for every Google model.

Gemini Omni Flash

Video

Text to Video

Video output$17.50 / 1M tok
Input$1.50 / 1M tok
Output$9 / 1M tok

Image to Video

Video output$17.50 / 1M tok
Input$1.50 / 1M tok
Output$9 / 1M tok

Reference to Video

Video output$17.50 / 1M tok
Input$1.50 / 1M tok
Output$9 / 1M tok

Video to Video

Video output$17.50 / 1M tok
Input$1.50 / 1M tok
Output$9 / 1M tok

Veo 3.1

Video

Text to Video

720pno audio$0.20 / sec
1080pno audio$0.20 / sec
720pwith audio$0.40 / sec
1080pwith audio$0.40 / sec
4kno audio$0.40 / sec
4kwith audio$0.60 / sec

Video Extension

no audio$0.20 / sec
with audio$0.40 / sec

Veo 3.1 Fast

Video

Text to Video

720pno audio$0.08 / sec
720pwith audio$0.10 / sec
1080pno audio$0.10 / sec
1080pwith audio$0.12 / sec
4kno audio$0.25 / sec
4kwith audio$0.30 / sec

Video Extension

no audio$0.08 / sec
with audio$0.10 / sec

Veo 3.1 Lite

Video

Image to Video

720pno audio$0.03 / sec
720pwith audio$0.05 / sec
1080pno audio$0.05 / sec
1080pwith audio$0.08 / sec

Nano Banana Pro

Image

Image to Image

Image output$120 / 1M tok
Input$2 / 1M tok
Output$12 / 1M tok

Text to Image

Image output$120 / 1M tok
Input$2 / 1M tok
Output$12 / 1M tok

Nano Banana 2

Image

Image to Image

Image output$60 / 1M tok
Input$0.50 / 1M tok
Output$3 / 1M tok

Text to Image

Image output$60 / 1M tok
Input$0.50 / 1M tok
Output$3 / 1M tok

Nano Banana 2 Lite

Image

Image to Image

Image output$30 / 1M tok
Input$0.25 / 1M tok
Output$1.50 / 1M tok

Text to Image

Image output$30 / 1M tok
Input$0.25 / 1M tok
Output$1.50 / 1M tok

Lyria 3 Pro

Audio • Text to Audio

$0.064 / request

Lyria 3

Audio • Text to Audio

$0.032 / request

Lyria 2

Audio • Music

$0.048 / request

Gemini 3.6 Flash

LLM

Input$1.20 / 1M tok
Output$6 / 1M tok
Cached input$0.12 / 1M tok

Gemini 3.5 Flash-Lite

LLM

Input$0.24 / 1M tok
Output$2 / 1M tok
Cached input$0.024 / 1M tok

Gemini 3.1 Pro

LLM

Input$1.60 / 1M tok
Output$9.60 / 1M tok
Cached input$0.16 / 1M tok