Create a paper
POST
/v1/papers
const url = 'https://api.learningaide.ai/v1/papers';const options = { method: 'POST', headers: { 'Idempotency-Key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"title":"example","subject_id":"example","question_paper":{"file_id":"example","url":"https://example.com"},"marking_scheme":{"file_id":"example","url":"https://example.com"},"results_release":"automatic","grading":{"strictness":"lenient","feedback":"none","instructions":"example"},"external_id":"example","metadata":{"additionalProperty":"example"},"test_outcome":"awaiting_review"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.learningaide.ai/v1/papers \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --data '{ "title": "example", "subject_id": "example", "question_paper": { "file_id": "example", "url": "https://example.com" }, "marking_scheme": { "file_id": "example", "url": "https://example.com" }, "results_release": "automatic", "grading": { "strictness": "lenient", "feedback": "none", "instructions": "example" }, "external_id": "example", "metadata": { "additionalProperty": "example" }, "test_outcome": "awaiting_review" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Idempotency-Key
required
string
A unique value, such as a v4 UUID, that you reuse only to retry this request.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
title
required
string
subject_id
required
string
question_paper
required
marking_scheme
required
results_release
string
grading
object
strictness
string
feedback
string
instructions
string
external_id
string
metadata
object
key
additional properties
string
test_outcome
string
Responses
Section titled “Responses”A new object was created. Its processing may continue in the background.
Media typeapplication/json
object
id
required
string
object
required
string
livemode
required
boolean
title
required
string
subject_id
required
string
status
required
string
warnings
required
Array<string>
question_paper
required
marking_scheme
required
results_release
required
string
grading
required
billing
required
submission_counts
required
object
key
additional properties
integer
metadata
required
object
key
additional properties
string
created_at
required
string format: date-time
updated_at
required
string format: date-time
Example
{ "object": "paper", "status": "processing", "failure": { "code": "file_download_failed" }, "warnings": [ "questions_may_be_incomplete" ], "results_release": "automatic", "grading": { "strictness": "lenient", "feedback": "none" }, "billing": { "status": "pending" }}Headers
Section titled “Headers”X-Request-Id
required
string
This request’s ID. Quote it when you contact support.
RateLimit-Limit
integer
Requests allowed per window.
RateLimit-Remaining
integer
Requests left in the current window.
RateLimit-Reset
integer
Seconds until the window resets.
Idempotent-Replayed
string
On the saved response to an earlier request with this Idempotency-Key.
default
Section titled “default”An error (client docs, “Errors”).
Media typeapplication/json
Headers
Section titled “Headers”X-Request-Id
required
string
This request’s ID. Quote it when you contact support.
RateLimit-Limit
integer
Requests allowed per window.
RateLimit-Remaining
integer
Requests left in the current window.
RateLimit-Reset
integer
Seconds until the window resets.
Retry-After
integer
Seconds to wait before asking again.