◈AskProxy AI
Sign in Get a key

API Reference

OpenAI-compatible. Point any OpenAI SDK at this base URL and it works. Every request is billed from your point balance at the same rates as the app — no separate pricing, no per-seat fee.

Base URL https://www.askproxygpt.com/v1 Keys are generated in Settings → Developer API

Authentication

Send your key as a bearer token. Keys look like apx_… and are shown once.

Authorization: Bearer apx_YOUR_KEY

Or pass api_key in the JSON body for tools that cannot set headers.

Quickstart

curl https://www.askproxygpt.com/v1/chat/completions \
  -H "Authorization: Bearer apx_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [{"role": "user", "content": "Explain Nigeria power sector in 3 bullets"}]
  }'
from openai import OpenAI

client = OpenAI(
    base_url="https://www.askproxygpt.com/v1",
    api_key="apx_YOUR_KEY",
)

r = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Hello"}],
)
print(r.choices[0].message.content)
import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://www.askproxygpt.com/v1',
  apiKey: 'apx_YOUR_KEY',
});

const r = await client.chat.completions.create({
  model: 'auto',
  messages: [{ role: 'user', content: 'Hello' }],
});
console.log(r.choices[0].message.content);

Endpoints

POST /v1/chat/completions

Chat completion. Supports stream: true (SSE), temperature, top_p, max_tokens, tools, response_format and stop. Send an OpenAI-style content array with image_url parts for vision.

Model: use "auto" to let AskProxy route to the best model for the message — cheapest for a quick question, strongest for hard reasoning, vision-capable when you send an image. Or pin any id from GET /v1/models.

Response headers on every call: X-AskProxy-Model, X-AskProxy-Points, X-AskProxy-Balance.

GET /v1/models

OpenAI-shaped model list. Add ?all=1 to include image, video and voice models.

curl https://www.askproxygpt.com/v1/models -H "Authorization: Bearer apx_YOUR_KEY"

Streaming

Set "stream": true. The final chunk carries usage and an x_askproxy block with the model used, points charged and remaining balance.

data: {"choices":[{"delta":{"content":"Hel"}}]}
data: {"choices":[{"delta":{"content":"lo"}}]}
data: {"choices":[{"delta":{},"finish_reason":"stop"}],"usage":{"prompt_tokens":9,"completion_tokens":2},"x_askproxy":{"model":"...","points":2,"balance":4812}}
data: [DONE]

Billing

Errors

{"error": {"message": "Invalid API key.", "type": "authentication_error", "param": null, "code": "authentication_error"}}

Rate limits

120 requests per minute per key by default.

CORS

All /v1/* routes send permissive CORS headers, so you can call them straight from a browser. OPTIONS preflight is handled.