Skip to content

Rahyanaco/curl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rahyana API - cURL Examples

⚠️ Note: Not all examples are tested yet. Please use with caution and report any issues.

This directory contains cURL command-line examples for using the Rahyana AI API. These examples are perfect for testing, automation, and quick API interactions.

🚀 Quick Start

Prerequisites

  • cURL installed (usually pre-installed on Linux/macOS)
  • A Rahyana API key (get one at rahyana.ir)

Basic Usage

  1. Set your API key as an environment variable:

    export API_KEY="your_api_key_here"
  2. Run any example script:

    chmod +x chat-completions/basic-chat.sh
    ./chat-completions/basic-chat.sh

📚 Available Examples

Chat Completions (chat-completions/)

  • basic-chat.sh - Simple chat completion
  • streaming-chat.sh - Streaming chat responses
  • image-analysis.sh - Analyze images with AI
  • audio-processing.sh - Process audio files
  • pdf-processing.sh - Analyze PDF documents
  • web-search.sh - Web search integration
  • tool-calling.sh - Function calling examples
  • json-mode.sh - Structured JSON responses

Legacy Completions (completions/)

  • legacy-completions.sh - Text completion endpoint

Models (models/)

  • get-models.sh - List available AI models

🔧 Configuration

All scripts use the following environment variables:

  • API_KEY - Your Rahyana API key (required)
  • BASE_URL - API base URL (defaults to https://rahyana.ir/api/v1)

📖 Example Usage

Basic Chat

export API_KEY="your_api_key_here"
./chat-completions/basic-chat.sh

Streaming Chat

export API_KEY="your_api_key_here"
./chat-completions/streaming-chat.sh

Image Analysis

export API_KEY="your_api_key_here"
./chat-completions/image-analysis.sh

🔗 Related Resources

📄 License

These examples are provided as-is for educational purposes.

About

Curl examples for Rahyana API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages