Quickstart
1. Get a funded API key
Create or reveal a key from your dashboard. Use a real key that starts with key_ and has remaining credit.
2. Send an OpenAI-style request
bash
curl https://dirtcheapai.com/api/v1/chat/completions
-H Content-Type: application/json
-H Authorization: Bearer key_xxx
-d '{
model: claude-sonnet-4.6,
messages: [
{ role: user, content: Write a Python factorial function. }
],
max_tokens: 512
}'3. Stream the response
bash
curl https://dirtcheapai.com/api/v1/chat/completions
-H Content-Type: application/json
-H Authorization: Bearer key_xxx
-N
-d '{
model: claude-haiku-4.5,
messages: [
{ role: user, content: Explain async and await in simple terms. }
],
stream: true,
max_tokens: 512
}'4. Check the model catalog
bash
curl https://dirtcheapai.com/api/v1/models
-H Authorization: Bearer key_xxx5. Check balance
bash
curl https://dirtcheapai.com/api/v1/balance
-H Authorization: Bearer key_xxx