{"record":{"id":"2bc92a1221667eb1","repo":"BerriAI/litellm","slug":"input-is-required-on-v1-embeddings-batch-reques","errorCode":null,"errorMessage":"`input` is required on /v1/embeddings batch requests, but was not provided","messagePattern":"`input` is required on /v1/embeddings batch requests, but was not provided","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/vertex_ai/files/transformation.py","lineNumber":482,"sourceCode":"\n    Note that `content` is singular (an `EmbedContentRequest`, not a\n    `GenerateContentRequest`) and that the `custom_id` round-trips through the top-level\n    `key`. An `EmbedContentRequest` returns exactly one vector, so an entry whose `input`\n    is an array fans out into one row per element and is reassembled on the way back.\n    The docs put the per-row config in an `embed_content_config` sibling of `request`,\n    but the API rejects that key outright and fails the whole batch job, so the config\n    fields go inside the `EmbedContentRequest` itself.\n\n    API Ref: https://cloud.google.com/vertex-ai/generative-ai/docs/embeddings/batch-prediction-genai-embeddings\n    \"\"\"\n    openai_request_body = openai_entry.get(\"body\")\n    if not isinstance(openai_request_body, dict):\n        raise TypeError(\n            \"`body` on /v1/embeddings batch requests must be a JSON object, but was missing or not an object\"\n        )\n    embedding_input = openai_request_body.get(\"input\")\n    if embedding_input is None:\n        raise ValueError(\"`input` is required on /v1/embeddings batch requests, but was not provided\")\n\n    elements = _openai_embedding_input_elements(embedding_input)\n    if not elements:\n        raise ValueError(\"`input` on /v1/embeddings batch requests must not be empty\")\n\n    embed_content_requests = tuple(\n        transform_openai_input_gemini_embed_content(\n            input=element,\n            model=openai_request_body.get(\"model\", \"\"),\n            optional_params=openai_request_body,\n        )\n        for element in elements\n    )\n    custom_id = openai_entry.get(\"custom_id\")\n    return tuple(\n        _vertex_embeddings_row(\n            key=None\n            if custom_id is None","sourceCodeStart":464,"sourceCodeEnd":500,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/vertex_ai/files/transformation.py#L464-L500","documentation":"Validation while transforming an /v1/embeddings batch entry: the body object contains no 'input', which is the text/content to embed, so the per-row EmbedContentRequest would be empty and the entry is rejected.","triggerScenarios":"Triggered when a /v1/embeddings batch request does not include the required 'input' field.","commonSituations":"See trigger scenarios.","solutions":["Include 'input' in the /v1/embeddings batch request body."],"exampleFix":"# add \"input\": \"text to embed\" to each request.","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}