Start
AlphaNeural API
One API key and one balance for every model in the catalogue, behind an OpenAI-compatible endpoint that also keeps your conversations, routes between models under a spend ceiling, and itemises what each task cost.
AlphaNeural serves every model in its catalogue through one OpenAI-compatible API. You hold one key and one prepaid balance, and you change models by changing a string.
Two base URLs
| Base URL | What it is | Use it for |
|---|---|---|
https://backend.alfnrl.io/v1 | The AlphaNeural API: OpenAI-compatible, plus threads, routing and cost traces. | Start here. Chat completions, and anything that needs memory, routing or a cost breakdown. |
https://proxy.alfnrl.io/v1 | The raw gateway: stateless and OpenAI-compatible. | Routes the AlphaNeural API does not serve, such as embeddings and image generation. See The raw gateway. |
Both take the same API key and draw on the same balance. The AlphaNeural API forwards every model call to the gateway with your own key, so which models you can reach, any budget on the key, and how usage is metered are the same whichever one you call.
What the AlphaNeural API adds
Point an OpenAI client at https://backend.alfnrl.io/v1 and it works unchanged. Three things become available on top, none of which a gateway or a provider gives you when you call it directly:
- Threads. Send a thread id and the server keeps the conversation. Each request carries only the new message, the server fits the history to whichever model you name, and the conversation follows you when you switch models halfway through, so a client never has to re-send, trim or re-tokenise a transcript. See Threads and memory.
- Routing with a spend ceiling. Send
alphaneural/autoas the model and the server tries a cheap model first, checks the answer, and escalates to a stronger one only when the check fails, never past the ceiling you set in dollars. Or name your own ladder. Routers that pick a model from the prompt are guessing; this one has seen the answer. See Routing. - Cost traces. Tag requests with a task id, then read back what each step cost, margin included, and an estimate of what one baseline model would have cost instead: the number that says whether the routing paid for itself. See Cost traces.
Endpoints
| Method | Path | |
|---|---|---|
POST | /v1/chat/completions | Chat completions |
GET | /v1/models | Models |
GET | /v1/threads | List your threads |
GET | /v1/threads/{thread_id} | Read a thread |
GET | /v1/tasks | List your tasks |
GET | /v1/tasks/{task_id}/trace | Cost traces |
Every endpoint authenticates with Authorization: Bearer and your API key. See Authentication.
Where to go next
- Quickstart: a key, a first call, and the same conversation continued on another model.
- Billing: how prices work, what a
402means, and where to check what you spent. - Use the OpenAI SDK: the Python and TypeScript SDKs, including threads, routing and traces.