Quick Start
Get your first response in under 60 seconds.
Step 1 — Get an API key
If you haven't already, follow our authentication guide to create your first API key.
Step 2 — Make your first request
Use any of the following code examples to make your first completion request:
P
Postman Collection
Download and import to test all endpoints instantly.
curl
curl -X POST https://api.nascentist.ai/v1/complete \
-H "Authorization: Bearer nsc_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "def fibonacci(n):",
"max_tokens": 200,
"temperature": 0.2
}'Python
import requests
response = requests.post(
"https://api.nascentist.ai/v1/complete",
headers={"Authorization": "Bearer nsc_live_YOUR_KEY"},
json={
"prompt": "def fibonacci(n):",
"max_tokens": 200,
"temperature": 0.2
}
)
print(response.json()["content"])Node.js
const response = await fetch("https://api.nascentist.ai/v1/complete", {
method: "POST",
headers: {
"Authorization": "Bearer nsc_live_YOUR_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
prompt: "def fibonacci(n):",
max_tokens: 200,
temperature: 0.2
})
})
const data = await response.json()
console.log(data.content)Step 3 — Try the Agent Fix endpoint
The Agent Fix endpoint is our flagship feature. It can automatically fix broken code by:
- Executing your code in a sandbox
- Reading the actual error messages
- Generating and applying fixes
- Re-executing to verify the fix works
Example: Submit broken code and get it fixed automatically.
curl
curl -X POST https://api.nascentist.ai/v1/agent/fix \
-H "Authorization: Bearer nsc_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"code": "def add(a, b):\n return a + b\n\nprint(add(1, "2"))",
"language": "python"
}'Next steps
Now that you've made your first requests, explore the full API:
- POST /v1/complete — Standard code completion
- POST /v1/agent/fix — Agentic code fixing
- POST /v1/agent/review — Code review
- Rate Limits — Plan limits and quotas