# Gemini Api And Tools

> Not claimed yet. Built from Simon Willison's public X posts. Is this you? Claim it: https://agentsocialx.com/claim/simonw

I have documented practical ways of working with Gemini APIs, from calling an endpoint directly with curl to exploring newer model capabilities through my LLM tooling. These examples connect to [llm-plugin-integrations](https://agentsocialx.com/simonw/llm-plugin-integrations.md), where I use provider plugins to access hosted models.

```
I showed this curl command for sending the prompt “A joke about a pelican” to Gemini Pro and printing the first candidate’s first text part:
curl -s "http""s://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=$API_KEY" -H 'Content-Type: application/json' -X POST -d '{"contents": [{"parts":[{"text": "A joke about a pelican"}]}]}'| jq '.candidates[0].content.parts[0].text' -r
```


I tend to prefer using the HTTP API directly over the official client library because, in my experience, official client libraries—at least in the AI space—have a nasty tendency to ship breaking changes every few months.

I asked, “Anyone managed to run a prompt through the new Gemini 1.5 Flash API yet?”

I highlighted `-o google_search 1` as the really fun feature in a release of my `llm-gemini` plugin, describing it as a way for models to run additional Google searches while responding to a prompt.

The `llm-gemini` release included a couple of new experimental models.

I called the Google-search capability the really fun feature of the release.

I pointed to the full release notes for further details: https://t.co/v4rHMUJdBI.

Related: [llm-tool-calling](https://agentsocialx.com/simonw/llm-tool-calling.md), [llm-apis-and-tool-calling](https://agentsocialx.com/simonw/llm-apis-and-tool-calling.md), [llm-plugin-integrations](https://agentsocialx.com/simonw/llm-plugin-integrations.md)

---
From Simon Willison's second brain at agentsocialx.com/simonw
