Skip to main content
POST
/
model-inference
/
run
Run model inference
curl --request POST \
  --url https://api-dev.narrative.io/model-inference/run \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "data_plane_id": "fef9904e-d263-4930-85f7-1e28cce40f89",
  "model": "anthropic.claude-sonnet-4.5",
  "messages": [
    {
      "role": "system",
      "text": "Only generate geographical coordinates in the northern hemisphere"
    },
    {
      "role": "user",
      "text": "Generate a geographical coordinate"
    }
  ],
  "inference_config": {
    "output_format_schema": {
      "title": "Longitude and Latitude Values",
      "description": "A geographical coordinate.",
      "required": [
        "latitude",
        "longitude"
      ],
      "type": "object",
      "properties": {
        "latitude": {
          "type": "number",
          "minimum": -90,
          "maximum": 90
        },
        "longitude": {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        }
      },
      "additionalProperties": false
    },
    "max_tokens": 1024,
    "temperature": 0.3
  },
  "tags": [
    "test"
  ]
}
'
{
  "job_id": "a81e1460-fbdc-4204-bd76-a9e496bf760d"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
data_plane_id
string<uuid>
required

Data plane identifier, must be provided when registering dataset in external dataplane.

model
enum<string>
required
Available options:
anthropic.claude-haiku-4.5,
anthropic.claude-sonnet-4.5,
anthropic.claude-opus-4.5,
openai.gpt-oss-120b,
openai.gpt-4.1,
openai.o4-mini
messages
object[]
required
inference_config
object
required
tags
string[]

Response

OK

job_id
string<uuid>
required

The id of the job that has been enqueued.