5 min setup
Quickstart
Generate your first AI image in 5 minutes
Before you start
- You need a Core.Today account (free signup)
- 50 credits are automatically granted on signup
- You need curl or Python/JavaScript environment
1
Get your API Key
Get your API key from the dashboard. API keys start with cdt_
API keys are shown only once when created. Copy and save it securely.
2
Set Environment Variable
Setting the API key as an environment variable keeps it out of your code.
# # Add to ~/.bashrc or ~/.zshrc
export CORE_API_KEY="cdt_your_api_key_here"
# # Apply changes
source ~/.bashrc3
Generate your first image
Let's generate your first AI image with FLUX Schnell model. It's the fastest and most affordable model.
curl -X POST https://api.core.today/v1/predictions \
-H "Content-Type: application/json" \
-H "X-API-Key: $CORE_API_KEY" \
-d '{
"model": "flux-schnell",
"input": {
"prompt": "A cute robot learning to paint, digital art style"
}
}'The response returns a job_id
4
Check the result
Open the generated image URL in your browser to see the result. Or test directly in the Playground.
Response example
{
"id": "pred_abc123",
"status": "succeeded",
"output": [
"https://cdn.core.today/outputs/abc123/output.png"
],
"metrics": {
"total_time": 2.5
}
}Congratulations!
You successfully generated your first AI image. Now try other models!
Next Steps
Pro Tips
- 1
Use the Playground
Test various prompts and models in the Playground before writing code.
- 2
Use output_folder
Organizing results by project makes them easier to find later.
- 3
Use Webhooks
Using webhooks instead of polling lets you receive completion notifications in real-time.