.css-12p6n7x{overflow:auto;}.css-12p6n7x >*{margin-bottom:20px;margin-top:20px;}.css-12p6n7x >H2{margin-top:60px;}.css-12p6n7x >H3{margin-top:40px;}.css-12p6n7x>[id]{scroll-margin-top:20px;}@media (min-width: 660px){.css-12p6n7x>[id]{scroll-margin-top:100px;}}
When you're building your AI-powered app, you want the best output. But it's hard to objectively judge which model is better—especially if you want to build a user experience that feels warm and human. Coding and reasoning benchmarks aren't enough: sometimes, you need a model that "gets it" and can write in a natural-sounding way.
If OpenAI or Google models aren't giving you the warmth you need, you can turn to .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Anthropic's Claude. Marketed as the safest and most creative model, it's building a reputation for being a great writer. Even if you handle most of your app's reasoning with other models, using it to communicate with your users is a sure win.
In this guide, I'll give you a step-by-step tutorial on how to get a Claude API key, call the API, and get the responses where you want them.
.css-edievn{background-color:#f7f5f2;padding:15px;}@media (min-width: 660px){.css-edievn{padding:20px;}}
If you're looking to connect the Claude models to the apps you use at work, you can do it without any API setup. Learn more about .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}how Zapier can add AI to your existing workflows and .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}how to connect Claude to Zapier.
.css-8d7fph{color:#2d2e2e;font-family:”Degular”,Helvetica,arial,sans-serif;font-size:34px;line-height:40px;font-weight:600;letter-spacing:1px;}
Before you begin: How to use an API
I wrote this guide for people with a basic understanding of software, perhaps with some no-code experience. If this isn't you yet, you'll need more information to set up the API connections in this guide.
Start with Zapier's guide on .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}how to use an API, which will explain everything about calls, methods, and responses. On top of that, you'll want to familiarize yourself with the basics of JSON, a data notation system that helps computers communicate with each other without running into errors. (Tip: Ask ChatGPT to explain it to you like you're 12.)
If everything is ringing bells so far, let's press on.
Table of contents:
.css-12bavc3{color:#403f3e;list-style:disc;margin-left:10px;padding-left:10px;font-family:”Inter”,Helvetica,arial,sans-serif;font-size:16px;line-height:24px;font-weight:400;}@media (min-width: 660px){.css-12bavc3{font-family:”Inter”,Helvetica,arial,sans-serif;font-size:18px;line-height:31px;font-weight:400;}}
- .css-oiqntf{display:-webkit-box;display:-webkit-list-item;display:-ms-list-itembox;display:list-item;}.css-oiqntf::marker{color:#403f3e;}
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}What is the Claude API?
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}What can you do with the Claude API?
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Claude API pricing
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}How to set up Claude API connections
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Use Zapier to connect to Claude
What is the Claude API?
The Claude API lets you integrate Claude's AI models into your apps. You can send prompts to Anthropic (the company behind Claude) and get the outputs delivered to you wherever you need them: you can save them to your database, display them to your users, or use the output to run more complex logic.
Claude has three model families, in ascending order of quality and price:
-
Haiku, the fastest and most efficient model
-
Sonnet, the middle-weight for coding tasks and advanced reasoning
-
Opus, the expensive, most creative model out there
But as I'm writing this, the most powerful model is actually Claude 3.5 Sonnet, the one in the middle. Why's that? .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Sonnet was recently upgraded from version 3 to 3.5, while its siblings Haiku and Opus are still in version 3. That could change before you read this, so check out the .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}model specifications page.
Did you enjoy Claude 2? No problem: you can still access the legacy API endpoints to run Claude 2.1, 2.0, and Instant models.
What can you do with the Claude API?
.css-1thu8y4{color:#2d2e2e;font-family:”Inter”,Helvetica,arial,sans-serif;font-size:24px;line-height:30px;font-weight:700;}
Text generation
The first and most obvious use of the Claude API is for generating text. You can write short- or long-form content, ask questions about something, or summarize a large chunk of text. The Claude models have a large context window (conversational memory) of 200,000 tokens, roughly 160,000 words, which can help you dig deep into big files.
Vision
Claude can't generate images, but it can see them. If you want to ask questions about any image, you can send over an image file along with the text prompt.
Embeddings
Using the embeddings API, you can improve the model's understanding of the context of your prompt so it can deliver better outputs. For example, imagine you're building an AI text adventure and want to continue the story with the same elements every time. If you use the embeddings to set it to "beach", "sunny day," and "pirates," whenever the user asks to continue the story, the output will always contain those elements instead of others.
Here's a slightly more technical explanation: when you pass "beach," "sunny day," and "pirates" to the embeddings API, you're getting the vector representation of these concepts as the output. Then, when passing this representation to the message generation API along with the prompt, the model will lock in and use it to generate the response.
Tool use (function calling)
Claude can run actions across external systems via API with its function calling features. But Claude never runs this on the server side: instead, you'll have to configure the tool use on your application. This means that the user (or a system you create) will always have to trigger the external action: Claude will never run it by itself.
Content moderation
If you're dealing with user-generated content, such as a message board, you can use Claude to screen the messages for unsafe content. By passing the keywords or expressions you'd like to screen, you can flag harmful content or any other conversation elements, such as prompt leaks or discussing challenging topics that require moderator attention.
Model output evaluations (evals)
Once you implement a model with your system instructions and users start interacting with it, how do you know whether it's doing the job you want it to do? Enter evaluations (known as evals): a set of parameters you set to find out the quality of the outputs you're getting.
When you pass an output and a set of evals to Claude, it can judge whether the original AI model did a good job and score it accordingly. If you have multiple API calls with many system prompts, you can understand which ones you should work on first, which are working well, and which ones you should disable and rebuild.
Classification tasks
If you need to find the topics of books, sort 600 unique job titles into eight categories, or get a sentiment analysis of thousands of online reviews, Claude can help. Check out .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}the classification cookbook, and start building.
Browse the prompt library for inspiration
Anthropic dedicates an entire page to collecting .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}useful or interesting prompts to explore implementation options. You can see how to create anything from a .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}website wizard that writes the code for a new site to an .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}ethical dilemma navigator for all your trolley problems.
Brainstorm your use cases with the Workbench
.css-lgj0h8{display:grid;}
The Workbench helps you test your prompts before implementing them. (Access it after logging in to your Claude developer dashboard and clicking the Workbench link at the top of the screen.) You can change the system and user prompts and see the response on the right side of the screen. Above that response, experiment with the model settings to control how the generation process is handled.
Anthropic API pricing
The Claude API runs a pay-as-you-go model. Every time you send a request to Anthropic's servers, you'll pay based on the number of tokens in the prompt (input) and the response (output). The pricing for the input is lower than the output, always per million tokens (~750,000 words).
.css-hqbt9m{color:#2d2e2e;font-family:”Inter”,Helvetica,arial,sans-serif;font-size:24px;line-height:30px;font-weight:600;}
State-of-the-art model
Claude 3.5 Sonnet (best available at time of writing)
-
Input: $3 per million tokens
-
Output: $15 per million tokens
Claude version 3
Claude 3 Haiku (fast and light):
-
Input: $0.25 per million tokens
-
Output: $1.25 per million tokens
Claude 3.5 Opus (powerful):
-
Input: $15 per million tokens
-
Output: $75 per million tokens
Legacy models
Claude keeps some legacy models still running. You can still call them to see what results you get, even though the pricing is fairly high when compared with Haiku and Sonnet.
Claude 2.0 and 2.1:
-
Input: $8 per million tokens
-
Output: $24 per million tokens
Claude Instant:
-
Input: $0.80 per million tokens
-
Output: $2.40 per million tokens
Managing your Claude billing and credits
When creating a new developer account, you can get $5 free to play around with when you verify your account with a phone number. This credit is consumed every time you use the Workbench—the tool to try out new prompts—as well as any time you run an API call to Anthropic's servers. If you run out of credit, you won't get any responses, so be sure to keep your account topped up.
How to set up Claude API connections
Grab a coffee, turn off distractions, and let's make some magic.
.css-6u8c4f{color:#403f3e;list-style:decimal;margin-left:10px;padding-left:27px;font-family:”Inter”,Helvetica,arial,sans-serif;font-size:16px;line-height:24px;font-weight:400;}@media (min-width: 660px){.css-6u8c4f{font-family:”Inter”,Helvetica,arial,sans-serif;font-size:18px;line-height:31px;font-weight:400;}}
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Create an Anthropic account
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Add credits to your account
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Get your API key
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Start a new request
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Open the API documentation and reference
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Paste the endpoint
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Handle authentication
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Set up the HTTP method
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Set up the request body
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Call the AI model
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Pass your prompts
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Customize the response
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Integrate Claude into your apps
Step 1: Create an Anthropic account
First, go to the .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Anthropic console, and create a developer account.
Step 2: Add credits to your account
As I write this, you can claim $5 in free credits by verifying the account with a phone number. I have a UK-based mobile number, which isn't eligible for this offer, but I imagine most US-based numbers will work fine.
To take advantage of this offer, click the Claim button on the message at the top of the dashboard.
If you weren't lucky with the free credits offer or just want to add more to test for longer, you'll need to buy them upfront. To do so, click Settings at the top of the screen.
Then, click Plans & billing on the left-side menu.
When signing up for the account, you're placed in the Evaluation plan by default. We need to change that: click the Select Plan button.
There are two plans. The best one for building and testing out the API is the Build plan: click Continue to select it. The Scale plan is a better match for bigger businesses that need plenty of requests per minute—if your project evolves and you decide to stay with the Anthropic models, this option could improve user experience.
You can either make this a single-time payment or activate auto-reload: this will automatically fund the account once it drops below a certain level. Last note: taxes are paid separately and will be added at the end of the payment flow. New accounts can only use up to $100 worth of credits every month, but that limit will increase the more you use the API.
Once you complete these steps, your Plans & billing screen should look something like this:
Step 3: How to get a Claude API key
Still in the Settings tab, click API keys on the left-side menu.
Click Create Key.
Name your key, and click Create Key to finish the process.
Copy the key to a safe place—you won't be able to see it again once you close the pop-up.
Very important: You need to keep this API key safe at all times. If someone finds your key, they may use it themselves, consuming credits in the process. Don't share this key with anyone who doesn't need it, and if you're publishing an app to the public web, be sure to read up on API security best practices.
Once you close the pop-up, you'll see a list of all the API keys you generated so far. You can disable or delete them by clicking the three-dots icon on the right side.
Step 4: Start a new request
You have credits and an API key: you're ready to call Claude. To help you visualize how this works, I'm going to use Postman—an API design platform—to ask for a text generation task. You can use code, an .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}internal tool builder, or a .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}no-code app builder to get the job done, but if you want to follow along, create a free account in .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Postman.
After logging in to the dashboard, on the Send an API Request tab, click the New Request button.
Step 5: Open the API documentation and reference
Anthropic has rules on how you should make API calls, and you need to follow the structure and instructions to get a result without triggering any errors. There are two important resources you'll need to familiarize yourself with:
-
The API documentation, called .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}User Guides, offers general information about the API, what it can do, and how you can implement it in your projects.
-
The .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}API Reference is a technical reference that helps you set up a call, structure the requests, and see expected responses.
For testing purposes here, I'm going to ask for a text generation job. Here's the .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}API Reference article that discusses this topic. I'll be referring a lot to it, so you can keep it open on a tab on your browser if you're following along.
Step 6: Paste the endpoint
To call the Anthropic API, we need to point Postman to its URL: you can find it on the .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Authentication page.
Copy the endpoint URL (.css-b2d7nb{color:#666;background-color:#f2f2f2;padding:0.3em;}).
Open Postman, and paste the URL in the input field. The platform will suggest quick setup for Anthropic API, but I suggest you skip it: going the slow way now will help you understand how this works faster.
Step 7: Handle authentication
The API won't accept calls without knowing who's making them. This is why I generated an API key: I'll have to pass it with my call so Anthropic knows that I'm the one making this call and who to bill the work to.
Each API provider has different rules on how to handle nearly anything about their platform. The best option is always to pay attention to the documentation: in this case, to authenticate myself, I need to pass a value in the header of the call.
Let's add this. In Postman, below the endpoint input field in Postman, click Headers.
"All requests to the Anthropic API must include an x-api-key," so paste x-api key
into the key input field.
Then, in front of this key, paste the API key you generated before into the value input field. (You'll notice I've obfuscated the image below—I'm keeping my API key safe—but you'll be able to see everything on your Postman interface.)
Step 8: Set up the HTTP method
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Open the create message API reference article. Close to the top of the page, you'll see the HTTP method: in this case, it's the POST method.
Also, notice there's a URL suffix after the POST method: different API features may be served in other URLs, so always be sure you're contacting the right place. We've already pasted the appropriate endpoint in the previous steps, so you don't need to make any changes. But if you're running into errors, be sure to check this out.
Back in Postman, click the dropdown displaying the green GET and change it to the yellow POST.
Learning through mistakes
We've got the endpoint and the authentication ready. Let's make a few mistakes to understand how this works. Click the Send button, and see what happens.
The response appears at the bottom of the request interface. The Anthropic API returns an HTTP 400 Bad Request error, along with the message that it doesn't accept an empty request body. It's no surprise: we've only set up the endpoint and the authorization header, not the body.
Reading errors and understanding them is vital to building successful API calls. Don't get discouraged: always go back to the API documentation to find out what could be wrong, check all the syntax on the request, and use ChatGPT to help if you're completely lost.
Step 9: Set up the request body
Let's go back to the .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}API reference for creating messages. Take a look at the box to the right of the introduction.
This request includes a cURL for people using a command line to interact with the API. We won't need it: we're using Postman. Still, here's what each part means:
curl \
The curl command tells the system to contact the endpoint URL. The backslash at the end is a line break for cURL, used to improve readability.
--header "x-api-key: $ANTHROPIC_API_KEY" \
--header "anthropic-version: 2023-06-01" \
--header "content-type: application/json" \
The request passes three headers:
-
"x-api-key: followed by your API key handles authentication. We've already configured this in Postman.
-
"anthropic-version: 2023-06-01" states the appropriate system version.
-
"content-type: application/json" sets the content type of the request body so the system knows how to handle it.
Everything after the –data flag is the data of the request, also known as body or payload.
--data \
'{
"model": "claude-3-opus-20240229",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello, world"}
]
}'
-
"model": "claude-3-opus-20240229", points to the model you want to call. In this case, it's set to Claude 3 Opus, 29th of February version. .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}You can browse the full model list here and use the names in the column labeled "Latest 1P API model name." I recommend you pick Haiku for your first experiments—it's less expensive.
-
"max_tokens": 1024, sets the maximum output length for each response. In this case, it won't exceed approximately 768 words.
-
"messages": contains the message type along with the content.
-
"role": "user" sets this message type as a standard user prompt, much like using the Claude chatbot.
-
"content": "Hello, world" is the actual content of the user message.
-
I'm going to copy the entire request body JSON example without the --data
flag or the single quotes at the beginning or end.
Back in Postman, click Body followed by raw under the endpoint input field. Then, click on line 1 and paste the body there.
I don't want all my credits to fly away by calling the pricey Claude 3 Opus, so I'm going to change the model value to claude-3-haiku-20240307
. Copy and make sure to paste the model within the quotes (and be sure that the model's name syntax is correct).
Note for readers in the future: The model designation may change over time. If you're getting an error, please refer back to the .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}full model name list, copy the correct name, and paste it in the model parameter.
There's one additional thing we need to take care of: the request needs to pass the Anthropic version in the header. Under the endpoint input field, click on Headers again.
Under the x-api-key header:
-
write
anthropic-version
in the key input field, -
and write
2023-06-01
in the value field.
Another note for readers in the future: The Anthropic version may have changed since I wrote this. Please refer to the .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}create message API reference, look at the example request on the right side of the screen, and copy/paste the appropriate value into the anthropic-version parameter.
Step 10: Call the AI model
Hey Claude, pick up the phone. Click the Send button, and see what happens.
If you've followed the guide to the letter so far, you'll get an HTTP 200 OK status code, along with the response from Claude. I've highlighted both in the image below.
Step 11: Pass your prompts
We're in the game now, but this isn't useful if we can't pass our prompts. I'm going to do two things to customize the response:
-
Set a system message so I can choose Claude's role.
-
Change the user prompt to ask a different question.
I'll start by adding the system message. Scroll down the create message reference page until you can see the system parameter.
This snippet has important information:
-
system is the parameter's name. We need to pass it in the request body.
-
string means the API expects a sentence with any combination of text, letters, or characters connected to the parameter.
-
The instructions tell you more about how this works. In this case, there's an .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}entire guide to system prompts. (Heads up: the example on that page is structured in Python, not JSON. If you can't guess the correct syntax, paste the example in ChatGPT and ask to regenerate it into JSON.)
Back in Postman, click on Body. Then, under the "max_tokens" parameter, I'm going to add:
"system": "
You are an epic dungeon master. As you reply, invite the user to slay a dragon in an adventure.
",
You can replace the text in italics here with your system prompt. Be sure to check the syntax: the line must end with a comma after the closing quotes.
This is just the system message: it controls how Claude behaves, but it isn't a user prompt. I'll change the content of the user message to "What's the best thing to do when it's sunny?"
Click Send, and brace for untold adventure.
If you're following this guide to the letter so far, here's your reward: an HTTP 200 OK and an over-the-top rendition of dungeon master performance.
Step 12: Customize the response
Just like I added the system key, I can add other key/value pairs to customize the response. You can find instructions on how to do this on the .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}create a message API reference page.
For example, the temperature key adjusts the randomness of the response. Notice the instructions and the accepted value: it only works with a number between 0.0 and 1.0.
If you want to add this to the body, you can do so just below the "max_tokens" key/value pair. Two important notes here:
-
Number values don't need quotes around them.
-
Always finish each line with a comma.
Curious? You can click Send and see how that changes the output.
Step 13: Integrate Claude into your apps
Postman can only test APIs. If you're using a SaaS app that accepts a Claude key, the app will handle all the functionality without setting up calls—you just have to provide the API key.
But if you're using a no-code, .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}low-code, or internal tool builder, you'll need to follow the platform's directions on how to integrate the API. When connecting to external APIs, refer to the documentation of the platform you're using to make the calls. For example, the Bubble no-code builder has an .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}API connector detailing how to replicate the process I've just shown within their platform.
If your work apps don't offer an API connector, or you want to skip the tinkering and move straight to connections, you can instead .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}use Zapier to connect Claude to all the other apps you use. Learn more about .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}how to connect Claude to all your other apps with Zapier, or get started with one of these pre-made workflows.
Zapier is the leader in workflow automation—integrating with 6,000+ apps from partners like Google, Salesforce, and Microsoft. Use interfaces, data tables, and logic to build secure, automated systems for your business-critical workflows across your organization's technology stack. .css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Learn more.
Empower your apps with the Claude API
If safety and human feel are key for your project, the Claude model family is the best one. Even if the API lacks the breadth of features of other AI companies, the output quality is unique.
Setting up all the API calls you need can be difficult, especially if you're not used to the process. But don't get discouraged: with time and experimentation, you'll get there. Don't forget to refer back to the API reference and documentation and use ChatGPT to fix your JSON or help you through new calls.
Related reading:
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}Claude vs. ChatGPT: What's the difference?
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}How to write an effective AI prompt
-
.css-12hxxzz-Link{all:unset;box-sizing:border-box;-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;outline-offset:1px;-webkit-text-fill-color:currentColor;outline:1px solid transparent;}.css-12hxxzz-Link[data-color=”ocean”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”ocean”]:hover{outline-color:var(–zds-text-link-hover, #2b2358);}.css-12hxxzz-Link[data-color=”ocean”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”white”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”white”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”white”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”primary”]{color:var(–zds-text-link, #3d4592);}.css-12hxxzz-Link[data-color=”primary”]:hover{color:var(–zds-text-link, #2b2358);}.css-12hxxzz-Link[data-color=”primary”]:focus{color:var(–zds-text-link-hover, #3d4592);outline-color:var(–zds-text-link-hover, #3d4592);}.css-12hxxzz-Link[data-color=”secondary”]{color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-color=”secondary”]:hover{color:var(–zds-gray-warm-5, #a8a5a0);}.css-12hxxzz-Link[data-color=”secondary”]:focus{color:var(–zds-gray-warm-1, #fffdf9);outline-color:var(–zds-gray-warm-1, #fffdf9);}.css-12hxxzz-Link[data-weight=”inherit”]{font-weight:inherit;}.css-12hxxzz-Link[data-weight=”normal”]{font-weight:400;}.css-12hxxzz-Link[data-weight=”bold”]{font-weight:700;}The best ChatGPT alternatives