{
  "openapi": "3.0.3",
  "info": {
    "title": "VoidAI API",
    "version": "2026-10-01",
    "description": "Public HTTP operations supported by the VoidAI gateway. This is a minimal reference, not a claim of universal provider-feature compatibility. Model support, account eligibility, usage policies, and billing rules apply. See https://docs.voidai.app and https://voidai.app/models."
  },
  "servers": [
    {
      "url": "https://api.voidai.app/v1",
      "description": "VoidAI API"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    },
    {
      "apiKeyAuth": []
    }
  ],
  "paths": {
    "/models": {
      "get": {
        "operationId": "listModels",
        "summary": "List models",
        "description": "Public catalog, not an account-filtered access list.",
        "tags": [
          "Models"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelList"
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/models/{id}": {
      "get": {
        "operationId": "getModel",
        "summary": "Get model",
        "description": "Look up an exact model ID. No created timestamp is returned.",
        "tags": [
          "Models"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Model"
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/chat/completions": {
      "post": {
        "operationId": "createChatCompletion",
        "summary": "Create chat completion",
        "description": "OpenAI-compatible chat. Optional features depend on the model/provider.",
        "tags": [
          "Chat"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequest"
              }
            }
          }
        }
      }
    },
    "/messages": {
      "post": {
        "operationId": "createMessage",
        "summary": "Create message",
        "description": "Anthropic-compatible messages. Claude access and usage checks apply; see the Messages documentation.",
        "tags": [
          "Messages"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "anthropic-version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "anthropic-beta",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessagesRequest"
              }
            }
          }
        }
      }
    },
    "/messages/count_tokens": {
      "post": {
        "operationId": "countMessageTokens",
        "summary": "Count message tokens",
        "description": "Not billed. Native count where available; availability failures can fall back to a local estimate.",
        "tags": [
          "Messages"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "input_tokens": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "input_tokens"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "anthropic-version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "anthropic-beta",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CountTokensRequest"
              }
            }
          }
        }
      }
    },
    "/responses": {
      "post": {
        "operationId": "createResponse",
        "summary": "Create response",
        "description": "Responses-format request. Streaming emits named SSE events. Model/provider support varies.",
        "tags": [
          "Responses"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponsesResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResponsesRequest"
              }
            }
          }
        }
      }
    },
    "/responses/compact": {
      "post": {
        "operationId": "compactResponse",
        "summary": "Compact context",
        "description": "Non-streaming and billed. Native compaction can fall back to normal generation summarizing the context.",
        "tags": [
          "Responses"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponsesResponse"
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompactRequest"
              }
            }
          }
        }
      }
    },
    "/images/generations": {
      "post": {
        "operationId": "generateImage",
        "summary": "Generate images",
        "description": "Unavailable to free-plan accounts. Image count, size, format, and feature constraints vary by model; consult the endpoint guide.",
        "tags": [
          "Images"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageGenerationRequest"
              }
            }
          }
        }
      }
    },
    "/images/edits": {
      "post": {
        "operationId": "editImage",
        "summary": "Edit images",
        "description": "Multipart image or image[] files, 1\u201316 images. Unavailable to free-plan accounts. gpt-image-2 rejects transparent backgrounds and input_fidelity.",
        "tags": [
          "Images"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ImageEditRequest"
              }
            }
          }
        }
      }
    },
    "/audio/speech": {
      "post": {
        "operationId": "createSpeech",
        "summary": "Create speech",
        "description": "Binary audio. The gateway currently labels responses audio/mpeg even for other requested encodings.",
        "tags": [
          "Audio"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "audio/mpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpeechRequest"
              }
            }
          }
        }
      }
    },
    "/audio/transcriptions": {
      "post": {
        "operationId": "createTranscription",
        "summary": "Transcribe audio",
        "description": "Multipart audio upload, non-empty and at most 25 MiB. Provider support and output behavior vary.",
        "tags": [
          "Audio"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/TranscriptionRequest"
              }
            }
          }
        }
      }
    },
    "/audio/translations": {
      "post": {
        "operationId": "createTranslation",
        "summary": "Translate audio",
        "description": "Multipart audio upload, non-empty and at most 25 MiB. Provider support and output behavior vary.",
        "tags": [
          "Audio"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/TranslationRequest"
              }
            }
          }
        }
      }
    },
    "/embeddings": {
      "post": {
        "operationId": "createEmbedding",
        "summary": "Create embeddings",
        "description": "Accepts a string or array of strings. Provider limits and model eligibility apply.",
        "tags": [
          "Embeddings"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbeddingResponse"
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmbeddingRequest"
              }
            }
          }
        }
      }
    },
    "/credits": {
      "get": {
        "operationId": "getCredits",
        "summary": "Get account credits",
        "description": "Private account information. Reset metadata is approximate and should not drive a countdown or entitlement decision.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditsResponse"
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/usage/{id}": {
      "get": {
        "operationId": "getRequestUsage",
        "summary": "Get request usage",
        "description": "Completion ID or request UUID. The authenticated account must own the request. Usage may not be final until completion.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageResponse"
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/discounts/my-discounts": {
      "get": {
        "operationId": "getMyDiscounts",
        "summary": "Get active discounts",
        "description": "Private account-specific discounts, pricing, and expiry.",
        "tags": [
          "Discounts"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscountsResponse"
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/discounts/eligible-models": {
      "get": {
        "operationId": "getDiscountEligibleModels",
        "summary": "Get discount-eligible models",
        "description": "Discount eligibility does not independently grant inference access or an active discount.",
        "tags": [
          "Discounts"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EligibleDiscountModelsResponse"
                }
              }
            }
          },
          "default": {
            "description": "Request, authentication, eligibility, or provider error. Error shapes can vary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "VoidAI API key or supported OAuth access token. Authorization takes precedence when both auth headers are supplied."
      },
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Alternative used only when Authorization is absent."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "reference_id": {
                "type": "string"
              },
              "timestamp": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "Model": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "model"
            ]
          },
          "owned_by": {
            "type": "string"
          },
          "endpoints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "plan_requirements": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Catalog plan metadata, not a complete account access decision."
          },
          "cost_type": {
            "type": "string",
            "enum": [
              "per_token",
              "fixed"
            ]
          },
          "base_cost": {
            "type": "number"
          },
          "input_multiplier": {
            "type": "number"
          },
          "output_multiplier": {
            "type": "number"
          },
          "cache_read_multiplier": {
            "type": "number"
          },
          "cache_write_multiplier": {
            "type": "number"
          },
          "long_context_threshold": {
            "type": "number"
          },
          "long_context_input_multiplier": {
            "type": "number"
          },
          "long_context_output_multiplier": {
            "type": "number"
          },
          "max_context_tokens": {
            "type": "number"
          },
          "max_output_tokens": {
            "type": "number"
          },
          "supports_streaming": {
            "type": "boolean"
          },
          "supports_tool_calling": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "object",
          "owned_by",
          "endpoints",
          "cost_type",
          "base_cost",
          "input_multiplier",
          "output_multiplier"
        ],
        "additionalProperties": true
      },
      "ModelList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Model"
            }
          }
        },
        "required": [
          "object",
          "data"
        ]
      },
      "ChatRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "Exact model ID from GET /models. Endpoint support and account eligibility are required."
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "enum": [
                    "system",
                    "developer",
                    "user",
                    "assistant",
                    "tool",
                    "function"
                  ]
                },
                "content": {
                  "oneOf": [
                    {
                      "type": "string",
                      "nullable": true
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      }
                    }
                  ]
                },
                "tool_calls": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {}
                  }
                },
                "tool_call_id": {
                  "type": "string"
                }
              },
              "required": [
                "role"
              ],
              "additionalProperties": true
            }
          },
          "stream": {
            "type": "boolean"
          },
          "stream_options": {
            "type": "object",
            "properties": {
              "include_usage": {
                "type": "boolean"
              }
            }
          },
          "temperature": {
            "type": "number"
          },
          "max_tokens": {
            "type": "number",
            "minimum": 1
          },
          "max_completion_tokens": {
            "type": "number",
            "minimum": 1
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "tool_choice": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              }
            ]
          },
          "response_format": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "text",
                  "json_object"
                ]
              }
            },
            "required": [
              "type"
            ]
          }
        },
        "required": [
          "model",
          "messages"
        ]
      },
      "ChatResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ]
          },
          "model": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "usage": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "MessagesRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "Exact model ID from GET /models. Endpoint support and account eligibility are required."
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant"
                  ]
                },
                "content": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      }
                    }
                  ]
                }
              },
              "required": [
                "role",
                "content"
              ],
              "additionalProperties": true
            }
          },
          "max_tokens": {
            "type": "number",
            "minimum": 1
          },
          "system": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                }
              }
            ]
          },
          "stream": {
            "type": "boolean"
          },
          "temperature": {
            "type": "number"
          },
          "top_p": {
            "type": "number"
          },
          "top_k": {
            "type": "number"
          },
          "stop_sequences": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "tool_choice": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "thinking": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "metadata": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          }
        },
        "required": [
          "model",
          "messages",
          "max_tokens"
        ],
        "additionalProperties": true
      },
      "CountTokensRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "Exact model ID from GET /models. Endpoint support and account eligibility are required."
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant"
                  ]
                },
                "content": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      }
                    }
                  ]
                }
              },
              "required": [
                "role",
                "content"
              ],
              "additionalProperties": true
            }
          },
          "system": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                }
              }
            ]
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "tool_choice": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "thinking": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": true
      },
      "MessagesResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "content": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "stop_reason": {
            "type": "string",
            "nullable": true
          },
          "usage": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "ResponsesRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "Exact model ID from GET /models. Endpoint support and account eligibility are required."
          },
          "input": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                }
              }
            ]
          },
          "instructions": {
            "type": "string"
          },
          "stream": {
            "type": "boolean"
          },
          "max_output_tokens": {
            "type": "number",
            "minimum": 1
          },
          "previous_response_id": {
            "type": "string",
            "nullable": true
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "reasoning": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "nullable": true
          },
          "text": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          }
        },
        "required": [
          "model"
        ],
        "additionalProperties": true
      },
      "CompactRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "Exact model ID from GET /models. Endpoint support and account eligibility are required."
          },
          "input": {
            "oneOf": [
              {
                "type": "string",
                "nullable": true
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                }
              }
            ]
          },
          "instructions": {
            "type": "string"
          },
          "previous_response_id": {
            "type": "string",
            "nullable": true
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "reasoning": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "nullable": true
          },
          "text": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          }
        },
        "required": [
          "model"
        ],
        "additionalProperties": true
      },
      "ResponsesResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "output": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "usage": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "ImageGenerationRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "Exact model ID from GET /models. Endpoint support and account eligibility are required."
          },
          "prompt": {
            "type": "string",
            "description": "Non-whitespace prompt. Model-dependent length limits apply."
          },
          "n": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "size": {
            "type": "string",
            "description": "Named size, auto, or custom WxH subject to gateway and model limits."
          },
          "quality": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "auto",
              "standard",
              "hd"
            ]
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ]
          },
          "output_compression": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "Only valid for JPEG or WebP."
          },
          "background": {
            "type": "string",
            "enum": [
              "transparent",
              "opaque",
              "auto"
            ],
            "description": "gpt-image-2 rejects transparent."
          },
          "moderation": {
            "type": "string",
            "enum": [
              "low",
              "auto"
            ]
          },
          "seed": {
            "type": "integer"
          },
          "stream": {
            "type": "boolean"
          },
          "partial_images": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3,
            "description": "Requires stream=true; streaming support depends on model/provider."
          },
          "user": {
            "type": "string"
          },
          "thinking": {
            "type": "string",
            "enum": [
              "off",
              "low",
              "medium",
              "high"
            ],
            "description": "Only supported for gpt-image-2 generation."
          },
          "style": {
            "type": "string",
            "enum": [
              "vivid",
              "natural"
            ],
            "description": "Rejected by gpt-image* models."
          },
          "response_format": {
            "type": "string",
            "enum": [
              "url",
              "b64_json"
            ],
            "description": "Rejected by gpt-image* models."
          }
        },
        "required": [
          "model",
          "prompt"
        ]
      },
      "ImageEditRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "default": "gpt-image-2",
            "description": "Exact supported edit model ID."
          },
          "prompt": {
            "type": "string",
            "description": "Non-whitespace prompt. Model-dependent length limits apply."
          },
          "n": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "size": {
            "type": "string",
            "description": "Named size, auto, or custom WxH subject to gateway and model limits."
          },
          "quality": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "auto",
              "standard",
              "hd"
            ]
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ]
          },
          "output_compression": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "Only valid for JPEG or WebP."
          },
          "background": {
            "type": "string",
            "enum": [
              "transparent",
              "opaque",
              "auto"
            ],
            "description": "gpt-image-2 rejects transparent."
          },
          "moderation": {
            "type": "string",
            "enum": [
              "low",
              "auto"
            ]
          },
          "seed": {
            "type": "integer"
          },
          "stream": {
            "type": "boolean"
          },
          "partial_images": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3,
            "description": "Requires stream=true; streaming support depends on model/provider."
          },
          "user": {
            "type": "string"
          },
          "image": {
            "type": "string",
            "format": "binary"
          },
          "image[]": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "binary"
            },
            "minItems": 1,
            "maxItems": 16
          },
          "mask": {
            "type": "string",
            "format": "binary"
          },
          "input_fidelity": {
            "type": "string",
            "enum": [
              "high",
              "low"
            ],
            "description": "Rejected by gpt-image-2."
          }
        },
        "required": [
          "prompt"
        ],
        "anyOf": [
          {
            "required": [
              "image"
            ]
          },
          {
            "required": [
              "image[]"
            ]
          }
        ]
      },
      "ImageResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "created": {
            "type": "number"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string"
                },
                "b64_json": {
                  "type": "string"
                },
                "revised_prompt": {
                  "type": "string"
                }
              }
            }
          }
        },
        "required": [
          "created",
          "data"
        ],
        "additionalProperties": true
      },
      "SpeechRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "Exact model ID from GET /models. Endpoint support and account eligibility are required."
          },
          "input": {
            "type": "string"
          },
          "voice": {
            "type": "string",
            "enum": [
              "alloy",
              "echo",
              "fable",
              "onyx",
              "nova",
              "shimmer"
            ]
          },
          "response_format": {
            "type": "string",
            "enum": [
              "mp3",
              "opus",
              "aac",
              "flac",
              "wav",
              "pcm"
            ]
          },
          "speed": {
            "type": "number",
            "minimum": 0.25,
            "maximum": 4
          }
        },
        "required": [
          "model",
          "input",
          "voice"
        ]
      },
      "TranscriptionRequest": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "Non-empty audio file, at most 25 MiB."
          },
          "model": {
            "type": "string",
            "default": "whisper-1"
          },
          "language": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "response_format": {
            "type": "string",
            "enum": [
              "json",
              "text",
              "srt",
              "verbose_json",
              "vtt"
            ],
            "default": "json"
          },
          "temperature": {
            "type": "number",
            "minimum": 0,
            "maximum": 2,
            "description": "Provider limits may be narrower."
          }
        },
        "required": [
          "file"
        ]
      },
      "TranslationRequest": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "Non-empty audio file, at most 25 MiB."
          },
          "model": {
            "type": "string",
            "default": "whisper-1"
          },
          "prompt": {
            "type": "string"
          },
          "response_format": {
            "type": "string",
            "enum": [
              "json",
              "text",
              "srt",
              "verbose_json",
              "vtt"
            ],
            "default": "json"
          },
          "temperature": {
            "type": "number",
            "minimum": 0,
            "maximum": 2,
            "description": "Provider limits may be narrower."
          }
        },
        "required": [
          "file"
        ]
      },
      "EmbeddingRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "Exact model ID from GET /models. Endpoint support and account eligibility are required."
          },
          "input": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "encoding_format": {
            "type": "string",
            "enum": [
              "float",
              "base64"
            ]
          },
          "dimensions": {
            "type": "number"
          }
        },
        "required": [
          "model",
          "input"
        ]
      },
      "EmbeddingResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "model": {
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "CreditsResponse": {
        "type": "object",
        "properties": {
          "current_credits": {
            "type": "number"
          },
          "daily_limit": {
            "type": "number"
          },
          "credits_used": {
            "type": "number"
          },
          "vault_credits": {
            "type": "number"
          },
          "plan": {
            "type": "string"
          },
          "last_reset": {
            "type": "string",
            "format": "date-time"
          },
          "reset_time": {
            "type": "string",
            "format": "date-time",
            "description": "Approximate metadata; not a reliable countdown for every account."
          },
          "reset_cycle_days": {
            "type": "number"
          }
        },
        "additionalProperties": true
      },
      "UsageResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "total_tokens": {
                "type": "number"
              },
              "input_tokens": {
                "type": "number"
              },
              "output_tokens": {
                "type": "number"
              }
            }
          },
          "credits_used": {
            "type": "number"
          },
          "latency_ms": {
            "type": "number"
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix timestamp in milliseconds."
          },
          "completed_at": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "description": "Unix timestamp in milliseconds."
          }
        },
        "additionalProperties": true
      },
      "DiscountsResponse": {
        "type": "object",
        "properties": {
          "active_discounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          },
          "has_discount": {
            "type": "boolean"
          },
          "eligible_models": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "next_rotation": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "info": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "EligibleDiscountModelsResponse": {
        "type": "object",
        "properties": {
          "eligible_models": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "count": {
            "type": "integer"
          },
          "info": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      }
    }
  }
}
