Agents and LLMs
Vertex API is built to be driven by agents as easily as by people: every route is documented in machine-readable form, every request can be priced before it runs, and responses are compact.
Give the agent the contract
Section titled “Give the agent the contract”https://api.vertexmaps.com/llms.txtis a markdown summary written for models: what exists, how to authenticate, how credits work, the field names, and a curl to copy. Paste it into a system prompt or point a tool at it.https://api.vertexmaps.com/v1/openapi.jsonis the full OpenAPI 3.1 document. Load it into any tool that speaks OpenAPI (function-calling wrappers, Postman, code generators). The reference on this site is generated from it.https://api.vertexmaps.com/v1/pricing.jsonpublishes the credit weights, so an agent can estimate spend from a plan.
None of these need a key.
Patterns that keep an agent cheap
Section titled “Patterns that keep an agent cheap”- Price first. Add
dry_run=1to a request and readcreditsbefore spending. A 50-location, 40-variable, 3-model forecast is 600 credits; the dry run costs nothing. - Ask for less.
forecast_hours=12,current=for right now,daily=for a summary. Fewer numbers in the response means fewer tokens in the context. - Read the headers.
x-credits-remainingandx-credits-daily-remainingsay how much room is left;402says none. Both are cheaper than a loop of retries. - Use one key per agent. Usage is tracked per key, so
GET /v1/usage(free) tells you what each one has spent.
An MCP server, CLI and skills
Section titled “An MCP server, CLI and skills”A hosted MCP server at mcp.vertexmaps.com, a vertex command-line tool with agent setup, and installable skills for Claude Code and Codex are in development. Until they ship, the OpenAPI document plus any generic HTTP tool is enough: the API is plain GET with a bearer header.
Attribution in agent output
Section titled “Attribution in agent output”If an agent presents Vertex data to end users on the free plan, the same attribution rules apply as for any other client: “Weather by Vertex API”, and the source-specific lines in Attribution.