Skip to content
NewRouters/Documentation
PLATFORM API

Common API

Discover LLM and media models, check the API key owner's points balance, retrieve media tasks, and inspect current model contracts.

Common API at a glanceIndependent queries
  1. Discover models01
    /v1/models · /v1/media-models

    Find model IDs, protocols and input parameters.

    GET
  2. Check balance02
    GET /v1/balance

    Use an API key to read the account’s points balance.

    Bearer API Key
  3. Retrieve a media task03
    GET /v1/tasks/{id}

    Retrieve task status and results by task ID.

    Bearer API Key

These endpoints support model discovery, integration checks and media task retrieval. The examples use the current brand’s API origin. Protected requests use Authorization: Bearer $API_KEY.

EndpointPurposeAuthentication
GET /v1/modelsCurrently callable LLM models and native protocolsPublic
GET /v1/media-modelsEnabled media models, input schemas and public price configurationPublic
GET /v1/balanceAPI key owner’s account points balanceBearer API key
GET /v1/tasks/{task_id}Retrieve one media taskBearer API key

All response examples show selected fields with illustrative values and IDs.

Terminal window
curl "https://newrouters.com/v1/models"
{
"data": [
{ "id": "MODEL_ID", "model": "MODEL_ID", "protocol": "openai" }
]
}

Use the returned id / model exactly. The protocol is openai, claude or gemini; follow the model’s native request format. Entries also include capabilities, context_limit and max_output_tokens. The public catalog reflects current supply, but does not grant your API key access to every listed model.

Terminal window
curl "https://newrouters.com/v1/media-models"
{
"data": [
{
"model": "MODEL_ID",
"type": "image",
"contract_version": 1,
"request_schema": { "type": "object" }
}
]
}

Lists enabled image, video or audio models, including display_name, description, request_schema and pricing. The schema describes task input, not the complete model + input envelope. Check required fields, enum values and constraints; public price configuration does not replace your account’s actual prices.

Terminal window
curl "https://newrouters.com/v1/balance" \
-H "Authorization: Bearer $API_KEY"

HTTP 200:

{ "points": "123.456789" }
FieldTypeMeaning
pointsdecimal stringPoints belonging to the API key owner’s account

This is the account’s points balance, not a currency amount or an individual key’s remaining limit. The response is directly { "points": "..." }, without a data wrapper. Missing or invalid keys return 401; a missing account returns 404. Preserve decimal precision when processing points.

Terminal window
curl "https://newrouters.com/v1/tasks/TASK_ID" \
-H "Authorization: Bearer $API_KEY"

Replace TASK_ID with the creation response’s id, not an upstream task ID. HTTP 200 means retrieval succeeded; inspect status to determine generation progress.

{
"id": "TASK_ID",
"status": "succeeded",
"model": "MODEL_ID",
"result": { "assets": ["https://example.com/output.png"] },
"error": null
}
statusAction
pendingAccepted; poll the same task
processingProcessing; poll the same task
succeededRead asset URLs from result.assets[]
failedRead error.code and error.message

The full response also includes type, request, point estimates and settlement fields, plus timestamps. Use a key belonging to the creating account. The creation endpoint’s 202 does not mean generation completed.

/v1/account/* endpoints belong to the session-authenticated dashboard; do not assume they accept Bearer API keys. For example, /v1/account/billing/usage requires a login session. Server-side balance checks use /v1/balance above.

Quickstart · Model guides