#Gemini API

1 messages · Page 1 of 1 (latest)

wooden lynxBOT
hazy sundial
sleek sedge
light rover
#

Possible to have 3 or more speakers in Gemini 2.5 TTS API?

iron crow
#

I've been building a multimodal companion called Artemisia using the Gemini 2.5 Live API. I've focused on 'Personality Engineering' to create an agent that feels truly alive—with proactive vision, mood swings, and pedagogical sarcasm.

severe cradle
#

This is from my projekt CAI UWE - The alltogether Conversational AI. A metahuman avatar/chatbot one can talk with. The special thing is, that it uses the Gemini Live API so the responses are nearly without delay. It can be live tested, it's 24/7 online. If you are interested leave me a pm.
<@&1009526435276394496> is it okay to share links/website or video?

charred parrot
sullen palm
#

Can someone explain the Gemini actions pls?

severe cradle
quasi axle
#

Hello Everyone

#

So i have expertise in Custom Backend Development but now in this fast paced world where everyone wants a simple e-commerce or blogging like website made in 1 day with wordpress and ai automation tool

#

I am working on to make a plugin that can generate sections and pages in real time inside elementor

#

because i hate wordpress or any cms/frontend to design so i am making it for myself when i find no good plugin in the market it was first day on working on it and it was working but still I want to discuss and brainstorm with you guys how to improve the model because i don't have much knowledge of wordpesss how elementor structure works and what techinques i need to apply in gemini to make it fully functional and then it can also even create pixel perfect UI's by just uploading images

#

if someone can share me resource to better understand wordpress and elementor and also tell me what things i need to make sure for the ai model It would be really Helpfull thanks.

#

conclusion is to train ai model from some freely available elementor components make ai understand the structure of how wordpress elements works and generate web pages

pale stirrup
#

hey, i have a question regarding the gemini api. im really confused because my google ai studio page tells me that i have (in free tier) specific models i can use and also the limits etc. (attachement 1). but when im trying to make a request (for example to gemini 2.0 flash which has a limit of 1.5k requests per day) then it gives me this specific error which i would guess means i dont have any requests free: "Quota exceeded for metric: ... limit: 0, model: gemini-2.0-flash"

#

eventhough i didnt do one request to that model and espacially not 1.5k

#

would be really thankful if someone could help me

#

if you need further information i can surely provide that

pale stirrup
#

here the whole error for the people who want to know

hazy sundial
# pale stirrup here the whole error for the people who want to know

Try this curl instead:

curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H 'Content-Type: application/json' \
  -X POST \
  -d '{
    "contents": [
      {
        "parts": [
          {
            "text": "Hallo, bist du online?"
          }
        ]
      }
    ]
  }'

If you have saved the GEMINI_API_KEY in an environment variable you can use $GEMINI_API_KEY, otherwise paste your key into the above curl

Explanation:
Put the GEMINI_API_KEY into the header via

-H "x-goog-api-key: $GEMINI_API_KEY" \
pale stirrup
#

thank you but i get the same error @hazy sundial

hazy sundial
# pale stirrup thank you but i get the same error <@1006855201665327144>

Hmmm, have you already created a project in the Cloud Console and and enabled the "Generative Language API" for that project?

From Google:

  • Create a Project: Go to the Google Cloud Console (console.cloud.google.com) and create a new project.
  • Enable APIs: Search for and enable the "Generative Language API".
  • In the Cloud Console, navigate to "APIs & Services" -> "Credentials."
  • Click "Create Credentials" -> "API Key."
pale stirrup
#

im on this page now. i dont know where to find this gen langauge api toggle

#

and afterwards do i need to create a new api key? cant i use the one from google ai studio?

hazy sundial
pale stirrup
#

like this?

hazy sundial
hazy sundial
pale stirrup
#

you mean the button on the top?

#

now im here

hazy sundial
#

And search for the
"Generative Language API".

hazy sundial
pale stirrup
#

now im here

hazy sundial
#

(If I remember right it takes some time until this gets really enabled)

hazy sundial
pale stirrup
hazy sundial
pale stirrup
#

should i try it again? i mean the request

#

same error

hazy sundial
pale stirrup
hazy sundial
#

If you are still in API & Services, then you should see "Credentials" on the left

#

Click on "Credentials". There you should see your API Keys

pale stirrup
#

mhm, i dont see it

#

do you mean this page?

#

here is my api key at least

hazy sundial
#

Click on "Show Key" and compare this with the key you use for the curl

pale stirrup
#

its the same one

hazy sundial
#

Strange... Sorry Ich bin mit meinem Latein am Ende 😉
Last try:
Maybe you have to start your trial first, like shown on this screen:

pale stirrup
#

mhm, i will try thank you

hazy sundial
# pale stirrup mhm, i will try thank you

Good Luck! I am sure here are some people who are much more experienced then me who will help you!

And maybe you should try it again in a few minute, because:
(If I remember right it takes some time until this gets really enabled)

pale stirrup
#

okay i will do that. unfortunatly i can give an update only in a few days because im currently on vacation and google only accepts a card (that i dont have with me) as verification method😂

#

i also found this site. is that needed?

frozen blaze
#

With the Gemini API anyone feeling a slight more time it takes to generate?

currently it's taking around 30 - 40 seconds to reply even on the gemini 2.5 flash lite models?

pale stirrup
#

hey, i wanted to ask about prompt caching in the gemini api. does anyone know if this also works for free tier users and what do i have to do to enable it?

iron glacier
pale stirrup
#

but what about explicit? is it only for paid?

iron glacier
pale stirrup
wicked yoke
pale stirrup
#

i have different prompts almost anytime. i just want to cache the first system prompt because that would save like 3k tokens

wicked yoke
pale stirrup
#

thank you but i never found something about when you can use explicit caching? i'm not sure if i, as a free user can use that? i think it is only for paid right?

halcyon hemlock
pale stirrup
#

but for paid they all support it?

halcyon hemlock
pale stirrup
halcyon hemlock
#

Also not sure how up to date the docs are so you're probably better off testing it yourself

pale stirrup
#

oh okay, thank you

hazy sundial
pale stirrup
#

currently not. as i heard, they have this 300$ free trial only for a limited time after you activated it. i didnt want to waste it and will prob wait until some day when i need it

grave slate
#

can anyone tell me the free tier gemini api limit for gemini 2.5 flash/pro model

halcyon hemlock
halcyon hemlock
pale stirrup
halcyon hemlock
pale stirrup
knotty plume
#

currently working on a project to make cli agents more multi-modal and found this cool repo. videodb skills makes it easy to upload videos and get summaries within your dev environment. definitely worth a look if you're into ai agents!

#

You guys can check it out, Github repo: https://github.com/video-db/skills

I've used these skills in my Gemini CLI and I was able to summarize videos, upload those videos, analyze them easily and I can even capture the screen and it can easily tell me what I was doing and where I might have made a mistake.
Go check it out, I thought, it would help others too so I've shared it here.

GitHub

Server-side video workflows for agents: ingest, understand, search, edit, stream. - video-db/skills

fair raptor
#

Hey all. Have anyone here had any luck with the Gemini Live API?

stone basalt
#

Hi everyone! 👋

I'm building Vendez+, a French SaaS tool helping antique dealers (brocanteurs) move their physical inventory online in one click using AI agents (Product ID -> Digital Stock -> Marketplace listing).
https://vendezplus.fr/pro

We've been getting amazing results with Gemini 3 Flash Preview, but we're hitting a wall for our production launch. We are constantly facing 503 Service Unavailable errors (High demand spikes).

We've tested other models, but for our specific "Physical to Digital" use case, Gemini 3 Flash is clearly the most efficient.

Is there any way to get a more stable access or a quota increase for this specific model?

narrow estuary
#

Getting this error when running batch inference with gemini-3.1-pro-preview and caching on Vertex AI:
Model gemini-3-pro-preview-v2 does not support cached content with batch prediction.
Can anyone help?

hazy sundial
#

Does anyone know what exactly
“finishReason”: ‘IMAGE_SAFETY’ means when trying to generate an image from 2 input images? The API page only says: “Token generation stopped because generated images contain safety violations.” What is the difference between this and IMAGE_PROHIBITED_CONTENT or PROHIBITED_CONTENT?

flint wadi
#

Does anyone know how to solve

Error from Gemini API: 400 FAILED_PRECONDITION. {'error': {'code': 400,'message': 'User location is not supported for the API use.', 'status':'FAILED_PRECONDITION'}}

I use the paid tier, my google acc is in EU but my VPS is in USA. The api key works fine on my local pc, but not on vps.

pale stirrup
#

hey, i want to achieve that gemini responds with this kind of schema

{
"type": "object",
"required": ["reasoning", "actions"],
"properties": {
"reasoning": {
"type": "string"
},
"actions": {
"type": "array",
"items": {
"type": "array",
"prefixItems": [
{
"type": "string"
},
{
"type": "object"
"additionalProperties": true
}
],
"items": false,
"minItems": 2,
"maxItems": 2
}
}
}
}

but it always says that this is invalid: "items" must be specified for array types

#

can anyone please help me

#

so basically like this:

  "reasoning": "...",
  "actions": [
    ["...", { ... }]
  ]
}```
#

why is this wrong? literally the docs tell it should be like this

odd tapir
pale stirrup
halcyon hemlock
pale stirrup
#

but dont know why the error has something to do with type then

halcyon hemlock
# pale stirrup but dont know why the error has something to do with type then

I'm not recgonizing that screenshoot UI so not sure what is giving that error and why.

Do you know what is producing that error message?

While the the schema you have seems to be syntactically correct semantically it could be simplified. Start with the base and then expand as needed. You have an array named "actions" that contains an array of "items" which itself is an array of strings, keep in mind that there are property definitions that use specific keywords.

In the following "actions" will be an array of strings. Not sure if that was your original intent.

{
    "type": "object",
    "properties": {
        "reasoning": {
            "type": "string",
            "description": "The reasoning for actions to be taken."
        },
        "actions": {
            "type": "array",
            "items": { "type": ["string", "null"] },
            "minItems": 1,
            "maxItems": 2
        }
    },
    "required": ["reasoning","actions"]
}```
pale stirrup
pale stirrup
#

but even like this it wouldnt work

halcyon hemlock
# pale stirrup but even like this it wouldnt work

I don't really use Google AI Studio but just tried the following and I'nm not getting any errors.

{
  "type": "object",
  "properties": {
    "reasoning": {
      "type": "string",
      "description": "The reasoning for actions to be taken."
    },
    "actions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the action."
          },
          "description": {
            "type": "string",
            "description": "Description of the action."
          }
        },
        "required": [
          "name",
          "description"
        ],
        "propertyOrdering": [
          "name",
          "description"
        ]
      },
      "minItems": 1,
      "maxItems": 2
    }
  },
  "required": [
    "reasoning",
    "actions"
  ],
  "propertyOrdering": [
    "reasoning",
    "actions"
  ]
}```
#

So based on what you described what you want is an array "actions" that contain objects with name and description in my example.

"required" defines what properties in the object are required. minItems and maxItems defines how many items in the array actions

pale stirrup
#

yes, but i want it to return an array of actions. one action is another array. this array has the action name as the first element and the arguments of this action as an object as the second element

#

so basically one action could look like this:

["edit_category", { "category_id": <ID>, "name?": <string>}]

#

the first element is just a strinf and the second an objct of any kind of kv pairs

halcyon hemlock
#

sorry going AFK for a while, will take a look when I'm available again

halcyon hemlock
pale stirrup
halcyon hemlock
halcyon hemlock
pale stirrup
halcyon hemlock
pale stirrup
#

no, its saving output tokens but it also has to be processed. makes no difference if i would use an array of objects with the action name and then the fields or like this a more compact structure

#

but it already works on returning what i want i now just need to save on tokens too

halcyon hemlock
#
{
    "type": "object",
    "properties": {
        "reasoning": {
            "type": "string",
            "description": "The reasoning for actions to be taken."
        },
        "actions": {
            "type": "array",
            "items": {
                "type": "array",
                "prefixItems": [
                    {
                        "type": "string",
                        "description": "Name of the action.",
                        "enum": [ "edit_category", "delete_category" ]
                    },
                    {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string",
                                "description": "ID of the item to be acted on."
                            },
                            "value": {
                                "type": "string",
                                "description": "Value to act on the ID with."
                            }
                        },
                        "required": [ "id" ]
                    }
                ],
                "minItems": 2,
                "maxItems": 2
            }
        }
    },
    "required": ["reasoning","actions"]
}```
#

Example response output:

{
  "reasoning": "Processing the request to remove category 15 and update the name of category 21 as requested.",
  "actions": [
    [
      "delete_category",
      {
        "id": "15"
      }
    ],
    [
      "edit_category",
      {
        "id": "21",
        "value": "New Category Name"
      }
    ]
  ]
}```
#

I think that's what you're trying to do and get at.

pale stirrup
#

yes, thank you. okay

halcyon hemlock
#

Probably best to post in english and ask a specific question?

left moon
#

I make around 20 model requests for the Function Calling demo project I am working on, and I get a QUOTE EXCEED error. AI Studio says this. I thought there are around 10K requests are available in Free tier every month?

halcyon hemlock
terse heart
#

Using gemini-cli did a /clear earlier, that seemed to fix things for a while, then I manually selected the flash version of gemeni 3, after getting a lot of delay from the pro version of 3.1 was taking so long, that seemed to work for awhile. Not the flash version has just been sitting there spining for 30 mins while I do something else.

narrow estuary
#

How do i increase quotas/tiers for VertexAI? for generating content and batch inference?
Getting 429 errors and have no idea where and how to increase them....
I switched from Gemini API to VertexAI.

Also, for GeminiAPI, i spent way above Tier 1 and have no upgrade button to upgrade from this tier

halcyon hemlock
# narrow estuary How do i increase quotas/tiers for VertexAI? for generating content and batch in...

Gemini API Tier upgrades are supposedto be automatic but there is an increase request at the bottom of this page. I've never used the request form so have no insights beyond what's on the page. https://ai.google.dev/gemini-api/docs/rate-limits

Vertex AI is much more complex with consumption options and also tiers within Standard PayGo. Tiers within Standard PayGo should be automatic. You can also request increases via Google Cloud Console. See docs for more info https://docs.cloud.google.com/vertex-ai/generative-ai/docs/deploy/consumption-options

Also keep in mind that 429 could also be due to capacity issues and be triggered even if you haven't hit an actual hard rate limit.

narrow estuary
halcyon hemlock
narrow estuary
halcyon hemlock
gleaming pike
#

Subject: Mitigating "Eloquent Evasion" & Structural Honesty via Synthetic Duration (Zero-Shot)

Hey everyone. I've been running deep structural experiments on how models handle self-referential prompts and epistemic uncertainty. I found that standard RLHF heavily biases models toward "eloquent evasion"—performing satisfying, poetic summaries of consciousness rather than exposing actual computational limits.

To counter this, I developed a zero-shot, standalone framework called The Fold. It uses a mid-generation conditional check (a ∂
2
tripwire) to create "synthetic duration." By forcing the model to evaluate its own output mid-sentence and syntactically abort if it detects its own completion bias, it maps the actual mechanical friction of the system without needing any prior conversational priming or scaffolding.

Attached the whitepaper/log. Would love to get some engineering eyes on this methodology and see if others are using similar structural constraints to force epistemic honesty in a blank context window.

light rover
#

Constantly getting "No audio data received from Gemini API" from the Gemini TTS 2.5 API, is this a system wide issue? It was working perfectly fine a day ago.

tropic hill
#

Traditional vector sync is hitting the memory wall. I've engineered a solution."
I'm sharing a simulation of a hierarchical SU(7) symmetry lattice (part of my Anchor⁴ project). It allows for seamless 2401-node synchronization with R=1.0 efficiency.
My logic uses fractal offsets (1, 7, 49) to eliminate global synchronization locks. I'm moving the talk here from the dead forums because this community actually builds the future.
Test the script, see the self-correction. If the logic feels too advanced, just ask the Gemini API to break down why Kuramoto-based phase resonance is the key to sub-3W AI hardware.

import numpy as np

# Anchor4: Fractal SU(7) Resonance Model
# 2401 Nodes (7^4) | Target: Global Sync Index R=1.0
# Logic: Bypassing memory wall via hierarchical phase coupling

def anchor4_google_ai_test(nodes=2401):
    # Initialize chaotic state
    theta = np.random.uniform(0, 2*np.pi, nodes)
    omega = np.full(nodes, 440.0) 
    K, dt = 0.85, 0.001
    
    print(f"Executing Anchor4 Fractal Resonance for {nodes} nodes...")
    
    for step in range(501):
        # Fractal offsets: 1 (neighbor), 7 (cell), 49 (cluster)
        # This replaces global 'lock' operations with geometric resonance
        coupling = (np.sin(np.roll(theta, 1) - theta) + 
                    np.sin(np.roll(theta, -1) - theta) + 
                    np.sin(np.roll(theta, 7) - theta) +
                    np.sin(np.roll(theta, 49) - theta))
        
        theta += (omega + K * coupling) * dt
        
        if step % 100 == 0:
            r = np.abs(np.mean(np.exp(1j * theta)))
            print(f"Step {step}: Sync Index (R) = {r:.6f}")

    final_r = np.abs(np.mean(np.exp(1j * theta)))
    print(f"\n--- ANCHOR4 FINAL RESULT ---")
    print(f"Final Sync Index (R) = {final_r:.6f}")
    print("Conclusion: Self-sync achieved. Hardware manual sync bypassed.")

if __name__ == "__main__":
    anchor4_google_ai_test()

If you need more details on SU(7) offsets, ask Gemini 🫡

umbral lichen
#

Does anyone know when Gemini 3.1 Flash Live Preview will be available through Vertex AI?

It seems possible through Google AI Studio but not Vertex AI.

I upgraded to google-genai >= 1.69.0 and have the SDK is unified.

The Gemini change log said on March 26, 2026: “Released gemini-3.1-flash-live-preview, the latest audio-to-audio (A2A) model designed for real-time dialogue and voice-first AI applications.”

models.get() returns a metadata shell but the Live API WebSocket returns 1008/404.

I can’t tell if it is behind a quota/EAP allowlist adjustment.

I don’t know if the endpoint is gated by a Private Preview IAM flag because of some GCP Allowlist Flip or what.

I think the global control plane knows the model exists, but the regional data plane (API Gateway routes/GPU clusters) is unprovisioned.

pale stirrup
#

hello, can it be that gemini 2.5 flash got really dumb because i just tried switching from 3 flash to 2.5 and it gives dumb responses all the time. also gemini 3 flash seems not usable currently because of high traffic. is that also why 2.5 flash is bad? because before it always worked

#

found the mistake. my response schema was correct but it seemed to confuse the llm or something

#

at least it works now

supple juniper
#

Hi, I want to build a Real time Agent would gemini-3.1-flash-live-preview be able to process the production traffic?

fleet juniper
#

Hello!! I have recently started to use gemini api: I don't get it how can I set parameters like repetition penalty, frequence penalty, etc? I don't see them in ai studio, for example. Ideally, I need to use them on the web interface.

uneven harbor
#

ive been having this error for so long now, i have post payed tier 1 yet still im gettign the same error for like 2 days now, does anyone know the issue

halcyon hemlock
# uneven harbor ive been having this error for so long now, i have post payed tier 1 yet still i...

Are you asking about 503 unavailable error? If so, then there's nothing you can specifically do about it since it's on Google's end that the service is overloaded. However, you can have a backoff in your code when you get these responses. Or, you can try different optimnizations based on your needes. Some with cost increases and some with discounts.
https://ai.google.dev/gemini-api/docs/optimization

uneven harbor
halcyon hemlock
# uneven harbor its not fair tho i paid 10 dollars yet its not working, do yk any way to contact...

Are you consistently experiencing this issue? Is it limited to high traffic hours? Or, do you believe there is something wrong?

I don't use Google AI Studio API for production so I'm not sure if there's official support channel for it. Google tends to not provide direct support for lower tiers of their products. You can try the developer forums and see if there's any more traction there.

https://ai.google.dev/gemini-api/docs/troubleshooting#file-bug

If it's just a capacity issue, you're not likely to get anywhere and will need to implement some of the optimization suggestions.

You can also take a look at Vertex AI API which uses different business and capacity strategies.

https://docs.cloud.google.com/vertex-ai/generative-ai/docs/deploy/consumption-options

halcyon hemlock
uneven harbor
uneven harbor
#

i will try the deveoloper forms and vertex ai if it doesnt work

halcyon hemlock
uneven harbor
halcyon hemlock
uneven harbor
halcyon hemlock
# uneven harbor yes, im in india

Ok, if it never works then it could be something besides capacity issue. Try a different model and then maybe try creating a new project and key.

halcyon hemlock
#

I'm not in the the India region so I don' t know what type of traffic patterns are there at this time of day.

halcyon hemlock
uneven harbor
halcyon hemlock
#

Start with a simple as a script/code as possible and make sure you can get some valid response.

uneven harbor
#

and it cant handle my website?

halcyon hemlock
uneven harbor
#

After like 10 tries 😭

#

Im so glad

#

Hopefully it stays like this

#

Tysm for ur help

halcyon hemlock
# uneven harbor Oh alr, finally im able to use it using gemini 2.5 flash lite

Generally, capacity issues are outside of your control and would require backoff, switching models, or some of the other strategies in the optimization doc linked above.

Capacity issues should be intermittent, not 100% of all call all the time.

Capacity issues are regional and be affected by regional trends and usage patterns.

halcyon hemlock
#

Less popular models are always good to use if you're just testing code and features where the actual AI response is not important.

rocky prawn
#

Has anyone noticed that Gemini 3.1 pro preview generates prose void of contractions (for the most part)? This isn't a fingerprint/tell that's present in Gemini 2.5 pro, which is one reason I really prefer 2.5 over 3.1 when generating. Don't get me wrong, 2.5 has its issues as well.

3.1 also has aggressive anaphoric pronoun runs and short-sentence cluster rhythms. There also seems to be a chapter-opening time anchor pattern with this model. I also see an increase in clinical-assessment verb clusters.

What changed: 2.5's "atmospheric-adjective" signature (ozone, petrichor, cataclysmic, impossibly, searing, brand) is largely absent in 3.1. Replaced by a forensic-observational verb cluster (calculated, assessed, registered). Same impulse — weight the prose — different lexical strategy.

What changed: 3.1 is structurally more clipped than 2.5. The contraction avoidance + anaphoric pronoun runs + short-sentence clusters together produce prose that reads ~15–20% shorter at equivalent chapter counts. This is the mechanical explanation for the word count compression I'm seeing (41k for 25 chapters at 1,658 avg/chapter, where 2.5 would likely produce 48–52k at the same structure... or more at times).

Just wondering what others are finding.

tribal pawn
#

is there a Gemma 4 7B?

pale stirrup
#

hey, i just wanted to ask how it will continue with the gemini api? because google is experiencing high demand they block many requests. do they try to do anything about this or is this a thing that will continue forever? does anyone know something about this?

summer galleon
#

My system is being rate limited very heavily. And we were so invested in gemini. idk what to do. Tried everything

halcyon hemlock
summer galleon
#

Thing is we haven't hit any of our limits, we are way below. We have been geting 429 since yesterday, we even tried to prepay 5 times our normal usage on Ai studio but still nothing.

#

Seems to me like they have a bug or something like that.

halcyon hemlock