Zod schemas for MiniMax chat completion request/response.
// Source: https://github.com/corsairdev/corsair | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { z } from 'zod';
// Request and response shapes mirror the official OpenAPI specs published at
// https://platform.minimax.io/docs/api-reference (one spec per resource
// family, linked per section below). MiniMax wraps most JSON responses in a
// `base_resp` block; the request client turns a non-zero `status_code` into a
// MinimaxAPIError before output parsing, so output schemas only describe
// success payloads yet still accept the envelope.
// ── Shared building blocks ──────────────────────────────────────────────────
const BaseRespSchema = z
.object({
status_code: z
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key