{
  "openapi": "3.1.0",
  "info": {
    "title": "Runware API - Claude Haiku 4.5",
    "summary": "Fast, cost-efficient multimodal language model for low-latency agents and scaled reasoning workloads",
    "description": "Claude Haiku 4.5 is Anthropic's fastest and most cost-efficient Claude model. It is built for latency-sensitive applications, high-volume agents, sub-agent orchestration, coding assistance, and budget-conscious deployments that still need strong reasoning and multimodal understanding.",
    "version": "1.0.0",
    "x-model-id": "anthropic-claude-haiku-4-5",
    "x-status": "api-only",
    "x-creator": {
      "id": "anthropic",
      "name": "Anthropic",
      "logo": "https://assets.runware.ai/473b60db-1948-464c-b3fd-1edc00891c38.png"
    },
    "x-capabilities": [
      "text-to-text",
      "image-to-text"
    ],
    "x-released-at": "2025-10-15T00:00:00Z",
    "x-cover-image": "https://assets.runware.ai/22304c05-b40f-4152-bdc0-201bbbc7445d.jpeg"
  },
  "servers": [
    {
      "url": "https://api.runware.ai/v1",
      "description": "Runware REST API"
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Runware API Key (e.g., Bearer <your-key>)"
      }
    },
    "schemas": {
      "AuthenticationTask": {
        "title": "Authentication",
        "description": "Authenticates a connection using an API key. Can be sent as the first element of the request array as an alternative to using the Authorization header.",
        "type": "object",
        "x-response-schema": "https://schemas.runware.ai/responses/utilities/authentication.json",
        "properties": {
          "taskType": {
            "const": "authentication",
            "title": "Task Type",
            "description": "The type of task to perform."
          },
          "apiKey": {
            "title": "API Key",
            "description": "Your Runware API key.",
            "type": "string"
          },
          "connectionSessionUUID": {
            "title": "Connection Session UUID",
            "description": "Optional session UUID to resume a previous connection and receive any buffered results.",
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "taskType",
          "apiKey"
        ],
        "additionalProperties": false
      },
      "RequestBody": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "model": {
              "title": "Model",
              "description": "Identifier of the model to use for generation.",
              "type": "string",
              "const": "anthropic:claude@haiku-4.5"
            },
            "inputs": {
              "title": "Inputs",
              "description": "The unified payload wrapper for complex media assets dictating image, video or audio inference constraints.",
              "type": "object",
              "properties": {
                "documents": {
                  "title": "Documents",
                  "description": "Array of document inputs (UUID, URL, or Base64).",
                  "type": "array",
                  "minItems": 1,
                  "items": {
                    "title": "Document",
                    "description": "Document input (UUID, URL, or Base64).",
                    "type": "string",
                    "anyOf": [
                      {
                        "format": "uuid"
                      },
                      {
                        "format": "uri"
                      }
                    ]
                  }
                },
                "images": {
                  "title": "Images",
                  "description": "Array of image inputs (UUID, URL, Data URI, or Base64).",
                  "type": "array",
                  "minItems": 1,
                  "items": {
                    "title": "Image",
                    "description": "Image input (UUID, URL, Data URI, or Base64).",
                    "type": "string",
                    "anyOf": [
                      {
                        "format": "uuid"
                      },
                      {
                        "format": "uri"
                      },
                      {
                        "pattern": "^data:image\\/[a-zA-Z]+;base64,[a-zA-Z0-9+/=]+$"
                      },
                      {
                        "pattern": "^[a-zA-Z0-9+/=]+$"
                      }
                    ]
                  }
                }
              },
              "additionalProperties": false
            },
            "settings": {
              "title": "Settings",
              "description": "Global inference settings.",
              "type": "object",
              "properties": {
                "systemPrompt": {
                  "title": "System Prompt",
                  "description": "System-level instruction that guides the model's behavior and output style across the entire generation.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200000
                },
                "cache": {
                  "title": "Cache",
                  "description": "Prompt caching configuration. Caches designated parts of the request to reduce cost and latency on repeated calls.",
                  "type": "object",
                  "properties": {
                    "scope": {
                      "title": "Scope",
                      "description": "Controls which parts of the request are cached.",
                      "type": "string",
                      "default": "system+history",
                      "oneOf": [
                        {
                          "const": "system",
                          "description": "Cache the system prompt only."
                        },
                        {
                          "const": "system+history",
                          "description": "Cache the system prompt and conversation history up to the last user message."
                        }
                      ]
                    },
                    "ttl": {
                      "title": "TTL",
                      "description": "Time-to-live for the cache.",
                      "type": "string",
                      "default": "5m",
                      "enum": [
                        "5m",
                        "1h"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "maxTokens": {
                  "title": "Max Tokens",
                  "description": "Maximum number of tokens to generate in the response.",
                  "type": "integer",
                  "minimum": 1,
                  "default": 4096,
                  "maximum": 64000
                },
                "stopSequences": {
                  "title": "Stop Sequences",
                  "description": "Array of sequences that will cause the model to stop generating further tokens when encountered.",
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  "maxItems": 5
                },
                "thinkingLevel": {
                  "title": "Thinking Level",
                  "description": "Controls the depth of internal reasoning the model performs before generating a response.",
                  "type": "string",
                  "enum": [
                    "off",
                    "low",
                    "medium",
                    "high"
                  ]
                }
              },
              "additionalProperties": false
            },
            "messages": {
              "title": "Messages",
              "description": "Array of chat messages forming the conversation context.",
              "type": "array",
              "minItems": 1,
              "items": {
                "title": "Message",
                "description": "A single chat message with a role and content.",
                "type": "object",
                "properties": {
                  "role": {
                    "title": "Role",
                    "description": "The role of the message author.",
                    "type": "string",
                    "enum": [
                      "user",
                      "assistant"
                    ]
                  },
                  "content": {
                    "title": "Content",
                    "description": "The text content of the message.",
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "role",
                  "content"
                ],
                "additionalProperties": false
              }
            },
            "toolChoice": {
              "title": "Tool Choice",
              "description": "Controls how the model selects which tool to call. This only takes effect when `tools` are defined.\n\n**Examples**:\n\n**Let the model decide (default):**\n\n```json\n\"toolChoice\": {\n  \"type\": \"auto\"\n}\n```\n\n**Force a specific tool call:**\n\n```json\n\"toolChoice\": {\n  \"type\": \"tool\",\n  \"name\": \"get_weather\"\n}\n```\n\n**Require any tool call:**\n\n```json\n\"toolChoice\": {\n  \"type\": \"any\"\n}\n```\n\n[Read full documentation](https://runware.ai/docs/models/anthropic-claude-haiku-4-5#toolChoice)",
              "type": "object",
              "properties": {
                "type": {
                  "title": "Type",
                  "description": "Strategy the model uses to decide when and which tools to call.",
                  "type": "string",
                  "oneOf": [
                    {
                      "const": "auto",
                      "description": "The model decides whether to call a tool based on the conversation context. This is the recommended default."
                    },
                    {
                      "const": "any",
                      "description": "The model must call at least one tool but chooses which one. Useful when you always need structured output."
                    },
                    {
                      "const": "tool",
                      "description": "The model must call the specific tool identified by `name`. Use this to force a particular function call."
                    },
                    {
                      "const": "none",
                      "description": "The model will not call any tool, even if tools are defined. Useful for forcing a text-only response."
                    }
                  ]
                },
                "name": {
                  "title": "Name",
                  "description": "Name of the specific tool the model must call. Required when type is `tool`.",
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "if": {
                "properties": {
                  "type": {
                    "const": "tool"
                  }
                }
              },
              "then": {
                "required": [
                  "name"
                ]
              },
              "additionalProperties": false
            },
            "tools": {
              "title": "Tools",
              "description": "An array of tool definitions that the model may call during generation. The model can invoke one or more tools based on the conversation context, outputting structured calls with arguments instead of (or alongside) free-text.\n\nFor `function` tools, each definition requires:\n\n- **`type`**: `\"function\"`\n- **`name`**: Unique identifier (alphanumeric, hyphens, underscores; max 64 chars).\n- **`description`**: What the function does. The model uses this to decide when to call it.\n- **`schema`**: JSON Schema object describing the expected input arguments.\n\n> [!NOTE]\n> The `search` tool is executed server-side by the provider. You don't need to handle the tool result yourself.\n\n> [!NOTE]\n> The `codeInterpreter` tool is executed server-side by the provider. You don't need to handle the tool result yourself.\n\n**Examples**:\n\n**Function tool, weather lookup:**\n\n```json\n\"tools\": [\n  {\n    \"type\": \"function\",\n    \"name\": \"get_weather\",\n    \"description\": \"Get current weather for a city\",\n    \"schema\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"city\": { \"type\": \"string\", \"description\": \"City name\" }\n      },\n      \"required\": [\"city\"]\n    }\n  }\n],\n\"toolChoice\": { \"type\": \"auto\" }\n```\n\n**Built-in web search:**\n\n```json\n\"tools\": [\n  { \"type\": \"search\" }\n]\n```\n\n**Built-in code interpreter:**\n\n```json\n\"tools\": [\n  { \"type\": \"codeInterpreter\" }\n]\n```\n\n**Multiple function tools:**\n\n```json\n\"tools\": [\n  {\n    \"type\": \"function\",\n    \"name\": \"search_products\",\n    \"description\": \"Search the product catalog by query and filters.\",\n    \"schema\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"query\": { \"type\": \"string\" },\n        \"category\": { \"type\": \"string\" }\n      },\n      \"required\": [\"query\"]\n    }\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"add_to_cart\",\n    \"description\": \"Add a product to the user's shopping cart.\",\n    \"schema\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"productId\": { \"type\": \"string\" },\n        \"quantity\": { \"type\": \"integer\", \"minimum\": 1 }\n      },\n      \"required\": [\"productId\"]\n    }\n  }\n]\n```\n\n[Read full documentation](https://runware.ai/docs/models/anthropic-claude-haiku-4-5#tools)",
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "object",
                "properties": {
                  "type": {
                    "title": "Type",
                    "description": "The kind of tool to make available to the model. User-defined functions require `name` and `schema`, while built-in tools (`search`, `codeInterpreter`) are executed server-side by the provider.",
                    "type": "string",
                    "oneOf": [
                      {
                        "const": "function",
                        "description": "User-defined function tool. The model outputs the tool name and arguments. You execute the function locally and send results back."
                      },
                      {
                        "const": "search",
                        "description": "Built-in web search. The provider executes search server-side and enriches the response automatically."
                      },
                      {
                        "const": "codeInterpreter",
                        "description": "Built-in code execution sandbox (Python). The provider runs code server-side and returns results automatically."
                      }
                    ]
                  },
                  "name": {
                    "title": "Name",
                    "description": "Unique function name. Required for function tools.",
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9_-]+$",
                    "maxLength": 64
                  },
                  "description": {
                    "title": "Description",
                    "description": "Explanation of what the function does, used by the model to decide when to call it.",
                    "type": "string"
                  },
                  "schema": {
                    "title": "Schema",
                    "description": "JSON Schema object describing the function's input parameters.",
                    "type": "object",
                    "additionalProperties": false
                  }
                },
                "required": [
                  "type"
                ],
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "type": {
                          "const": "function"
                        }
                      }
                    },
                    "then": {
                      "required": [
                        "name",
                        "schema"
                      ]
                    }
                  }
                ],
                "additionalProperties": false
              }
            },
            "taskType": {
              "title": "Task Type",
              "description": "Identifier for the type of task being performed",
              "type": "string",
              "const": "textInference"
            },
            "taskUUID": {
              "title": "Task UUID",
              "description": "UUID v4 identifier for tracking tasks and matching async responses. Must be unique per task.",
              "type": "string",
              "format": "uuid"
            },
            "webhookURL": {
              "title": "Webhook URL",
              "description": "Specifies a webhook URL where JSON responses will be sent via HTTP POST when generation tasks complete. For batch requests with multiple results, each completed item triggers a separate webhook call as it becomes available.",
              "type": "string",
              "format": "uri"
            },
            "includeCost": {
              "title": "Include Cost",
              "description": "Include task cost in the response.",
              "type": "boolean",
              "default": false
            },
            "deliveryMethod": {
              "title": "Delivery Method",
              "description": "Determines how the API delivers task results.",
              "type": "string",
              "oneOf": [
                {
                  "const": "sync",
                  "description": "Returns complete results directly in the API response."
                },
                {
                  "const": "async",
                  "description": "Returns an immediate acknowledgment with the task UUID. Poll for results using getResponse."
                },
                {
                  "const": "stream",
                  "description": "Streams results token-by-token as they are generated."
                }
              ],
              "default": "sync"
            },
            "numberResults": {
              "title": "Number of Results",
              "description": "Number of results to generate. Each result uses a different seed, producing variations of the same parameters.",
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "maximum": 4
            },
            "includeUsage": {
              "title": "Include Usage",
              "description": "Include token usage statistics in the response.",
              "type": "boolean",
              "default": false
            }
          },
          "required": [
            "messages",
            "taskType",
            "taskUUID",
            "model"
          ],
          "additionalProperties": false
        },
        "description": "You must always POST an array of task objects."
      },
      "ResponseBody": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Unknown response structure"
            }
          }
        }
      },
      "ErrorResponse": {
        "title": "Error Response",
        "description": "Standard error response returned by the Runware API.",
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "code",
                "message"
              ],
              "additionalProperties": true,
              "properties": {
                "code": {
                  "type": "string",
                  "description": "A short identifier for the error (e.g., invalidApiKey, timeoutProvider)."
                },
                "message": {
                  "type": "string",
                  "description": "A human-readable explanation of what went wrong."
                },
                "parameter": {
                  "type": "string",
                  "description": "The request parameter related to the error, if applicable."
                },
                "taskType": {
                  "type": "string",
                  "description": "The task type of the request that failed."
                },
                "taskUUID": {
                  "type": "string",
                  "description": "The unique identifier of the failed request."
                },
                "documentation": {
                  "type": "string",
                  "description": "A link to relevant documentation."
                }
              }
            }
          }
        },
        "required": [
          "errors"
        ],
        "additionalProperties": false
      }
    }
  },
  "paths": {
    "/": {
      "post": {
        "summary": "Run Claude Haiku 4.5",
        "description": "Claude Haiku 4.5 is Anthropic's fastest and most cost-efficient Claude model. It is built for latency-sensitive applications, high-volume agents, sub-agent orchestration, coding assistance, and budget-conscious deployments that still need strong reasoning and multimodal understanding.",
        "operationId": "run_anthropic_claude_haiku_4_5",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseBody"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — Missing or invalid parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — No valid API key provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — Insufficient account balance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — The API key lacks permissions for this request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server Error — Something went wrong on Runware's end.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable — Temporarily unavailable (maintenance or capacity).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "apiKeyAuth": []
    }
  ]
}