Back to Models

Getting Started with GenVR API

Learn how to integrate GenVR's AI models into your applications

Quick Start

1

Get Your API Key

Create a project and get your User ID and Access Token from the GenVR Teams page.

2

Choose a Model

Browse our model library and select the AI model that fits your needs.

Browse Models →
3

Make Your First Request

Use the code examples in the model documentation to integrate the API.

# Step 1: Generate
curl -X POST https://api.genvrresearch.com/api/v1/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "uid": "YOUR_USER_ID",
    "category": "imagegen",
    "subcategory": "flux_dev",
    "prompt": "a beautiful sunset"
  }'
# Returns: {"success": true, "data": {"id": "task-123", "status": "starting"}}

# Step 2: Poll Status (repeat until "completed")
curl -X POST https://api.genvrresearch.com/api/v1/status \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "task-123",
    "uid": "YOUR_USER_ID",
    "category": "imagegen",
    "subcategory": "flux_dev"
  }'
# Returns: {"success": true, "data": {"id": "task-123", "status": "completed"}}

# Step 3: Get Response (REQUIRED - only place to get output)
curl -X POST https://api.genvrresearch.com/api/v1/response \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "task-123",
    "uid": "YOUR_USER_ID",
    "category": "imagegen",
    "subcategory": "flux_dev"
  }'
# Returns: {"success": true, "data": {"status": "completed", "output": ["https://...png"]}}

Discovery Endpoints

Public API Endpoints (No Auth Required)

Use these GET endpoints to discover models, schemas, and download integration code:

GET /api/modelsList all available models
GET /api/schema/:category/:subcategoryGet model parameter schema
GET /api/openai-function/:category/:subcategoryDownload OpenAI function
GET /api/comfyui-node/:category/:subcategoryDownload ComfyUI node

Generation API Overview

Base URL

https://api.genvrresearch.com

Authentication

All requests require a Bearer token in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Core Endpoints

POST /api/v1/generateStart generation
POST /api/v1/statusCheck status
POST /api/v1/responseGet final result

Request Parameters

Common Parameters

Required in every API request:

  • uid - Your user identifier
  • category - Model category (e.g., "imagegen")
  • subcategory - Model identifier (e.g., "flux_dev")
  • Authorization header with your API key

Model-Specific Parameters

Each AI model has its own unique input parameters (like prompt, aspect_ratio, seed, etc.).

Browse the model library and click on any model to see its complete parameter documentation with examples in 6 programming languages.

API Workflow

1

Generate Request

Send your input to the generate endpoint. You'll receive a task ID to track your request.

POST /api/v1/generate → Returns: {"data": {"id": "task-123"}}
2

Poll Status

Check the status endpoint every 1-2 seconds until the status is "completed" or "failed". Status never returns output - only progress updates.

POST /api/v1/status → Returns status only
"processing" - Still working
"completed" - Ready for response
"failed" - Error occurred
3

Get Response (Required)

Always call this endpoint once status is "completed" to get your results. All models use this unified pattern - output is only available via /response.

POST /api/v1/response → Returns: {"output": ["url1", "url2"]}

Unified API Features

Normalized Status Values

All models return one of three standardized status values:

processing

Generation in progress

completed

Ready to fetch results

failed

Error occurred

Consistent Output Format

All models return output as an array, regardless of the number of results:

{
  "success": true,
  "data": {
    "status": "completed",
    "output": ["url1", "url2"]
  }
}

✓ Single result: ["url"]
✓ Multiple results: ["url1", "url2", ...]

Best Practices

Always Use 3 Endpoints

Always call all 3 endpoints in order: generate → status → response. Never skip the response endpoint, even if you think the model might return output in status.

Output is Array Only

Output is always an array, even for single results. Access results with output[0] for the first item.

Error Handling

Always check the status field and handle "failed" status appropriately. The error message will be in data.error.

Polling Intervals

Poll the status endpoint every 1-2 seconds. Avoid polling too frequently to prevent rate limiting.

Timeout Handling

Set appropriate timeouts for your requests. Most models complete within 30-60 seconds, but complex operations may take longer.

Rate Limits

Respect rate limits based on your subscription plan. Check your dashboard for current limits and usage.

Pre-Built Integrations

Next Steps