Run a first OriginStartAI OpenAI-compatible API call from a Claude Code workflow, then turn the working call into product code.
This starter is for terminal-first developers who want a tiny repo Claude Code can inspect, modify, and extend without pulling in a heavy SDK or framework.
- Create an account: https://originstartai.com?utm_source=github&utm_medium=repo&utm_campaign=claude_code_starter
- Create an API key in the OriginStartAI console.
- Copy
.env.exampleto.env. - Set
ORIGINSTARTAI_API_KEY,ORIGINSTARTAI_BASE_URL, andORIGINSTARTAI_MODEL. - Run Python or Node.js:
python examples/python/first_call.pynode examples/node/first_call.mjsNew user bonus: after your first call works, recharge $5 and get $5 extra API credits to test a real workflow.
Use curl first when you only want to confirm that the API key, base URL, and model are valid:
curl "$ORIGINSTARTAI_BASE_URL/chat/completions" \
-H "Authorization: Bearer $ORIGINSTARTAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "'"$ORIGINSTARTAI_MODEL"'",
"messages": [
{"role": "user", "content": "Say hello from OriginStartAI"}
]
}'- Claude Code friendly project layout.
- OpenAI-compatible request shape.
- Python and Node.js first-call examples.
- Minimal files that are easy to copy into an existing app.
- Clear next step from first call to a small paid production-style test.
Open this repo in Claude Code and use one of these prompts after the first call succeeds:
Add a product support reply example using the existing OriginStartAI client style.
Convert this single API call into a reusable helper with retries and clear error messages.
Add a streaming example that prints tokens as they arrive and handles timeout errors.
| Symptom | Check |
|---|---|
401 Unauthorized |
Confirm the API key in .env is current and has no extra spaces. |
insufficient credits |
Recharge in the OriginStartAI console, then retry the same command. |
model not found |
Copy the enabled model name from the console into ORIGINSTARTAI_MODEL. |
timeout |
Retry with a shorter prompt, then add retry and timeout handling before production use. |
ORIGINSTARTAI_API_KEY=your_api_key_here
ORIGINSTARTAI_BASE_URL=https://YOUR_PUBLIC_API_BASE_URL/v1
ORIGINSTARTAI_MODEL=YOUR_ENABLED_MODELDo not commit .env or real API keys.
After the first call works, use the companion trust assets before moving a coding workflow into production:
- Estimate monthly spend with
ai-api-cost-calculator. - Measure latency and success rate with
ai-gateway-benchmark. - Add a lightweight health check with
originstart-status-examples.
This path keeps the workflow practical: first call, cost estimate, benchmark, health check, then production usage.
- Claude Code API starter.
- OpenAI-compatible API starter.
- AI API first call.
- Chat completions from terminal.
- LLM workflow starter.