Base URL
All API requests should be made to:API_PATH environment variable (default: /api).
API Versioning
Currently, the API does not use explicit versioning in the URL path. All endpoints are accessible directly under the base URL.Request Format
All requests should include the following headers:Accept header to application/json if not provided.
Response Format
The API returns responses in JSON format following a consistent structure.Single Resource Response
When requesting a single resource, the response wraps the data in a resource-specific key:Collection Response
When requesting a collection of resources, the response includes pagination metadata:Available Resources
The API provides access to the following main resources:- Anime -
/anime- Anime series and movies - Artist -
/artist- Artists who perform theme songs - Song -
/song- Theme songs - Video -
/video- Video files of themes - Audio -
/audio- Audio files of themes - Theme -
/animetheme- Anime themes (OP/ED) - Entry -
/animethemeentry- Theme entries - Series -
/series- Anime series groupings - Studio -
/studio- Animation studios - Image -
/image- Cover images - External Resources -
/resource- External links (MAL, AniList, etc.)
Example Requests
Get All Anime
Get Specific Anime by ID
Get Anime with Related Resources
Search for Anime
HTTP Methods
The API supports the following HTTP methods:- GET - Retrieve resources (index and show)
- POST - Create new resources (requires authentication)
- PUT/PATCH - Update existing resources (requires authentication)
- DELETE - Soft delete resources (requires authentication)
Authentication
Most read operations (GET requests) do not require authentication. Creating, updating, or deleting resources requires authentication via Laravel Sanctum. Authenticated requests should include:Error Responses
Error responses follow a standard format:Common HTTP Status Codes
- 200 OK - Request successful
- 201 Created - Resource created successfully
- 400 Bad Request - Invalid request parameters
- 401 Unauthorized - Authentication required
- 403 Forbidden - Insufficient permissions
- 404 Not Found - Resource not found
- 422 Unprocessable Entity - Validation failed
- 429 Too Many Requests - Rate limit exceeded
- 500 Internal Server Error - Server error
Next Steps
- Learn about Pagination
- Explore Filtering and Query Parameters
- Understand Rate Limits