cURL
curl --request POST \ --url https://api.opper.ai/v3/functions/{name}/call \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "input": "<unknown>", "name": "<string>" } '
{ "data": "<unknown>", "meta": { "execution_ms": 123, "function_name": "<string>", "image_gen_calls": 123, "llm_calls": 123, "script_cached": true, "tts_calls": 123, "cost": 123, "generation_ms": 123, "guards": [ { "flagged": true, "type": "<string>", "findings": [ "<unknown>" ] } ], "message": "<string>", "model_warnings": [ "<string>" ], "models_used": [ "<string>" ], "pending_operations": [ { "id": "<string>", "status_url": "<string>", "type": "<string>" } ], "status": "<string>", "usage": { "input_tokens": 123, "output_tokens": 123, "cache_creation_1h_tokens": 123, "cache_creation_tokens": 123, "cache_read_tokens": 123, "reasoning_tokens": 123 } } }
Execute a function with the given input. If no cached script exists, one is generated automatically.
API key authentication. Pass your API key as a Bearer token.
Function name
Any value
Show child attributes
JSON Schema for the input. Optional; defaults to string when omitted.
JSON Schema for the output. Optional; defaults to string when omitted.
Successful response