Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add response section to API job submission

...

Code Block
languagetext
{
  "app": "gridrepublic:text-inference",
  "commandLine": "{\"inputs\": [\"When does 1+1=10?\"] }",
  "hours": 1,
  "tag": "gemma:2b"
}


Response

When the job is submitted, the API returns a success indicator and either an array of job "ids", when success is true, or a string indicating an "error", when success is false. For example:

Code Block
languagetext
{
  "success":true,
  "ids":["a9ab011455bb6aeb0161b5fc08766b42"]
}

If the submission fails, the response will include an error:

Code Block
languagetext
{
  "success":false,
  "error":"Invalid input format"
}

Get job status

To retrieve the current status of a job that has been submitted to the LLM service, the jobs API endpoint accepts GET requests with a comma-separated list of one or more job IDs as a path parameter:

https://api.gridrepublic.services/remotejobs/v2/jobs/{ids}

In the following example, {ids} was replaced with 9f22472031ef57c3fd517061d116ad68; the output of the inference process is contained in the "log" property and is updated as the process runs:

...