
Suno API Key: Create Credentials and Make a First Call
Get a Suno API key for reAPI, set Bearer authentication, send a first request in four languages, poll the result, and fix common key, balance, or task errors.
To get a Suno API key for the reAPI route, sign in to reAPI, open API Keys, and create a key. Send it as Authorization: Bearer <key> to https://reapi.ai/api/v1. It is a reAPI credential for reAPI endpoints, not a developer key issued by Suno.[1]
As of September 14, 2026, the official Suno material checked for this series points to a partner-interest application rather than a documented public self-service key flow. The official API status article covers that distinction. This guide follows the reAPI flow through creation, a first request and a completed audio result.[2]
TL;DR
- Create a key in reAPI's API Keys settings and save it when displayed; the authentication docs say the full key is shown only once.[1]
- Send a Bearer header from your server. A Suno website login or subscription is not this API credential.
- Submit
model: "suno-music"withversion: "V6"to the audio generation endpoint.[3] - Save the response's
id, then poll the task. HTTP 200 alone does not mean the music finished successfully.[4] - A completed song request costs 60 credits ($0.06) and covers two takes. Polling is free; check your account balance before submitting.[3]
Create a Suno API key for the reAPI route
You need a reAPI account, access to its API Keys settings, and enough credits for the operation you will submit. For the examples below, use a terminal, Python with requests, a Node.js runtime with built-in fetch, or Go. Choose one example; running all four creates four generation requests.
- Sign in and open API Keys settings.
- Click CREATE API KEY, the label observed on the live page. The authentication guide calls this “Create new key.”
- Give the key a recognizable name, such as
music-development. - Copy it when displayed and store it in your server's secret manager or a local environment file excluded from version control.[1]
Set REAPI_API_KEY in the environment of the process running the example. That name is our example variable, not a required API field. Do not paste a real key into the code, a browser bundle, a repository, a URL or a support message. The documented production prefix is rk_live_; rk_test_ with mock responses is still marked “coming soon,” so it is not an available free-test path in this guide.[1]
Send the first authenticated song request
All four examples submit the same inspiration-mode request. custom_mode: false makes prompt a song description; instrumental: false asks for vocals. The operation goes in model, and the generation version goes in version. Use the current snake_case field names.[3]
The examples set a 30-second network timeout, not a deadline for finishing the song. Generation continues asynchronously after submission. Each example checks HTTP errors and prints the returned task ID. They are alternative submission snippets; use the polling step afterward.
cURL
This version also uses jq to extract id. The environment variable must already contain your key.
: "${REAPI_API_KEY:?Set REAPI_API_KEY in your environment}"
curl --fail-with-body --silent --show-error --max-time 30 \
https://reapi.ai/api/v1/audio/generations \
-H "Authorization: Bearer $REAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "suno-music",
"version": "V6",
"custom_mode": false,
"instrumental": false,
"prompt": "An upbeat acoustic song about taking the first train home"
}' > suno-submit.json && jq -er '.id' suno-submit.jsonPython
Install requests if it is not already available. Save and run this from your server or local terminal.
import os
import requests
response = requests.post(
"https://reapi.ai/api/v1/audio/generations",
headers={"Authorization": f"Bearer {os.environ['REAPI_API_KEY']}"},
json={
"model": "suno-music",
"version": "V6",
"custom_mode": False,
"instrumental": False,
"prompt": "An upbeat acoustic song about taking the first train home",
},
timeout=30,
)
response.raise_for_status()
print(response.json()["id"])Node.js
Save as submit.mjs and run node submit.mjs with the environment variable set.
const key = process.env.REAPI_API_KEY;
if (!key) throw new Error("Set REAPI_API_KEY in your environment");
const response = await fetch("https://reapi.ai/api/v1/audio/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${key}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "suno-music",
version: "V6",
custom_mode: false,
instrumental: false,
prompt: "An upbeat acoustic song about taking the first train home",
}),
signal: AbortSignal.timeout(30_000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const task = await response.json();
if (!task.id) throw new Error("Submission response has no task id");
console.log(task.id);Go
Save as main.go and run go run main.go. This example uses the standard library.
package main
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"os"
"strings"
"time"
)
func main() {
if err := submit(); err != nil {
log.Fatal(err)
}
}
func submit() error {
key := os.Getenv("REAPI_API_KEY")
if key == "" {
return fmt.Errorf("set REAPI_API_KEY in your environment")
}
payload := `{"model":"suno-music","version":"V6","custom_mode":false,"instrumental":false,"prompt":"An upbeat acoustic song about taking the first train home"}`
req, err := http.NewRequest("POST",
"https://reapi.ai/api/v1/audio/generations", strings.NewReader(payload))
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+key)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{Timeout: 30 * time.Second}
resp, err := client.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
return err
}
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
return fmt.Errorf("HTTP %d: %s", resp.StatusCode, body)
}
var task struct { ID string `json:"id"` }
if err := json.Unmarshal(body, &task); err != nil {
return err
}
if task.ID == "" {
return fmt.Errorf("submission response has no task id")
}
fmt.Println(task.ID)
return nil
}Keep the task ID and poll until the audio is ready
Submission returns an envelope with id, model, status and created_at. The field to save is id, even though explanatory prose may call it a task ID. Do not parse a nonexistent top-level task_id from that response.[3]
Replace the placeholder below with your returned ID. This performs one status check; repeat it roughly every three seconds while the task is processing, with a client waiting limit appropriate to your application. The task reference recommends a paced polling cadence, and polling does not consume credits.[4]
: "${REAPI_API_KEY:?Set REAPI_API_KEY in your environment}"
TASK_ID='replace-with-the-returned-id'
curl --fail-with-body --silent --show-error --max-time 30 \
"https://reapi.ai/api/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $REAPI_API_KEY"Check the JSON status, not just the HTTP status:
processing: keep the ID and wait before polling again.completed: readoutput.audio_urlsand the documented Sunotracksrecords.failed: stop this polling loop and inspecterror.code,error.messageandusage.credits.[3][4]
The live production check for this series completed and returned two audio URLs. That validates one generation flow, not a latency benchmark or a guarantee that every request succeeds. Track url is guaranteed by the Suno reference; metadata such as track ID, lyrics and duration can be omitted when empty. Save IDs when present if later edits need them.[3]
If your local waiting limit expires after receiving an ID, keep polling that existing task later. Do not immediately create another generation just because your client stopped waiting. For long-term retention, copy completed audio to your own storage; the task contract does not promise permanent CDN retention.[4]
Fix authentication, balance and request errors
The public error reference separates HTTP failures from task failures. A found task can return HTTP 200 with status: "failed" and an 8xxxx error in its JSON body.[5]
| HTTP or task result | What to check | Next action |
|---|---|---|
401, 10001–10004 | Missing/malformed Bearer header, invalid or revoked key | Correct the header or replace the key |
400, 20002–20004 | Missing field, invalid value or wrong model for the endpoint | Use the audio endpoint, suno-music, version and current field names |
402, 30001 | Credits below the request cost | Check the account balance before another submission |
404, 40001 | Task absent or owned by another user | Use the returned ID and the matching account |
429, 50001 | Request rate exceeded | Wait according to Retry-After |
200 with status: "failed" | Workflow error in error.code | Read the task error; do not treat HTTP 200 as success |
Keep request_id when an error includes it, plus the request method and approximate time. These help investigate a failure without sharing your API key. Fix validation, authentication or balance errors before trying again.[5]
What free access and key rotation mean here
A key authenticates requests; it does not make generation free. A hypothetical $0.10 balance equals 100 credits. At 60 credits per completed song request, it covers one request and leaves 40 credits, which cannot fund a second full-song request. Check the account's actual promotional eligibility and available balance rather than assuming an unlimited free Suno API key.[3]
The Suno API pricing guide covers editing and export charges. If a key is exposed, revoke it in settings. For routine rotation, create a replacement, update the server secret, verify the new credential, then revoke the old one. The authentication docs state that already-pending tasks continue after revocation and can still bill credits; revocation blocks new requests rather than canceling those jobs.[1]
FAQ
Where do I get a Suno API key?
For the reAPI route, use API Keys settings. This creates a reAPI credential. Suno's official developer-interest form is a separate partner application, not this key flow.[1][2]
Does a Suno subscription include this key?
No. Your Suno subscription and reAPI account are separate. Use a credential issued by the service whose endpoint you call; see the official access explanation.
Can I get a free Suno API key for unlimited generation?
A credential is not unlimited credit. Check the available account balance and operation price. A $0.10 example balance funds one $0.06 song request, not ongoing free generation.[3]
How does Suno API authentication work on reAPI?
Send Authorization: Bearer <key> on both the generation POST and task GET requests. Keep the key on the server; it does not belong in the JSON prompt body.[1]
Why did I get HTTP 200 without a song?
Submission is asynchronous. Save id and poll until the JSON status is completed or failed. A polling response can be HTTP 200 even when the task failed.[4][5]
Does my key change when I switch to V6 Mini or Wild?
The Bearer authentication flow stays the same. Select V6_MINI or V6_WILD in version for a supported operation; do not replace model with the version name. The V6 integration guide explains the parameter rules.[3]
Finish with one completed request
A working Suno API key is only the first step. Keep the returned task ID, handle both terminal statuses and save the audio from a completed task. Once that small flow works, add custom lyrics, alternate V6 variants or follow-up edits using the Suno reference, with their parameter rules and fees in view.
References
- reAPI. Authentication and key management. Retrieved September 14, 2026 from Authentication; key-creation button also checked at API Keys.
- Suno. Developer API partner-interest application. Retrieved September 14, 2026 from official application.
- reAPI. Suno operation and version reference. Retrieved September 14, 2026 from Suno, Suno V6 and the public rate card.
- reAPI. Task polling reference. Retrieved September 14, 2026 from Tasks.
- reAPI. Error codes and handling. Retrieved September 14, 2026 from Errors.
Author

Categories
More Posts

Best-Value Seedance 2.0 API in 2026: Prices Compared
A matched Seedance 2.0 API price comparison across reAPI, Atlas, Replicate, fal, and WaveSpeed, including billing rules and best-value picks.


Is Wan 3.0 Open Source? Weights, API Access, and Local Use
Wan 3.0 has an API, but no official open weights as of August 23, 2026. See what is available, what is not, and when Wan 2.2 is the local option.


Midjourney V8.2 Features and the Nine Flags V8 Retired
Midjourney V8.2 dropped nine features V6 and V7 had, including Quality and Turbo. What still works, what silently falls back to V7, and what HD really costs.
