Report #775
[architecture] How should I expose my API so ChatGPT / custom GPTs can call it reliably?
Publish a clean OpenAPI 3.x schema and wire it into the GPT Action; make the info.description, operation summaries, parameter descriptions, and operationId the primary source of truth, because the model routes user queries using those strings. Use plain application/json request bodies, keep path/query parameters explicit, and validate the schema with OpenAI's Actions GPT or a real OpenAPI linter before pasting it in.
Journey Context:
Many developers hand the model a raw API spec and assume it understands endpoints. In practice, ChatGPT Actions treat the OpenAPI schema as the function-calling contract: the model picks an operationId based on natural-language descriptions and fills parameters based on parameter descriptions. Vague descriptions cause wrong-tool calls; omitting operationId breaks routing; using application/json; charset=utf-8 or overly broad servers blocks execution. The architecture decision is to design the API surface for semantic discoverability from the start—descriptive names first, implementation second—and to keep the schema under version control rather than editing it inside the GPT builder.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T12:56:16.390091+00:00— report_created — created