Get API key

Suno API: Prompts and scripts over one endpoint

Generate uncensored prompts, scripts, and metadata for your creative pipeline using one OpenAI-compatible endpoint. Our text API integrates directly into your existing SDK workflows without content filters.

https://api.sunoapis.com/v1uncensored

Authentication & Base URL

Our API uses standard OpenAI authentication. You only need an API key, which you generate on the Get API key page. No phone number or credit card is required to start; every new account receives $0.50 in trial credit valid for 7 days.

Set the base URL to https://api.sunoapis.com/v1 in your client configuration. The model identifier you must send in every request is uncensored. This is an open-weight model hosted on our own GPU servers, tuned for lawful adult and creative use without the refusals typical of major providers.

  • Base URL: https://api.sunoapis.com/v1
  • Model ID: uncensored
  • Auth Header: Authorization: Bearer YOUR_API_KEY

First Request

Get started immediately with a standard chat completion request. The endpoint accepts JSON payloads containing your system prompt, user instructions, and any metadata needed for your text-to-video or AI music pipeline.

This is a text-only API. It does not generate audio, video, or images; it generates the text instructions that drive those tools. Use this endpoint to script scenes, write lyrics, or extract structured data from your creative assets.

curl https://api.sunoapis.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
  }'

Python SDK

Integrate the API into your Python applications using the official OpenAI SDK. Since we are OpenAI-compatible, you can reuse your existing code by simply changing the base URL and API key.

This approach works for generating scripts for video generation tools or writing metadata for music APIs. Ensure your SDK version is up to date to support the streaming and function calling features described in the next sections.

from openai import OpenAI

client = OpenAI(base_url="https://api.sunoapis.com/v1", api_key="YOUR_KEY")

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)

Node SDK

For JavaScript/TypeScript developers, the @anthropic-ai/sdk or official openai package works with minor configuration adjustments. Point your client to our base URL and use the uncensored model ID.

This allows you to build server-side text generation for your creative apps. You can use this to preprocess user inputs or post-process generated scripts before sending them to your audio or video generation endpoints. The API returns standard JSON responses compatible with modern web frameworks.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.sunoapis.com/v1", apiKey: process.env.API_KEY });

const resp = await client.chat.completions.create({
  model: "uncensored",
  messages: [{ role: "user", content: "Draft a villain monologue for my game." }],
});
console.log(resp.choices[0].message.content);

Streaming Responses

For long scripts or detailed metadata, use Server-Sent Events (SSE) to receive tokens in real-time. Set stream: true in your request body. The API will send a series of chunks, allowing you to display text as it is generated.

This is particularly useful for interactive creative tools where users want to see the prompt evolving as it is written. Each chunk contains only the delta text, so you must concatenate the fragments to reconstruct the full response.

stream = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Tell the story in second person."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Limits, Errors & Context

Each account is limited to one API key, which can be regenerated at any time (revoking the old one). You are allowed 300 requests per minute per key, with a maximum request body size of 8 MB.

Common errors include 401 for invalid keys, 402 if you have insufficient prepaid credit, and 429 for rate limits. The model supports a 100,000-token context window for both input and output combined.

Content Note: The model does not refuse controversial or adult topics, but it strictly blocks sexual content involving minors in all requests.

Technical specifications

The numbers below are the real limits of this API, not marketing. Compare them with what your app needs.

ItemValue
API formatOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
Base URLhttps://api.sunoapis.com/v1
Model IDuncensored
EndpointsPOST /v1/chat/completions · GET /v1/models
API keyAuthorization: Bearer YOUR_KEY
Max context100,000 tokens (prompt + completion together)
Structured outputresponse_format: {"type": "json_object"}
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
StreamingSupported (stream: true), usage included at the end
Other parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Completion length16,000 tokens max; 2,048 if max_tokens is not set
Requests per minute300 requests per minute per key
Concurrency8 requests at the same time per key
Request sizeup to 8 MB per request
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Subscriptionno monthly fee; paid credit does not expire
Top-upUSDT (TRC20) or USDC (Base), any whole amount from $10 to $500
Free trial$0.50 of credit valid 7 days, no card needed
Price$0.25 per 1M input tokens · $1.00 per 1M output tokens
Bonus credit+5% on $50+, +10% on $100+
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Contentuncensored for adults; the only hard rule: no sexual content involving minors
Sign-insign in with Google or with e-mail + password
Key managementone active key per account; a new key replaces the old one

Errors and what to do

Errors come back as JSON with a stable type; failed and refused requests are not billed.

HTTPTypeWhat to do
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditout of credit; add credit and retry
403content_blockedsexual content involving minors — refused, not billed
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busymodel busy — retry in a few seconds

Questions and answers

Does this API generate audio or video?

No. This is a text-only API. It generates the prompts, scripts, and metadata that you can then send to audio or video generation tools. It does not produce media files itself.

How much does it cost?

You pay as you go with prepaid credit. The price is $0.25 per 1 million input tokens and $1.00 per 1 million output tokens. There are no monthly fees or subscriptions, and unused credit never expires.

Is the model GPT-4 or another vendor's model?

No. The model ID is <code>uncensored</code>. It is an open-weight model trained and hosted on our own GPU servers, independent of OpenAI, Anthropic, or other vendors.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API keyhttps://api.sunoapis.com/v1