API Guide
🚀Welcome to Shodo API documentation🚀
Command
You can use Shodo's API from shodo command. For example, you can proofread Japanese in a Markdown file.
$ pip install shodo
$ shodo login
$ shodo lint README.md
For more details, refer shodo command's README.
API root
Specify Organization slug and project name.
https://api.shodo.ink/@{organization}/{project}/
Authorization
First, issue Bearer tokens in the "API integration" settings page of Shodo's project.
Specify the token on Authorization header.
Authorization: Bearer {token}
Lint/Proofreading API
This is API to proofread Japanese texts.
API URL:https://api.shodo.ink/@{organization}/{project}/lint/
POST a Japanese body to the proofreading API. Up to 40,000 characters are allowed.
{
"body": "校正する本文"
}
Option:
type
: Specifybody
type astext
(text, Markdown),html
(HTML). (Default istext
)llm
: Enable linting by LargeLanguageModel by specifying1
. Disabled by default (This is Beta version feature)
Response
{
"lint_id": "6d639e5f-8bfe-43d7-ac24-8bb6b97ba936",
"monthly_amount": 1000000,
"current_usage": 116049,
"len_body": 8429,
"len_used": 8112
}
Shodo runs proofreading asynchronously.
The lint_id
is used to get results of proofreading.
For example, you can use httpie to call this API.
$ http -A bearer -a d8eb...3359 https://api.shodo.ink/@org/project/lint/ text="校正する本文"