Generate Custom Function
AI-generate a custom function from a natural language description
Request Body
Response
Example Request
Notes
- The generated code includes a
xpander_run_action(...)entry point - Review the generated code before creating the function
- You can provide
user_functionto improve existing code, orimport_curlto convert a cURL command
Authorizations
API Key for authentication
Body
Request model for AI-generating a custom function from a description.
Provide a natural language description of what you need, and the AI will generate the Python source code with proper xpander_run_action signature.
Natural language description of what the function should do. Examples: 'Calculate compound interest given principal, rate, and years', 'Parse a CSV string and return the headers and first 5 rows'.
Optional existing source code to improve or modify. The AI will use this as a starting point.
Optional cURL command to convert into a custom function. The AI will parse the cURL and generate a function that makes the equivalent HTTP request.
Response
Successful Response
Response from the AI custom function generator.
Generated Python source code defining xpander_run_action(...).

