Overview
Learn how to programmatically create and manage Devin sessions using our REST API
The Devin API lets you integrate Devin into your own applications, automate workflows, and build powerful tools.
The Devin API is currently in alpha. While we strive to maintain backward compatibility, some endpoints may change as we improve the API.
Get an API key
You can obtain an API key from your settings page.
Keep your API keys secure and never share them in publicly accessible areas such as GitHub repositories or client-side code.
Available Endpoints
Our API provides several endpoints for managing Devin sessions and files:
Create a Session
Start a new Devin session with a task description and optional parameters
Get Session Details
Retrieve information about an existing session’s status and output
Send Message
Interact with an active session by sending messages to Devin
Upload Files
Upload files for Devin to work with during sessions
Usage Examples
View Code Examples
Check out our code examples and common use cases to get started quickly with the Devin API
Idempotency
The Devin API supports idempotent operations to safely handle retries and prevent duplicate operations. When an endpoint supports idempotency, you can set the idempotent
parameter to true
in your request. The response will include an is_new_session
field indicating whether a new resource was created.
For example, when creating sessions with idempotency enabled, retrying the same request will return the existing session instead of creating a duplicate one. This is particularly useful in unreliable network conditions or when implementing retry logic in your applications.
Support
For questions about the API or to report issues, email support@cognition.ai.