RealmPlay AI API Documentation

Overview

RealmPlay AI provides a cutting-edge AI model specialized in uncensored roleplay, storytelling, and creative writing. Our API allows developers to integrate our powerful AI capabilities into their applications, enabling rich, engaging, and unrestricted content generation.

Access Requirements

  • Eligibility: The API is exclusively available to Gold and Platinum tier users.

  • Usage: Gold and Platinum users receive unlimited, unmetered API access.

Getting Started

1. Sign Up and Create an API Key

  1. Create an account at realmplay.aiarrow-up-right

  2. Navigate to the "Account" section in the navbar

  3. Click "Create New API Key"

  4. Copy your API key for use in your applications

2. API Base URL

3. Authentication

All API requests require authentication using your API key in the header:

API Reference

Chat Completions

Generate AI responses based on conversation context.

Endpoint: POST /v1/chat/completions

Request Format

Request Parameters

Parameter
Type
Required
Description

model

string

Yes

Must be "realmplay-405b"

messages

array

Yes

Array of message objects with "role" and "content"

temperature

float

No

Controls randomness (0.0-2.0, default: 1.0)

top_p

float

No

Controls diversity via nucleus sampling (0.0-1.0, default: 1.0)

n

integer

No

Number of completions to generate (default: 1)

stream

boolean

No

If true, partial message deltas will be sent (default: false)

stop

array

No

Up to 4 sequences where the API will stop generating

max_tokens

integer

No

Maximum number of tokens to generate

presence_penalty

float

No

Penalizes repeated tokens (-2.0 to 2.0, default: 0)

frequency_penalty

float

No

Penalizes frequent tokens (-2.0 to 2.0, default: 0)

logit_bias

object

No

Modifies likelihood of specified tokens appearing

user

string

No

A unique identifier representing your end-user

Message Object

Field
Type
Description

role

string

Either "system", "user", or "assistant"

content

string

The content of the message

Response Format (Non-streaming)

Streaming Response Format

When stream: true is set, the API returns chunks of data in the following format:

Code Examples

Python

Using the OpenAI SDK:

JavaScript/TypeScript

Using the OpenAI JS SDK:

cURL

Using System Messages

You can control the AI's behavior by including system messages in your request:

Error Handling

The API returns standard HTTP status codes:

Status Code
Meaning

200

OK - Request succeeded

400

Bad Request - Invalid request format or parameters

401

Unauthorized - Invalid API key

403

Forbidden - Valid API key but insufficient permissions (not Gold/Platinum tier)

500

Server Error - Something went wrong on our server

Support

If you encounter any issues or have questions about the API, please contact our support team at support@realmplay.ai


© 2025 RealmPlay.ai - All Rights Reserved

Last updated