Skip to content
Docs ·API endpoints

API endpoints

API routes and the OpenAPI specification

They all go after the https://alprouter.com/api/v1.

MethodAddress:KeysWhat they do
POST/chat/completionsIt’s necessary.Conversing (In OpenAI format)
GET · PUT · DELETE/memory/preferencesKey from an organization with Amem enabledRead, save and delete Amem preferences
POST/responsesIt’s necessary.Conversations (In OpenAI-style format)
POST/messagesIt’s necessary.Conversational form (Anthropic format, Claude model)
POST/messages/count_tokensIt’s necessary.Counting the number of input tokens
POST/embeddingsIt’s necessary.Turn text into vectors
POST/videosIt’s necessary.Submit a request for creating a video.
GET/videos/{id}It’s necessary.Status and fees of the video work
GET/videos/{id}/contentIt’s necessary.Receive the created video files
GET/videos/modelsWithout itVideo models and the parameters such as resolution, price, etc.
GET/modelsWithout itModel and Price List
GET/models/{Company}/{Model}/endpointsWithout itModels connected to the suppliers, and prices
GET/providersWithout itList of Suppliers
GET/generation?id=It’s necessary.One request’s usage and fees
GET · POST/keysManagement-relatedKey list, Key creation
GET · PATCH · DELETE/keys/{id}Management-relatedSeeing, fixing, and removing a key
GET/keyIt’s necessary.The amount and limits of the use of keys
GET/creditsIt’s necessary.Charged credits, used credits, remaining credits

OpenAPI File

The OpenAPI 3.1 file, which contains the format of the requests and responses, can be obtained from https://alprouter.com/api/v1/openapi.json. This file can be used when creating an API client or for reading by tools.

Being trapped within AI tools

The file that summarizes the document contents in text is located at https://alprouter.com/llms.txt.

Prompt security rules

Your organization sets separate policies for personal data and API keys. In Mask mode, only values that match the formats below are replaced. In Block mode, the request stops before it reaches the model. Checks include conversation history. Operator instructions and tool definitions can be excluded from personal data checks only.

ReplacementFormats checked
[EMAIL]ASCII email addresses
[PHONE]International numbers with a country calling code, plus Korean numbers with the prefixes 010, 011, 016–019, 02 and 070 and area codes 031–033, 041–044, 051–055 and 061–064. Korean numbers can use domestic or +82 notation and full-width digits.
[RRN]Hyphenated Korean resident and foreign resident registration numbers that encode a valid date of birth
[CARD]Card numbers that match an issuer range and length and pass the Luhn check
[API_KEY]AlpRouter, OpenAI and Anthropic keys, Anthropic OAuth tokens, AWS access key IDs, GitHub tokens, Google API keys, Slack tokens, Stripe live keys and PEM private keys (including JSON-escaped keys)

Key checks match formats without looking up whether a credential was issued. Personal data rules exclude names, addresses, passport numbers, driver’s license numbers, bank account numbers and unhyphenated 13-digit registration numbers. Attachments and text in images are outside the inspection scope.

Response headers

Injection flags cover user input and tool results after the last assistant turn. System instructions and earlier turns are skipped. Token counting uses the same scope. Transcription and video requests check the prompt. Embeddings skip injection checks.

HeaderMeaning/Interpretation
x-request-idIt’s used when looking up or asking about requests from the “request id” or “generation” category.
retry-afterTime to wait in seconds: 429 and 503
x-ratelimit-limitThe number of times this key can be pressed per minute
x-ratelimit-remainingIn this 1-minute period, the remaining times are:
x-ratelimit-resetTime remaining (in seconds) until the count is replenished again
x-alprouter-prompt-injectionIn Flag mode, a comma-separated list of matching injection rule IDs. Sent only when a rule matches.
x-alprouter-droppedItems that were removed from /messages and /responses before sending.