Start using the Draftify API in seconds and integrate our powerful reasoning AI models into your applications.
The Draftify API allows you to easily integrate the smartest AI models available on our
platform (such as
opus-4.8-level, opus 4.6-level, opus 4.7-level fable-5-level, or sonnet-4.6-level) directly intoyour own software. This quickstart guide will walk you through the initial setup and show you how to make
your very first API request.
Prerequisites
Before you begin, you must have:- An active Draftify account (From Free plan) - A Draftify API Key (you can generate this in your Dashboard under Settings > API
Keys). - Node.js (v18+) or Python (v3.8+) installed, depending on your preferred development
environment. Note: Your subscription plan (Free, Pro, or Scale) does not restrict API access, but it does determine your maximum context limit (e.g., up to 10,000,000 characters for Scale
users).
Get started
1
Get your API Key
Log into your Draftify account, navigate to the Dashboard, and create a new API key.
You will need to include this key in the headers of your HTTP requests (
variables (e.g., in a
You will need to include this key in the headers of your HTTP requests (
Authorization: Bearer <TOKEN>).Tip: Never share your API key publicly and always keep it secure in environmentvariables (e.g., in a
.env file)!2
Your first request (cURL)
The fastest way to test the API is by making a request from your terminal. Send a
simple message to the
simple message to the
sonnet-4.6-level model:3
Use it in Python
If you are working with Python, you can use the built-in
your prompts.
requests library to sendyour prompts.
Python
4
Use it in Next.js / Node.js
In a modern web application (like a Next.js API Route), here is how you can securely
call the Draftify API from your backend using the native
call the Draftify API from your backend using the native
fetch API.Next.js (App Router)
Next steps
Now that you have successfully integrated the API, you can explore more advanced features: - Read the Models documentation to find out which model is best suitedfor your specific use case. - Learn about Streaming to display AI responses to your users in real-
time.
