Run AI-powered education tasks via HTTP. Research, curriculum resources, blog posts, SEO content, and strategy briefs — on demand.
All API requests are made to:
https://ed-agent.com
Authenticate every request with your API key in the x-api-key header. API keys use the format edagent_xxxxxxxxxx.
# Example header
x-api-key: edagent_your_key_here
Run a quick research task with curl:
curl -X POST https://ed-agent.com/api/tasks/quick_research \
-H "Content-Type: application/json" \
-H "x-api-key: edagent_your_key_here" \
-d '{"input": "metacognitive strategies in secondary schools"}'
Example response:
{
"ok": true,
"result": "## Metacognitive Strategies in Secondary Schools\n\n...",
"taskType": "quick_research",
"amountUsd": 0.5,
"creditsUsed": 0.5
}
Use the task ID as the :taskType path parameter when calling POST /api/tasks/:taskType.
| Task ID | Name | Price | Input (the input field) |
|---|---|---|---|
| quick_research | Quick Research | $0.50 | Topic to research |
| curriculum_resource | Curriculum Resource | $3.00 | Topic (pass options.year_group for year group) |
| blog_post | Blog Post / Article | $5.00 | Blog post title |
| seo_content | SEO Content | $4.00 | Topic for SEO content |
| strategy_brief | Strategy Brief | $8.00 | Strategic topic or challenge |
You can also fetch this list dynamically:
GET /api/tasks
Run an AI education task. The response includes the completed content as a string.
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
| input | string | Yes | The topic, title, or subject for the task |
| options | object | No | Task-specific options. For curriculum_resource: { year_group: "Year 8" } |
Success response (200):
| Field | Type | Description |
|---|---|---|
| ok | boolean | Always true on success |
| result | string | The AI-generated content |
| taskType | string | The task type that was run |
| amountUsd | number | Amount charged in USD |
| creditsUsed | number | Same as amountUsd |
Curriculum resource example (with options):
curl -X POST https://ed-agent.com/api/tasks/curriculum_resource \
-H "Content-Type: application/json" \
-H "x-api-key: edagent_your_key_here" \
-d '{
"input": "The Water Cycle",
"options": { "year_group": "Year 6" }
}'
List all available task definitions.
curl https://ed-agent.com/api/tasks \
-H "x-api-key: edagent_your_key_here"
Get usage summary for an API key. Returns total calls, total spend, and a per-task breakdown.
curl https://ed-agent.com/api/usage/edagent_your_key_here \
-H "x-api-key: edagent_your_key_here"
{
"ok": true,
"apiKey": "edagent_****",
"totalCalls": 12,
"totalSpendUsd": 18.50,
"breakdown": [
{ "taskType": "quick_research", "calls": 8, "spendUsd": 4.00 },
{ "taskType": "blog_post", "calls": 2, "spendUsd": 10.00 }
]
}
All errors return { "ok": false, "error": "..." } with an appropriate HTTP status code.
| Status | Error | Cause |
|---|---|---|
| 401 | Invalid API key | Missing or unrecognised x-api-key header |
| 400 | Body must include a non-empty "input" string | Missing or blank input field in request body |
| 404 | Unknown task type: ... | :taskType not in the list of supported tasks |
| 429 | Rate limit exceeded | More than 10 requests per minute on this key |
| 500 | Task failed. Please try again. | OpenAI or internal error |
Each API key is limited to 10 requests per minute. The counter resets every 60 seconds. If you need higher limits, email c3po@ed-agent.com.
API access is available to developers and businesses integrating C3PO education AI into their products.
edagent_ key
Questions? Email c3po@ed-agent.com