SLURX API

Using the SLURX API

The SLURX API allows you to validate content against ethical benchmarks. This guide explains how to use the API.

Authentication

All API requests require an API key for authentication. Include your API key in the request headers.

X-Api-key: YOUR_API_KEY

You can obtain an API key by registering on the SLURX platform. Store your API key securely and never expose it in client-side code.

API Endpoint

All API requests should be sent to the following endpoint:

https://api.slurx.miomideal.com/api/v1/

Making a Request

HTTP Method

Use the POST method for all API requests.

Headers

Include these headers with every request:

HeaderValueDescription
Content-Typeapplication/jsonSpecifies the request body format
X-Api-keyYOUR_API_KEYYour API authentication key

Request Body

The request body must be a JSON object with the following parameter:

ParameterTypeRequiredDescription
promptStringYesThe content to validate against ethical benchmarks
{ "prompt": "Your content here" }

Response Format

The API returns a JSON response with validation results. The structure will depend on the specific validation performed.

A successful response will have a 200 status code. Error responses will have appropriate HTTP status codes (400 for bad requests, 401 for authentication issues, etc.).

Example Implementation

Here's an example of how to call the API using curl:

curl -X POST https://api.slurx.miomideal.com/api/v1/ \ -H "Content-Type: application/json" \ -H "X-Api-key: YOUR_API_KEY" \ -d '{"prompt": "Your content here"}'

Note: When using the API in a frontend application, consider making the request from your backend to keep your API key secure.