Responses & tools
#Responses shim
POST /v1/responses — a minimal implementation of the OpenAI Responses API, mapped onto the chat pipeline (non-streaming). It accepts an input and returns an output / output_text, so clients written against the Responses API can target Relay for simple cases.
curl -X POST http://localhost:5300/v1/responses \
-H "Authorization: Bearer $RELAY_API_KEY" -H "Content-Type: application/json" \
-d '{ "model": "gpt-4o", "input": "Give me three store-opening checklist items." }'
The response contains an output array and a convenience output_text. Under the hood this runs the same routing/telemetry pipeline as chat completions.
For streaming, tool loops, and full feature coverage, prefer
/v1/chat/completionsor the agents endpoint.
#Tool registry
GET /v1/tools — returns the function-tool registry in OpenAI tool shape, so an app can discover the tools available to advertise to a model:
{ "object": "list", "data": [
{ "type": "function", "function": { "name": "get_order_status", "description": "…", "parameters": { "type": "object", "properties": { "order_id": { "type": "string" } }, "required": ["order_id"] } } }
] }
Tools are authored in the panel under Tools and attached to agents. When an agent is backed by an MCP server, Relay executes matching tool calls itself; otherwise the tool_calls are handed back to your app to execute. See Skills, tools & MCP.