Claude 3 Haiku
Claude 3 Haiku is Anthropic's fastest vision and text model for near-instant responses to simple queries, meant for seamless AI experiences mimicking human interactions.Claude 3 Haiku is Anthropic's fastest vision and text model for near-instant responses to simple queries, meant for seamless AI experiences mimicking human interactions.
All Claude 3 models can process images and return text outputs, and feature a 200K context window.
Enable the Vertex AI API.
Authenticate with one of the standard mechanisms documented here.
Note: It is always recommended to utilize the pinned version of the model to ensure consistent behavior and avoid potential disruptions to existing workflows when model updates occur.
The following is a sample prompt to the model. To learn more about the possible request parameters, see the Claude Messages API Reference.
Note that the API for Claude on Vertex differs from the Anthropic API documentation in the following ways:
"vertex-2023-10-16"
.Also note that the Anthropic Text Completions API is not available on Vertex AI.
Request JSON body:
For the media type field, Claude 3 models support image/png
, image/jpeg
, image/gif
, or image/webp
. The data part of the image is the file bytes encoded to a base64 string (e.g. base64 -i my_image.png
).
Set stream
to true to incrementally stream the response using server-sent events. Streaming substantially reduces end-user perception of latency, because the response is returned incrementally as it's generated.
Save the request body in a file named request.json and then execute the following command in Cloud Shell or a local terminal window with the gcloud CLI installed. Authenticate and replace PROJECT_ID
with your Google Cloud project ID.
Note: It is always recommended to utilize the pinned version of the model to ensure consistent behavior and avoid potential disruptions to existing workflows when model updates occur.
There are Anthropic SDKs available for Python and TypeScript.
To install the Anthropic Python SDK:
Authenticate with one of the standard mechanisms documented here.
To use the SDK:
To use the SDK to stream messages:
To use the SDK to process images:
This model supports the following set of features:
Claude models are general purpose large language models. They use a transformer architecture and are trained via unsupervised learning, RLHF, and Constitutional AI (including both a supervised and Reinforcement Learning (RL) phase). Claude 3 is trained with hardware supplied by Amazon Web Services (AWS) and Google Cloud Platform (GCP). Core frameworks include PyTorch, JAX, and Triton.
Claude 3 models are trained on a proprietary mix of publicly available information on the Internet as of August 2023 (see the Anthropic Claude 3 model card appendix for details regarding Claude 3.5 Sonnet's training data cutoff), as well as non-public data from third-parties, data that Anthropic's users or companies hired to provide data labeling and creation services voluntarily create and provide, and data Anthropic generates internally. Anthropic employs several data cleaning and filtering methods, including deduplication and classification to filter data.
For data Anthropic obtains by crawling public web pages, Anthropic follows industry practices with respect to robots.txt instructions and other signals that website operators use to indicate whether they permit crawling of the content on their sites. In accordance with Anthropic's policies, Anthropic does not access password-protected or sign-in pages or bypass CAPTCHA controls when accessing data to include in training sets, and Anthropic conducts diligence on the data that it uses. Anthropic operates its crawling system transparently, which means website operators can easily identify Anthropic visits and signal their preferences to Anthropic.
See Anthropic's Claude 3 model card for more details.
All Claude models have been tested pre-deployment with a suite of evaluations. These include capabilities evaluations – which help measure the model's skills, strengths, and weaknesses across a range of tasks – as well as safety and alignment evaluations, which evaluate whether the model poses specific risks and the degree to which the model conforms to the ethical and behavioral expectations set for it.
Anthropic conducted a comprehensive evaluation of the Claude 3 family to analyze trends in their capabilities across various domains. Anthropic's assessment included several broad categories:
Anthropic's most intelligent models outperform their peers on most of the common evaluation benchmarks for AI systems, including undergraduate level expert knowledge (MMLU), graduate level expert reasoning (GPQA), basic mathematics (GSM8K) and more. They exhibit near-human levels of comprehension and fluency on complex tasks, leading the frontier of general intelligence.
Anthropic's academic benchmark evaluations cover reasoning, reading comprehension, math, science, grammar, and coding. Broadly Anthropic finds that Claude 3 models are stronger than previous models at coding and math, as evidenced by their scores in evaluations, often achieving SOTA in benchmarks such as the following, including undergraduate level expert knowledge (MMLU), graduate level expert reasoning (GPQA), basic mathematics (GSM8K) and more (bolded values are SOTA):
Benchmark |
Claude 3.5 Sonnet |
Claude 3 Opus |
Claude 3 Sonnet |
Claude 3 Haiku |
Undergraduate level knowledge MMLU |
90.4% 5-shot CoT 88.7% 5-shot |
86.8% 5-shot |
79.0% 5-shot |
75.2% 5-shot |
Graduate level reasoning GPQA, Diamond |
59.4% 0-shot CoT |
50.4% 0-shot CoT |
40.4% 0-shot CoT |
33.3% 0-shot CoT |
Grade school math GSM8K |
96.4% 0-shot CoT |
95.0% 0-shot CoT |
92.3% 0-shot CoT |
88.9% 0-shot CoT |
Math problem-solving MATH |
71.1% 0-shot CoT |
60.1% 0-shot CoT |
43.1% 0-shot CoT |
38.9% 0-shot CoT |
Multilingual math MGSM |
91.6% 0-shot |
90.7% 0-shot |
83.5% 0-shot |
75.1% 0-shot |
Code HumanEval |
92.0% 0-shot |
84.9% 0-shot |
73.0% 0-shot |
75.9% 0-shot |
Reasoning over text DROP, F1 score |
87.1 3-shot |
83.1 3-shot |
78.9 3-shot |
78.4 3-shot |
Mixed evaluations BIG-Bench-Hard |
93.1% 3-shot CoT |
86.8% 3-shot CoT |
82.9% 3-shot CoT |
73.7% 3-shot CoT |
Benchmark |
Claude 3.5 Sonnet |
Claude 3 Opus |
Claude 3 Sonnet |
Claude 3 Haiku |
Math & reasoning MMMU (val) |
68.3% |
59.4% |
53.1% |
50.2% |
Document visual Q&A ANLS score, test |
95.2% |
89.3% |
89.5% |
88.8% |
Math MathVista (testmini) |
67.7% CoT |
50.5% CoT |
47.9% CoT |
46.4% CoT |
Science diagrams AI2D, test |
94.7% |
88.1% |
88.7% |
86.7% |
Chart Q&A Relaxed accuracy (test) |
90.8% 0-shot CoT |
80.8% 0-shot CoT |
81.1% 0-shot CoT |
81.7% 0-shot CoT |
Claude can understand and output a wide variety of languages, such as French, Standard Arabic, Mandarin Chinese, Japanese, Korean, Spanish, and Hindi. Performance will vary based on how well-resourced the language is.
See Anthropic's Claude 3 model card for further details about Claude models.
Image & text input: With state of the art vision capabilities, Claude 3 models can process images and return text outputs to analyze and understand charts, graphs, technical diagrams, reports, and other visual assets.
Text output: Claude 3 models can output text of a variety of types and formats, such as prose, lists, Markdown tables, JSON arrays, HTML, code in various programming languages, and more.
Resource ID | Release date | Release stage | Description |
---|---|---|---|
claude-3-haiku@20240307 | 2024-01-29 | Preview Release | Prompt Caching |
claude-3-haiku@20240307 | 2024-12-17 | Preview Release | Token Counting |
claude-3-haiku@20240307 | 2024-03-19 | General Availability |
Google Cloud Console has failed to load JavaScript sources from www.gstatic.com.
Possible reasons are:
Version History API - Prod
Powerful and easy-to-use privacy and compliance APIs that interact with the Checks product and its underlying technology. Privacy policy service can be used to analyze privacy policies at scale with AI by mapping unstructured legalese text to privacy categories, extract named entities, and evaluate the context and relationships. This is a partner-only service -- reach out to checks-support@google.com for access. More services are coming soon! To request early access, visit checks.google.com
Get data from the same database used by Google Maps. Places features over 100 million businesses and points of interest that are updated frequently through owner-verified listings and user-moderated contributions. Place search Return a list of places based on a user’s location or search string. Place details Return detailed information about a specific place, including user reviews. Place autocomplete can be used to automatically fill in the name and/or address of a place as you type. Query autocomplete can be used to provide a query prediction service for text-based geographic searches, by returning suggested queries as you type. Place photos gives you access to the millions of Place related photos stored in Google's Place database. Places SDK for Android and Places SDK for iOS allow you to build location-aware apps that respond contextually to the local businesses and other places near the device.
firebasevertexai.googleapis.com API.
dataprocrm.googleapis.com API
kubernetesmetadata.googleapis.com API.
workloadcertificate.googleapis.com API.
telemetry.googleapis.com API.
listallowedkids.googleapis.com API.
policyremediator.googleapis.com API.
readerrevenuesubscriptionlinking.googleapis.com API.
contrails.googleapis.com API.
playgrouping.googleapis.com API.
firebaseextensionspublisher.googleapis.com API.
searchresearcherresults.googleapis.com API.
A toolkit for publishing add-ons, Drive apps, Chat apps, and other integrations on the Google Workspace Marketplace.
The Address Validation API allows developers to verify the accuracy of addresses. Given an address, it returns information about the correctness of the components of the parsed address, a geocode, and a verdict on the deliverability of the parsed address. Your use of the Address Validation API is subject to all applicable terms, including Service Specific Terms regarding the potential for information sharing with the United States Postal Service®.
Data lineage lets you track how data moves through your systems: where it comes from, where it is passed to, and what transformations are applied to it. Learn more
The new version of the Google Places API gives you access to more than 200 million businesses and points of interest, including an expanded list of place details and types. Show users new place attributes such real-time data for EV charging stations, wheelchair accessible establishments, and whether a restaurant allows dogs. Updates also include an enhanced search experience, modern security with OAuth-based authentication, and simplifications to pricing. Text search : Search for place information based on a text string. Nearby search : Search for matching place types within a specified area. Place details : Return detailed information about a specific place, including user reviews. Place photo : Return the most relevant photos for a place from Google users and business owners.
Google Distributed Cloud (GDC) Hardware Management allows customers to create and manage orders for Distributed Cloud Edge (GDCE) racks. Create orders for new GDCE racks View and provide information for orders through a CIQ (Customer Intake Questionnaire) Track progress of pending orders Communicate with Google teams supporting the orders through comments View change history of orders
AlloyDB for PostgreSQL is an open source-compatible database service that’s a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99% availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases.
Note that we now highly recommend new customers to use Retail API, which incorporates the GA version of the Recommendations AI funtionalities. To enable Retail API, please visit https://console.cloud.google.com/apis/library/retail.googleapis.com. The Recommendations AI service enables customers to build end-to-end personalized recommendation systems without requiring a high level of expertise in machine learning, recommendation system, or Google Cloud.
Places UI Kit is an easy-to-use and cost-effective component library that renders Google Maps-like visuals out-of-the-box while offering customizations to match the look and feel of your brand. Uses the same data that powers the Google Maps Platform Places API.
The Gemini API allows developers to build generative AI applications using Gemini models. Gemini is our most capable model, built from the ground up to be multimodal. It can generalize and seamlessly understand, operate across, and combine different types of information including language, images, audio, video, and code. You can use the Gemini API for use cases like reasoning across text and images, content generation, dialogue agents, summarization and classification systems, and more.
Perform common functions that are available on the Channel Services console at scale, like placing orders and viewing customer information.
App Hub is a Google Cloud product that allows users to track applications, services, and workloads across their Google Cloud projects. It also offers a consolidated view of the application landscape by extracting metadata from resources. App Hub helps to simplify complex infrastructures, improve management efficiency, and clarify ownership of hidden services.
With the Google Drive Activity API, you can retrieve information about a user's Google Drive activity. This provides additional functionality on top the Google Drive API for your app to display activity on a user's files, track changes to specific files or folders, or alert a user to new comments or changes to files.
The Play Integrity API helps you check that you're interacting with your genuine app on a genuine Android device powered by Google Play services. The Play Integrity API has replaced SafetyNet Attestation and Android Device Verification.
Publicly accessible APIs that allows firebase in-app messaging SDKs/Clients to communicate with servers for fetching message definitions.
Routes API helps you find the ideal way to get from A to Z or matrices of origin and destination locations, with comprehensive data and real-time traffic. It provides routes for driving, two-wheel vehicles, walking or biking and calculates travel times and distances. Routes API is the next generation version (v2) of the Directions and Distance Matrix APIs.
With the Poly API, you can access Google's growing collection of creative commons 3D assets and interact directly with poly.google.com to search, download, and import objects dynamically across desktop, mobile, virtual reality, and augmented reality. You can find all types of assets for your applications, and easily search for them by keyword, category, format, popularity or date uploaded. You can even filter by model complexity, or give people a personalized experience by letting them sign into your app with their Google account to access any assets they’ve uploaded or liked on Poly. If you'd like your application to upload 3D assets to Poly, you can request to be whitelisted for this access. Third-party assets available through the Poly API are licensed through the Creative Commons license. When using any third-party assets in your project, you are required to give proper attribution. For more information about licensing, refer to https://developers.google.com/poly/develop#licensing . By using the API, you agree to use assets in compliance with their licensing requirements.
Connect your Google Workspace Marketplace applications with Google's licensing and billing services.
Provides access to information about profiles and contacts.
Place an interactive map or Street View panorama on your site with a simple HTTP request using the Maps Embed API. Set the Embed API URL as the src attribute of an iframe to easily embed the map in your webpage or blog.
Access Google’s 2D and Photorealistic 3D Map Tiles for building immersive map visualizations. Note that 2D Basemap (Roadmap), Satellite, Terrain, and Street View Tiles are available to customers with specific imagery visualization use cases.
The Gmail Postmaster API is a RESTful API that provides programmatic access to email traffic metrics (like spam reports, delivery errors etc) otherwise available through the Gmail Postmaster Tools UI currently.
Manage Google Workspace and related licenses for all users of a customer that you manage.
Create apps for Google Chat.
Convert addresses into geographic coordinates (geocoding), which you can use to place markers or position the map. This API also allows you to convert geographic coordinates into an address (reverse geocoding).
Place a Google Maps image on your webpage without requiring JavaScript or any dynamic page loading with the Maps Static API. This service creates your map based on URL parameters sent through a standard HTTP request and returns the map as an image.