Godpip API Reference
Godpip turns unclear human input into structured, model-ready intent. Version 1 serves the Human Bridge; the other capabilities are specified and return 501 until they launch.
Quickstart
Send a person's words exactly as written. Ask for augment to get their words back, untouched, followed by expert notes you can pass to any model.
curl -sS https://api.godpip.com/v1/bridge/translate \
-H "Authorization: Bearer $GODPIP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input": "need a landing page for my dog walking biz, something friendly, maybe show prices? not sure",
"desired_output": "augment"}'Send result.augmented_input to your model, show result.canonical_intent to your planner, and check warnings for anything the verifier corrected. The full field list is under Human Bridge.
Environments & keys
One base URL serves both environments. The key's prefix chooses the environment, so test traffic never touches live data or usage.
| Environment | Key prefix | Billing | Use for |
|---|---|---|---|
| Sandbox (test) | gp_test_… | Free | Development, staging, QA and the playground |
| Production (live) | gp_live_… | List price per unit | Real end-user traffic |
Send the key as a bearer token: Authorization: Bearer gp_live_…. Keys are scoped to one project; a key from one project can never read another project's requests or jobs.
Scopes
Each key carries scopes that limit what it can do. A standard key has bridge:write, jobs:read, jobs:write, webhooks:read, webhooks:write, feedback:write, models:read and usage:read, plus the write scope for each capability as it launches. A call without the right scope returns 403 PERMISSION_DENIED.
Storing keys
Keep keys in your secret manager, never in source code, logs or the browser. Use separate secrets for sandbox and production, for example GODPIP_API_KEY holding a gp_test_… key in development and staging and a gp_live_… key in production, next to GODPIP_API_BASE_URL=https://api.godpip.com/v1.
Versioning
- The major version is in the path:
/v1. A breaking change ships as/v2;/v1keeps working through a published deprecation window. - Within v1, changes are additive only: new optional request fields, new response fields, new enum values on outputs. Clients should ignore fields they do not know.
- Requests reject unknown fields with
400 INVALID_REQUEST, so typos fail loudly. - Every response carries
"api_version": "v1". Before anything is removed, responses carryDeprecationandSunsetheaders. - The contract version (
info.version, semver) changes with every contract change: minor for additive changes, patch for documentation only. Every version has a changelog entry, and CI rejects a contract change without a bump. - Read the deployed version without a key:
GET /healthzreturnsapi_versionandsupported {min, max};GET /v1/openapi.jsonreturns the full contract. - The OpenAPI 3.1 document is the source of truth:
https://api.godpip.com/v1/openapi.json. Generate a typed client from it with any OpenAPI generator.
Headers
| Header | Direction | Meaning |
|---|---|---|
Authorization | Request | Bearer gp_test_… or Bearer gp_live_…. Required on every /v1 call. |
Idempotency-Key | Request | Optional, 1–255 characters, on every POST (capabilities, /v1/feedback, /v1/jobs/{job_id}/cancel, /v1/jobs/{job_id}/input, /v1/webhooks). A retry with the same key and body returns the original status and body without repeating the action or charging again. The same key with a different body, or on a different endpoint, returns 409 IDEMPOTENCY_CONFLICT. Keys are scoped to your project and environment. Non-capability keys are kept 24 hours; a request that fails validation or returns an error does not use up its key. |
X-Request-Id | Response | The request id (req_…). Quote it in support requests and in /v1/feedback. |
RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset | Response | Per-key requests per minute, what is left in the window, and seconds until it resets. |
Retry-After | Response | Seconds to wait, sent with 429 RATE_LIMITED. |
Response envelope
Every capability returns the same envelope. result holds the capability's own schema.
{
"request_id": "req_6eEyby3S4fU7PbgxUr5ZhxaL",
"api_version": "v1",
"environment": "test",
"status": "completed", // completed | queued | running
"job_id": "job_AlmUvqqMMic2hZMp6aGRRQ5M",
"result": { … }, // present when status is completed
"confidence": 0.91, // 0..1, calibrated
"warnings": [ { "code": "HEDGE_RESTORED", "message": "…" } ],
"usage": {
"input_units": 1875, "output_units": 1183,
"billable": [ { "unit": "bridge_unit", "quantity": 1 } ],
"cost": 0.0, "currency": "USD"
},
"metadata": {}
}warnings lists every correction Godpip's verifier made, for example a statement demoted from explicit to inferred. Nothing is changed silently.
Sync, async & jobs
Every call runs as a job. Sync-style calls wait for the job and return 200 with the result, up to 25 seconds or budget.max_latency_ms if lower. If the job is still running, the response is 202 with status: "queued" or "running" and a job_id; poll GET /v1/jobs/{job_id} until it reaches a final state.
| Job status | Final | Meaning |
|---|---|---|
queued | No | Accepted, waiting for a worker. |
running | No | A worker holds it. |
waiting | No | Needs input (reserved; not used by the Bridge yet). |
completed | Yes | response holds the full envelope. |
failed | Yes | error holds the error body. |
cancelled | Yes | Cancelled before completion; nothing is billed. |
Errors
Errors use one shape. recoverable tells a client whether a retry can succeed.
{
"error": {
"code": "INVALID_REQUEST",
"message": "Request failed schema validation.",
"recoverable": false,
"suggested_action": "…",
"request_id": "req_…",
"details": { "errors": [ { "loc": ["body", "input"], "msg": "Field required" } ] }
}
}| HTTP | Code | When |
|---|---|---|
| 400 | INVALID_REQUEST | Schema validation failed or an unknown field was sent. |
| 401 | UNAUTHENTICATED | Key missing, malformed, revoked, expired, or used against the wrong environment. |
| 402 | BUDGET_INSUFFICIENT | budget.max_cost is below what any model would cost. |
| 403 | PERMISSION_DENIED | The key lacks the scope for this operation. |
| 404 | NOT_FOUND | No such job, webhook or request in this project and environment. |
| 409 | IDEMPOTENCY_CONFLICT | Idempotency-Key reused with a different body or on a different endpoint. |
| 409 | CANCELLED | The job was cancelled before it finished. |
| 413 | PAYLOAD_TOO_LARGE | Body over 1 MiB. |
| 422 | INSUFFICIENT_CONTEXT, AMBIGUITY_REQUIRES_INPUT, NO_VALID_SOLUTION, SAFETY_RESTRICTED | The request is valid but cannot be answered as asked. |
| 429 | RATE_LIMITED | Per-minute rate or concurrent-job limit reached. |
| 500 | INTERNAL_ERROR | Unexpected failure. Safe to retry with the same Idempotency-Key. |
| 501 | UNSUPPORTED_CAPABILITY | The capability is not live yet, or client context sent to a deployment without it. |
| 502 | RESEARCH_FAILED | Reserved for the Research capability. |
| 503 | PROVIDER_UNAVAILABLE | Every model vendor in the chain failed. Retry later. |
Human Bridge
Turns messy human input into structured intent, or into the person's own words plus expert notes ready for any model.
Request
| Field | Type | Default | Notes |
|---|---|---|---|
input | string, 1–100,000 | required | The person's words, exactly as written. |
desired_output | enum | professional_brief | augment, handoff, professional_brief, canonical_intent, routing_only. See below. |
domain | string | — | Optional hint, for example product. |
context.known_constraints | string[] | [] | Carried into the result verbatim. |
context.existing_decisions | string[] | [] | Carried into explicit verbatim. |
context.platform | object | — | Your platform's conventions and artifacts. Used, never stored. |
context.user | object | — | One user's slice: opaque id, preferences, history_summary, data_classes, purpose. Used, never stored. |
behavior.infer_safe_defaults | bool | true | Off turns assumptions into questions. |
behavior.minimize_questions | bool | true | Only blocking questions are returned. |
behavior.include_solution_hints | bool | false | Return proposals about how to do the work. Off keeps the downstream solution space open. |
budget | object | — | max_cost (USD), max_latency_ms, quality_priority (cost · balanced · quality). |
client_reference | string | — | Your own correlation id; echoed, never interpreted. |
Which output to ask for
| desired_output | Best for | What you get |
|---|---|---|
augment | Sending the request to any language model | All intent fields, plus expert_notes and augmented_input: the person's words untouched, followed by professional checks, pitfalls and a quality bar. In blind tests, answers built on it beat answers to the raw request. |
handoff | Agent-to-agent routing | Compact intent with each meaning once, source_text, no brief. |
professional_brief | Showing a person or a planner | Intent plus a professional brief. |
canonical_intent | State and routing | Intent without the brief. |
routing_only | Cheap classification | Intent without the brief; read scope and solution_space. |
Example: augment
curl -sS https://api.godpip.com/v1/bridge/translate \
-H "Authorization: Bearer $GODPIP_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 7c1f9e9a-1b6e-4e0b-9d0a-2f3c4d5e6f70" \
-d '{"input": "a short video ad for our coffee brand, like 15 sec, vertical, maybe with a dog",
"desired_output": "augment"}'Result fields
| Field | Meaning |
|---|---|
canonical_intent.objective | One sentence naming the deliverable in the person's terms. |
canonical_intent.scope | conversation · atomic_task · change_request · feature · project · new_product · strategy · research · problem · incident |
canonical_intent.deliverable | What the person asked to receive: description, form (artifact · answer · plan · action · conversation), quantity. |
canonical_intent.explicit | Only what the person said. Each item was matched to their exact words; hedges and negations are kept. |
canonical_intent.inferred | Conclusions with basis and confidence. Anything from client context lands here, never in explicit. |
canonical_intent.proposed | Non-binding proposals; kind is intent (what) or solution (how). |
canonical_intent.unknowns | question, importance, blocking, resolvable_by. |
canonical_intent.constraints | Only limits stated by the person or the caller. |
canonical_intent.solution_space, downstream_authority | open · guided · fixed, and whether downstream may challenge defaults or propose alternatives. |
clarification | required is true only before an irreversible action (spend, publish, send, delete, cancel, sign). Questions ask for specifics, never for permission already given. |
assumptions, professional_brief, recommended_next_action | As named; the brief is present only for professional_brief. |
memory_writes | Suggested durable preferences for your own storage (scope, key, value, source, confidence). You decide whether to save them. |
context_requests | Fields from your storage that would answer an open unknown next time, for example user.brand.palette. |
source_text, expert_notes, augmented_input | Present for handoff and augment. |
Verifier warning codes
EXPLICIT_DEMOTED, NEGATION_LOST, HEDGE_RESTORED, CONSTRAINT_DEMOTED, QUESTION_DEFERRED, AUTHORITY_REQUIRED, SOLUTION_HINTS_OMITTED, MEMORY_WRITE_DROPPED, EXPERT_NOTES_UNAVAILABLE, RESEARCH_NOT_AVAILABLE.
Jobs
Returns id, capability, status, request_id, timestamps, and response (the full envelope) or error.
A queued job is cancelled at once; a running job stops at its next checkpoint. A job cancelled while finishing ends cancelled and is not billed.
Answers for a waiting job. Returns 501 until a capability uses the waiting state.
Webhooks
Body: url (https only, public address), events (job.completed, job.failed, job.cancelled, job.requires_input, usage.threshold), description. Returns the endpoint with its signing_secret, shown once. Delivered today: job.completed, job.failed, job.cancelled. job.requires_input and usage.threshold are accepted but not sent yet.
Delivery
When a job ends, Godpip POSTs one event to every webhook in the same project and environment that subscribes to it. The body is a WebhookEvent:
{
"id": "evt_3f9c2a7d1b8e4c6a0f5d2e17",
"type": "job.completed",
"created_at": "2026-10-05T14:03:11.204Z",
"environment": "test",
"data": {"job_id": "job_…", "request_id": "req_…", "capability": "bridge", "status": "completed"}
}data holds ids and status only, plus error (code, message, recoverable) for job.failed. Fetch the result with GET /v1/jobs/{job_id}.
| Header | Value |
|---|---|
Godpip-Signature | t=<unix seconds>,v1=<hex HMAC-SHA256(signing_secret, "<t>." + raw body)> |
Godpip-Event-Id | Same as id in the body. Stable across retries. |
Godpip-Event-Type | Same as type. |
Godpip-Delivery-Attempt | 1 for the first attempt, then 2, 3, … |
Verifying the signature
Algorithm: HMAC-SHA256, key = the endpoint's signing_secret, message = the t value, a dot, then the raw request body bytes exactly as received. Compare in constant time. Reject the event if t is more than 300 seconds from your clock.
import hashlib, hmac, time
def verify(secret: str, header: str, raw_body: bytes, tolerance: int = 300) -> bool:
parts = dict(item.split("=", 1) for item in header.split(","))
t, given = int(parts["t"]), parts["v1"]
if abs(time.time() - t) > tolerance:
return False
expected = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, given)Retries and dedupe
- Success is any 2xx within 10 seconds. A non-2xx status, a redirect (not followed), a timeout or a connection error is retried.
- Retries wait 30 s, 2 min, 10 min, 30 min, 1 h, 2 h, 4 h and 8 h: nine attempts over about 15.7 hours, then the delivery is marked failed.
- Delivery is at least once and order is not guaranteed. Dedupe on the event
id; a job produces at most one event per terminal status. - Answer quickly with 2xx and do the work afterwards.
Feedback
Body: request_id, outcome (success · partial · failure), optional first_pass, rating (1–5), failure_type, notes (up to 2,000 characters). Returns {"accepted": true}. This is how downstream success reaches Godpip's quality tracking.
Usage & models
ISO-8601 start (inclusive) and end (exclusive). Returns per-capability lines (unit, quantity, requests, cost) and total_cost for the key's project and environment.
Downstream targets for Prompt Package. Returns an empty list until that capability launches.
{"status": "ok", "database": "up", "capabilities": ["bridge"], "api_version": "1.2.0", "supported": {"min": "1.0.0", "max": "1.2.0"}}. The capabilities list is the source of truth for what is live; api_version equals the served contract's info.version.
The deployed OpenAPI 3.1 contract. Sends ETag and Cache-Control: public, max-age=300; send If-None-Match to get 304 when it has not changed.
Coming capabilities
These endpoints are fully specified in the OpenAPI document and return 501 UNSUPPORTED_CAPABILITY until they launch.
| Endpoint | Capability | Mode |
|---|---|---|
POST /v1/prompts/package | Prompt Package: execution package for a target model | Sync |
POST /v1/research | Research with typed evidence and sources | Async capable |
POST /v1/discover | Existing tools and services before building | Async capable |
POST /v1/resolve | Recommended plan for a defined problem | Async capable |
POST /v1/invent | Novel, testable approaches (beta) | Async capable |
POST /v1/explain | System output in plain, actionable language | Sync |
Client context & privacy
- Your platform and user context is used for the call and kept nowhere: it is never stored with the request, logged, cached, shared across customers, or used to train Godpip.
- While a job runs, its context is encrypted on the job and erased when the job ends; the database enforces this.
- Context does reach the model vendor for that call (no-storage settings on). Cover this in your own privacy terms.
- Health, financial, government-id and credential data classes require a declared
purpose. - Godpip never writes to your storage; it only suggests
memory_writes. - Request bodies follow the project's retention policy (default 30 days); usage and billing records are kept.
Limits & pricing
| Limit | Default |
|---|---|
| Requests per minute, per key | 120 |
| Concurrent jobs, per project | 20 |
| Request body | 1 MiB |
Sync wait before 202 | 25 s |
| Typical Bridge latency | 8–14 s |
| Unit | Sandbox | Production list price |
|---|---|---|
bridge_unit (one translate call) | $0.00 | $0.01 |
Changelog
| Contract | Date | Changes |
|---|---|---|
| 1.2.0 | 2026-10-05 | Idempotency-Key on every POST; webhook delivery for job.completed, job.failed and new job.cancelled (signed, retried, deduped by event id); GET /v1/openapi.json; /healthz api_version and supported. All additive. |
| 1.1.0 | 2026-10-04 | Bridge: augment and handoff outputs, deliverable, solution_space and downstream_authority, intent vs solution proposals (kind, binding), include_solution_hints, client context.platform and context.user, memory_writes, context_requests, source_text, augmented_input, expert_notes. All additive. Shipped while info.version still read 1.0.0-draft.1. |
| 1.0.0-draft.1 | 2026-10-04 | v1 launch: envelope, errors, keys and environments, jobs, idempotency, rate limits, webhooks registration, feedback, usage, Human Bridge. |