All API requests require authentication using Bearer tokens. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY/api/v1/generateStandard AI text generation with no memory or personality.
{
"prompt": "Write a story about robots", // Required: The prompt to generate text from
"max_tokens": 150, // Optional: Maximum number of tokens to generate (default: 1024)
"temperature": 0.7, // Optional: Controls randomness (0-1, default: 0.7)
"top_p": 0.9, // Optional: Controls diversity (0-1, default: 0.9)
"stop": ["###"] // Optional: Sequences where the API will stop generating
}{
"success": true,
"text": "In the year 2150, robots had become an integral part of human society...",
"usage": {
"prompt_tokens": 5,
"completion_tokens": 150,
"total_tokens": 155
},
"credits_used": 1,
"credits_remaining": 9999
}curl -X POST https://api.ryzo.ai/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Write a story about robots",
"max_tokens": 150
}'Cost: 1 credit per request
Rate limits are applied per API key, not per account. Creating multiple instances gives you separate rate limits.
X-RateLimit-Limit: 20 X-RateLimit-Remaining: 19 X-RateLimit-Reset: 1623168000
These headers are included in every API response to help you track your rate limit usage.
200Success400Bad Request - Invalid parameters401Unauthorized - Invalid or missing API key402Payment Required - Insufficient credits403Forbidden - API key doesn't have permission429Too Many Requests - Rate limit exceeded500Internal Server Error - Something went wrong{
"success": false,
"error": "Insufficient credits",
"error_code": "INSUFFICIENT_CREDITS",
"credits_remaining": 0,
"timestamp": "2024-01-15T10:30:00Z"
}INVALID_API_KEYThe API key is invalid or has been revokedINSUFFICIENT_CREDITSNot enough credits to complete the requestRATE_LIMIT_EXCEEDEDToo many requests in the given time periodINVALID_PARAMETERSOne or more parameters are invalidCONTENT_POLICY_VIOLATIONContent violates our usage policiesWe provide official client libraries for popular programming languages to make integration easier.
npm install ryzo-aiFull-featured client with TypeScript support and browser compatibility.
pip install ryzo-aiPython client with async support and convenient helpers.
composer require ryzo/ryzo-aiPHP client with Laravel integration and PSR-18 compatibility.
SDK Documentation
For detailed SDK documentation, examples, and advanced usage, visit our GitHub repositories atgithub.com/ryzo-ai
Join our Discord community for support, updates, and to connect with other developers: