File: ai-api-call-error.md | Updated: 11/15/2025
Menu
v5 (Latest)
AI SDK 5.x
Model Context Protocol (MCP) Tools
AI_TooManyEmbeddingValuesForCallError
AI_UnsupportedFunctionalityError
Copy markdown
======================================================================================================
This error occurs when an API call fails.
url: The URL of the API request that failedrequestBodyValues: The request body values sent to the APIstatusCode: The HTTP status code returned by the APIresponseHeaders: The response headers returned by the APIresponseBody: The response body returned by the APIisRetryable: Whether the request can be retried based on the status codedata: Any additional data associated with the errorYou can check if an error is an instance of AI_APICallError using:
import { APICallError } from 'ai';
if (APICallError.isInstance(error)) { // Handle the error}
On this page
Deploy and Scale AI Apps with Vercel.
Vercel delivers the infrastructure and developer experience you need to ship reliable AI-powered applications at scale.
Trusted by industry leaders: