API Reference
Tensorify provides a REST API for programmatic access to workflows and executions.
Authentication
All API requests require authentication via Bearer token.
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.tensorify.io/v1/workflows
Getting an API Key
- Go to your Dashboard Settings
- Navigate to API Keys
- Click Generate New Key
- Copy and store securely
Keep your API keys secret. Never commit them to version control or expose them client-side.
Base URL
https://api.tensorify.io/v1
Endpoints
Workflows
List Workflows
GET /workflows
Returns all workflows in your workspace.
Response:
{
"workflows": [
{
"id": "wf_abc123",
"name": "My Workflow",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T14:22:00Z"
}
]
}
Get Workflow
GET /workflows/:id
Returns a single workflow with full details.
Export Workflow
POST /workflows/:id/export
Generates and returns the Python code for a workflow.
Response:
{
"files": {
"main.py": "# Generated code...",
"utils.py": "# Helper functions...",
"requirements.txt": "openai>=1.0.0\n..."
}
}
Executions
Execute Workflow
POST /workflows/:id/execute
Runs a workflow on Tensorify cloud.
Request Body:
{
"gpu": false,
"inputs": {
"prompt": "Hello, world!"
}
}
Response:
{
"executionId": "exec_xyz789",
"status": "running"
}
Get Execution Status
GET /executions/:id
Returns the status and logs of an execution.
Response:
{
"id": "exec_xyz789",
"status": "completed",
"startedAt": "2024-01-15T10:30:00Z",
"completedAt": "2024-01-15T10:30:45Z",
"logs": ["Starting execution...", "Complete!"],
"output": { "result": "..." }
}
Rate Limits
| Plan | Requests/minute | | ---------- | --------------- | | Free | 60 | | Pro | 300 | | Enterprise | Custom |
Error Handling
Errors return appropriate HTTP status codes:
{
"error": {
"code": "WORKFLOW_NOT_FOUND",
"message": "Workflow wf_abc123 not found"
}
}
| Status | Meaning | | ------ | ------------ | | 400 | Bad request | | 401 | Unauthorized | | 404 | Not found | | 429 | Rate limited | | 500 | Server error |
SDKs
Official SDKs coming soon:
- Python SDK
- TypeScript/JavaScript SDK
More API docs: