> For the complete documentation index, see [llms.txt](https://docs.deepwriter.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.deepwriter.com/api-access/job-management.md).

# Job Management

Operations for tracking and managing generation jobs

## Get job status

> Retrieves detailed information about a specific job including status and progress

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"Job Management","description":"Operations for tracking and managing generation jobs"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Job":{"type":"object","description":"Represents a content generation job with comprehensive tracking information","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier for the job"},"user_id":{"type":"string","format":"uuid","description":"The ID of the user who owns the job"},"project_id":{"type":"string","format":"uuid","description":"The ID of the project associated with the job"},"status":{"type":"string","enum":["draft","queued","in_progress","completed","failed","cancelled","submitted","moderated"],"description":"The current status of the job"},"progress":{"type":"number","format":"float","minimum":0,"maximum":100,"description":"The completion progress of the job (0 to 100)"},"progress_stage":{"type":"string","description":"A textual description of the current processing stage"},"percent_complete":{"type":"number","format":"float","minimum":0,"maximum":100,"description":"Percentage completion of the job"},"title":{"type":"string","description":"The title of the job/project","nullable":true},"is_byok":{"type":"boolean","description":"Whether the job uses Bring Your Own Key (user's API key)","default":false},"reasoning_model":{"type":"string","description":"The AI model used for reasoning tasks","nullable":true},"writing_model":{"type":"string","description":"The AI model used for writing tasks","nullable":true},"function_model":{"type":"string","description":"The AI model used for function calling","nullable":true},"error_message":{"type":"string","description":"Error message if the job failed","nullable":true},"is_starred":{"type":"boolean","description":"Whether the job is starred by the user","default":false},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the job was created"},"updated_at":{"type":"string","format":"date-time","description":"Timestamp when the job was last updated"}},"required":["id","user_id","project_id","status","created_at","updated_at"]},"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/getJobStatus":{"get":{"summary":"Get job status","description":"Retrieves detailed information about a specific job including status and progress","tags":["Job Management"],"parameters":[{"in":"query","name":"jobId","required":true,"schema":{"type":"string","format":"uuid"},"description":"ID of the job to retrieve"}],"responses":{"200":{"description":"Job status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Cancel a running job

> Cancels a job that is currently in progress or queued

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"Job Management","description":"Operations for tracking and managing generation jobs"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/cancelJob":{"post":{"summary":"Cancel a running job","description":"Cancels a job that is currently in progress or queued","tags":["Job Management"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jobId"],"properties":{"jobId":{"type":"string","format":"uuid","description":"ID of the job to cancel"}}}}}},"responses":{"200":{"description":"Job cancelled successfully","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.deepwriter.com/api-access/job-management.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
