Build with AI

The API ships a machine-readable OpenAPI spec. Hand that spec to an AI assistant (Cursor, Claude Code, GitHub Copilot, ChatGPT, Claude) and it can read every endpoint, schema, and auth requirement, then write the integration code for you. No copying request shapes by hand.

The spec URL

This is the one thing your assistant needs. It's the same contract that powers the API Reference, kept in sync automatically.

https://docs.valleyinsllc.com/openapi.json

Two other machine-readable summaries are also published, useful for assistants that prefer plain text over a full OpenAPI document:

https://docs.valleyinsllc.com/llms.txt
https://docs.valleyinsllc.com/llms-full.txt

That spec lists only the partner-facing endpoints. Everything an assistant needs to call the API is in it:

  • Base URL: https://api.valleyinsllc.com/api/v1
  • Auth: a PartnerKey header on every request (see Authentication)
  • Resources: quote calculations, filing states and rates, filings, invoices
Never paste your API key into a prompt

Your key is a secret. Give the assistant the spec URL, not your key. When it writes code, have it read the key from an environment variable (PARTNER_KEY), never hardcoded, never in chat history.

Coding assistants

The workflow is the same everywhere: give the assistant the spec, then describe the integration you want.

Cursor

Add the spec as a documentation source so it's available to the model:

  1. Settings → Features → Docs → Add new doc, paste the spec URL above.
  2. In chat, reference it with @Docs and describe what you want:
@Docs(Valley Insurance) Using the Valley Insurance Partner API OpenAPI spec,
write a typed TypeScript client for the calculate and create-filing endpoints.
Read the API key from process.env.PARTNER_KEY and send it as the PartnerKey
header.

Claude Code / Copilot / other agents

Most coding agents can fetch a URL directly. Paste the spec URL into your prompt:

Fetch https://docs.valleyinsllc.com/openapi.json. It's the Valley Insurance
Partner API OpenAPI spec. Generate a small Python client for calculating a
quote and creating a filing. Auth is a PartnerKey header from the
PARTNER_KEY env var; base URL is https://api.valleyinsllc.com/api/v1.

Because the assistant works from the real schema, the generated types and field names match the API exactly, and stay correct as you ask follow-ups ("now add the invoice lookup", "handle the error envelope", see Errors).

Asking a chat assistant directly

For a one-off, like figuring out a request shape or debugging a response, give a chat assistant (ChatGPT, Claude) the same context. A prompt that works:

You're helping me integrate the Valley Insurance Partner API.

- Spec: https://docs.valleyinsllc.com/openapi.json
- Base URL: https://api.valleyinsllc.com/api/v1
- Auth: PartnerKey: <my API key> on every request

I want to create a filing after uploading a document. Show me the exact
requests (method, path, JSON body) and which fields are required.

If the assistant can't browse, paste the relevant slice of the spec, or copy the endpoint straight from the API Reference, which shows the request and response schema for each operation.

What's next