REST API
The DeepChem Server REST API provides HTTP endpoints for all major operations. For interactive documentation, examples, and testing, visit http://localhost:8000/docs when your server is running.
Base URL
The default base URL is:
http://localhost:8000
All endpoints are relative to this base URL.
Interactive Documentation
Swagger UI: http://localhost:8000/docs
This provides:
Complete endpoint documentation with interactive testing
Request/response examples
Parameter descriptions and validation
Authentication details
Schema definitions
ReDoc: http://localhost:8000/redoc
Alternative documentation interface with:
Clean, readable documentation
Detailed schema information
Comprehensive API overview
Router Module Documentation
For detailed implementation information, the router endpoints are documented using auto-generated docstrings:
Response Formats
All API responses follow consistent JSON formats as documented in the interactive API documentation at http://localhost:8000/docs.
Error Handling
Common HTTP status codes:
Code |
Status |
Description |
|---|---|---|
200 |
OK |
Request succeeded |
400 |
Bad Request |
Invalid request parameters |
404 |
Not Found |
Resource not found |
422 |
Unprocessable Entity |
Validation error |
500 |
Internal Server Error |
Server error occurred |
For detailed error response formats and examples, visit http://localhost:8000/docs.
FastAPI Configuration
DeepChem Server is built with FastAPI. For server configuration, deployment, and advanced settings, refer to the FastAPI documentation.
Best Practices
Use the Interactive Documentation: Visit http://localhost:8000/docs for the most up-to-date API information
Test Endpoints Interactively: Use the “Try it out” feature in the Swagger UI
Check Response Schemas: Review the response examples in the documentation
Handle Errors Gracefully: Implement proper error handling in your client code
Consult DeepChem Documentation: For detailed featurizer information, refer to the DeepChem Featurizers documentation
For detailed examples, parameter descriptions, and interactive testing, always refer to http://localhost:8000/docs.