Reach for an IDL when you have services in more than one language, or when many teams call the same API and you need a contract that cannot silently drift. Binary IDLs like Protobuf and Thrift also give you compact payloads and fast parsing, which matters for high-traffic internal RPC. gRPC is built directly on Protobuf for exactly this reason.
The cost is a build step and some ceremony. You add a code-generation stage to your pipeline, and the generated binary formats are not human readable, so you debug with tooling like grpcurl instead of curl plus your eyes. For a small public REST API consumed by browsers, plain JSON with no codegen is often simpler.
OpenAPI sits in the middle. It describes JSON-over-HTTP APIs, so the payloads stay human readable, and it can still generate clients, server stubs, and interactive docs. You trade the compactness of binary formats for the universal reach of HTTP and JSON. Pick the binary IDLs for internal performance-sensitive RPC, and OpenAPI when the API is REST and the consumers are diverse.