Page cover

Use

The Use endpoint in the Proof of Me Unified API provides a streamlined and powerful method to leverage advanced AI services. Whether you’re working on text generation, audio synthesis, multimedia production, or other AI-driven tasks, this endpoint enables seamless integration with multiple AI providers through a single, unified interface.


Endpoint Overview

  • Endpoint: POST /api/v1/ai/services?searchModel={model-id}

  • Description: Processes a given prompt and delivers a response based on the chosen AI model or service.

  • Authentication: Requires a Bearer Token generated during user registration.

This endpoint is designed to abstract the complexities of managing multiple AI provider APIs, allowing developers to focus on building and scaling their applications.


Query Parameters

Parameter

Type

Description

Required

searchModel

number

Specifies the AI service or model to use (e.g., OpenAI, Gemini, ElevenLabs, etc.).

Yes


Request Details

The Use endpoint requires a properly structured request body and headers for authentication.

Request Body

The request body should include a JSON object specifying the input for the selected AI service:

jsonCopy code{
  "prompt": "Describe the benefits of AI in the healthcare sector."
}

Request Headers

Authentication is handled using the Bearer Token provided during registration, along with the Content-Type header:


Example: JavaScript Integration

Below is a JavaScript implementation using the Use endpoint to query AI services:


Example: Python Integration

Here’s how you can integrate the Use endpoint in a Python application:


Example Responses

Here are example responses for various AI models supported by the Use endpoint:

  1. Text Generation (Model 2 - OpenAI):

  2. Audio Synthesis (Model 4 - ElevenLabs):

  3. Video Creation (Model 3 - RunwayML):


Supported Models in v1.0

Model ID

Service

Description

1

Gemini

Advanced multimodal AI for text and vision tasks.

2

OpenAI

Robust text generation using GPT-4 and GPT-3.5.

3

RunwayML

Generative workflows for video and media creation.

4

ElevenLabs

High-quality audio and voice synthesis.


Best Practices

  • Error Handling: Ensure your application gracefully handles errors such as invalid inputs, authentication failures, or server downtime.

  • Rate Limits: Respect the API's rate limits to ensure uninterrupted access.

  • Bearer Token Security: Keep your Bearer Token secure and avoid exposing it in client-side code.


Notes on Future Updates

The Use endpoint is part of the Proof of Me Unified API's v1.0 release. While it currently supports four models, future updates will expand its capabilities to include additional AI services and advanced features. Stay updated by exploring the official documentation.

Last updated