Independent API referenceField notes updated 29 Aug 2026

Schema comparison

OpenAI vs Gemini function calling schema differences

Compare strictness, supported schema subsets, nullable fields, and active-tool design for OpenAI and Gemini.

Similar wrapper, different subsetStrict required semanticsGemini tool-set sizingNullable translation

Reviewed Source: Gemini function calling guide

The wrappers look similar, but OpenAI strict and Gemini function declarations have different portability edges. Large or deeply nested Gemini declarations may be rejected, and unsupported keywords should not be passed through silently.

Read the schema and its provider wrapper as one contract. APITC distinguishes target requirements from portable JSON Schema, applies mechanical repairs only when intent is recoverable, and identifies transformations that can change meaning.

Diagnostic procedure

Repair the schema, then recompile.

  1. 01

    Compile, do not rename keys

    A wrapper-only conversion misses schema subset and nullability differences.

  2. 02

    Trim active tools

    Expose only tools relevant to the current turn to improve selection quality.

  3. 03

    Keep descriptions operational

    State when to call each function and what each argument means.

Before
OpenAI optional: {"type":["string","null"]} + required
Target-safe shape
Gemini portable: {"type":"string","nullable":true}

Interactive check

Run the schema against a real target.

Paste JSON, choose a target, and inspect the compiled shape and every portability warning before copying the result.

Contract compilerlocal browser runtime
01 Source contract APITC canonical
02OpenAI strict
80compatibility
0 errors · 2 fixes · 0 warnings
fix$.inputSchemaClose this object

OpenAI strict requires additionalProperties: false on every object.

fix$.inputSchemaRequired array is incomplete

Strict mode requires every property in required. APITC will make limit nullable.

97 tokens compiled · input never leaves this tab

No account · no upload · no endpoint calledOpen the full tool schema compiler and operating notes →

FAQ

Before you ship

Does APITC upload my schema?

No. Parsing, diagnostics, and compilation run in your browser tab.

Is the compiled result guaranteed to preserve meaning?

Safe repairs are deterministic. When either provider cannot express a source constraint, APITC labels the transform as lossy instead of hiding it.

Protocol behavior checked against the Gemini function calling guide. Recheck your pinned provider/API version before production deployment.