{"openapi":"3.1.0","info":{"title":"waypoint","description":"OpenAI-compatible router that routes each request to an Azure OpenAI deployment based on the incoming API key. Admin panel (mappings, request logs, event hook config) lives at /admin behind a single local admin login.","version":"1.0.0"},"paths":{"/v1/chat/completions":{"post":{"tags":["OpenAI-compatible API"],"summary":"Create a chat completion","description":"Identical request/response shape to OpenAI's own /v1/chat/completions. Requires Authorization: Bearer <key> (or an api-key header) matching a configured mapping; 'model' is used directly as the Azure deployment name.","operationId":"chat_completions_v1_chat_completions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or unrecognised API key. The request is dropped; no fallback route is used.","content":{"application/json":{"example":{"error":{"message":"Invalid API key.","type":"authentication_error","code":401}}}}},"400":{"description":"Malformed body, missing 'model' field, or 'model' doesn't match this key's mapping.","content":{"application/json":{"example":{"error":{"message":"This API key is only valid for model 'gpt-4o'.","type":"invalid_request_error","code":400}}}}},"502":{"description":"The configured Azure OpenAI endpoint could not be reached.","content":{"application/json":{"example":{"error":{"message":"Could not reach the configured Azure endpoint (https://your-resource.openai.azure.com).","type":"upstream_error","code":502}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","description":"Used directly as the Azure deployment name (passthrough). Must be in this key's allowed_models list, if one is configured."},"messages":{"type":"array","items":{"type":"object"},"description":"Standard OpenAI chat message list ({role, content}, ...)."},"stream":{"type":"boolean","default":false},"temperature":{"type":"number"},"top_p":{"type":"number"},"max_tokens":{"type":"integer"},"n":{"type":"integer"},"stop":{"type":["string","array","null"]},"presence_penalty":{"type":"number"},"frequency_penalty":{"type":"number"},"tools":{"type":"array","items":{"type":"object"}},"tool_choice":{},"response_format":{"type":"object"}}},"example":{"model":"gpt-4o","messages":[{"role":"user","content":"Hello!"}],"stream":false}}}}}},"/v1/completions":{"post":{"tags":["OpenAI-compatible API"],"summary":"Create a (legacy) text completion","description":"Identical request/response shape to OpenAI's legacy /v1/completions endpoint.","operationId":"completions_v1_completions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or unrecognised API key. The request is dropped; no fallback route is used.","content":{"application/json":{"example":{"error":{"message":"Invalid API key.","type":"authentication_error","code":401}}}}},"400":{"description":"Malformed body, missing 'model' field, or 'model' doesn't match this key's mapping.","content":{"application/json":{"example":{"error":{"message":"This API key is only valid for model 'gpt-4o'.","type":"invalid_request_error","code":400}}}}},"502":{"description":"The configured Azure OpenAI endpoint could not be reached.","content":{"application/json":{"example":{"error":{"message":"Could not reach the configured Azure endpoint (https://your-resource.openai.azure.com).","type":"upstream_error","code":502}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string","description":"Used directly as the Azure deployment name (passthrough). Must be in this key's allowed_models list, if one is configured."},"prompt":{"type":["string","array"]},"stream":{"type":"boolean","default":false},"temperature":{"type":"number"},"top_p":{"type":"number"},"max_tokens":{"type":"integer"},"n":{"type":"integer"},"stop":{"type":["string","array","null"]}}},"example":{"model":"gpt-35-turbo-instruct","prompt":"Once upon a time,","max_tokens":100}}}}}},"/v1/embeddings":{"post":{"tags":["OpenAI-compatible API"],"summary":"Create embeddings","description":"Identical request/response shape to OpenAI's own /v1/embeddings.","operationId":"embeddings_v1_embeddings_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or unrecognised API key. The request is dropped; no fallback route is used.","content":{"application/json":{"example":{"error":{"message":"Invalid API key.","type":"authentication_error","code":401}}}}},"400":{"description":"Malformed body, missing 'model' field, or 'model' doesn't match this key's mapping.","content":{"application/json":{"example":{"error":{"message":"This API key is only valid for model 'gpt-4o'.","type":"invalid_request_error","code":400}}}}},"502":{"description":"The configured Azure OpenAI endpoint could not be reached.","content":{"application/json":{"example":{"error":{"message":"Could not reach the configured Azure endpoint (https://your-resource.openai.azure.com).","type":"upstream_error","code":502}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string","description":"Used directly as the Azure deployment name (passthrough). Must be in this key's allowed_models list, if one is configured."},"input":{"type":["string","array"],"description":"Text (or array of texts/tokens) to embed."},"encoding_format":{"type":"string","enum":["float","base64"]}}},"example":{"model":"text-embedding-3-large","input":"The quick brown fox"}}}}}},"/v1/audio/transcriptions":{"post":{"tags":["OpenAI-compatible API"],"summary":"Transcribe audio","description":"Identical shape to OpenAI's own /v1/audio/transcriptions. multipart/form-data, not JSON. 'model' is used directly as the Azure deployment name.","operationId":"audio_transcriptions_v1_audio_transcriptions_post","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"string","format":"binary","description":"Audio file to transcribe/translate."},"model":{"type":"string","description":"Used directly as the Azure deployment name (passthrough). Must be in this key's allowed_models list, if one is configured."},"language":{"type":"string","description":"ISO-639-1 language code of the input audio (optional)."},"prompt":{"type":"string"},"response_format":{"type":"string","enum":["json","text","srt","verbose_json","vtt"]},"temperature":{"type":"number"}},"type":"object","required":["file","model"]}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or unrecognised API key. The request is dropped; no fallback route is used.","content":{"application/json":{"example":{"error":{"message":"Invalid API key.","type":"authentication_error","code":401}}}}},"400":{"description":"Malformed body, missing 'model' field, or 'model' doesn't match this key's mapping.","content":{"application/json":{"example":{"error":{"message":"This API key is only valid for model 'gpt-4o'.","type":"invalid_request_error","code":400}}}}},"502":{"description":"The configured Azure OpenAI endpoint could not be reached.","content":{"application/json":{"example":{"error":{"message":"Could not reach the configured Azure endpoint (https://your-resource.openai.azure.com).","type":"upstream_error","code":502}}}}}}}},"/v1/audio/translations":{"post":{"tags":["OpenAI-compatible API"],"summary":"Translate audio to English text","description":"Identical shape to OpenAI's own /v1/audio/translations. multipart/form-data, not JSON. 'model' is used directly as the Azure deployment name.","operationId":"audio_translations_v1_audio_translations_post","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"string","format":"binary","description":"Audio file to transcribe/translate."},"model":{"type":"string","description":"Used directly as the Azure deployment name (passthrough). Must be in this key's allowed_models list, if one is configured."},"prompt":{"type":"string"},"response_format":{"type":"string","enum":["json","text","srt","verbose_json","vtt"]},"temperature":{"type":"number"}},"type":"object","required":["file","model"]}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or unrecognised API key. The request is dropped; no fallback route is used.","content":{"application/json":{"example":{"error":{"message":"Invalid API key.","type":"authentication_error","code":401}}}}},"400":{"description":"Malformed body, missing 'model' field, or 'model' doesn't match this key's mapping.","content":{"application/json":{"example":{"error":{"message":"This API key is only valid for model 'gpt-4o'.","type":"invalid_request_error","code":400}}}}},"502":{"description":"The configured Azure OpenAI endpoint could not be reached.","content":{"application/json":{"example":{"error":{"message":"Could not reach the configured Azure endpoint (https://your-resource.openai.azure.com).","type":"upstream_error","code":502}}}}}}}},"/healthz":{"get":{"tags":["Operational"],"summary":"Liveness check","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}}}