CodeWords API key
Overview
The CodeWords API lets any external application trigger your workflows with simple HTTP requests. Whether you're building a web app, mobile app, or connecting to third-party services, it's as easy as making a POST request.
Getting your API key
First things first — you'll need credentials. Grab your API key from the Codewords account dashboard.
Your API key will be under the Advanced tab within API keys & Environment variables section:
cwk-for standard reusable keys (most common)cwotk-for one-time keys (extra security for sensitive operations)
Treat your API key like a password, keep it secret and store it as an environment variable.

How the API works
Base URL: https://runtime.codewords.ai
The endpoints you'll use:
Quick tasks:
POST /run/{serviceId}(under two minutes)Heavy lifting:
POST /run_async/{serviceId}(up to 30 minutes)Check results:
GET /result/{request_id}(for async calls)Watch progress:
GET /logs/{request_id}(live streaming)Upload files:
POST /file(when your workflow needs files)
Authentication: Just add "Authorization: Bearer {YOUR_API_KEY}" to your headers.
Quick synchronous calls
Perfect for automations that finish fast (under two minutes). Your request waits for the result and gets it back immediately.
Using cURL
Python example
Install the CodeWords client first:
JavaScript/TypeScript example
Install the client:
Asynchronous calls for heavy lifting
For automations that need more time (up to 30 minutes), use async execution. You'll get a request ID immediately, then check back for results.
Using cURL
Python example
TypeScript example
Working with files
When your CodeWords automation needs file inputs, upload them first and pass the download URLs.
Upload and process pattern
Integrating with web apps
Here's how to add CodeWords to a Flask web application:
Error handling best practices
Make your API calls bulletproof with smart retry logic:
FAQ
Last updated
Was this helpful?