API Reference

Complete documentation for interacting with AI Dino's machine learning APIs

Core API Concepts

Authentication

Uses API keys for all endpoints. Add in Authorization header:

Authorization: Bearer 
                    

Rate Limits

API usage is subject to these limits based on your plan:

  • • Free tier: 1000 calls/day
  • • Pro tier: 10,000 calls/day
  • • Enterprise: Custom tiers

Available Endpoints

Use our RESTful API to leverage AI capabilities in your applications

Text Generation

POST
/api/v1/generate-text

Generate text based on input prompt

Request Body

{
  "prompt": "Once upon a time",
  "max_tokens": 50,
  "temperature": 0.7,
  "top_p": 1.0,
  "model": "nlp-base-icv"
}
                    

Response

{
  "generated_text": "Once upon a time there was a curious dinosaur who loved to explore the...",
  "token_usage": {"input_tokens": 15, "output_tokens": 58}
}
                    

Request Example

const response = await fetch('https://api.ai-dino-icv.com/api/v1/generate-text', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ prompt: "Explain quantum computing to a kindergartener:", temperature: 0.9 }) });

Image Analysis

POST
/api/v1/analyze-image

Analyze image content with multiple vision models

Request Body

{
  "image_url": "https://example.com/image.jpg",
  "features": ["object_detection", "caption_generation"],
  "model": "vision-pro-icv"
}
                    

Response

{
  "objects": ["dinosaur", "forest background"],
  "caption": "Close-up of a juvenile dinosaur in a forest clearing",
  "confidence": 0.98
}
                    

Request Example

const imageData = { image_url: "https://yourdomain.com/pic.jpg", features: ["image_classification"] }; fetch('https://api.ai-dino-icv.com/api/v1/analyze-image', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY' }, body: JSON.stringify(imageData) });

Model Management

GET
/api/v1/available-models

List available models and capabilities

{ "models": [ { "name": "nlp-3.7", "type": "text generation", "max_tokens": 4096, "supported_features": ["chat", "document analysis"] }, { "name": "vision-2.4", "type": "image analysis", "accuracy": "98.6%", "features": ["object detection", "captioning"] } ] }

Code Sample

const models = await fetch('https://api.ai-dino-icv.com/api/v1/available-models', { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }).then(res => res.json());

Best Practices

Input Validation

Always validate input data for length, file types, and content quality

Error Handling

Implement retries and exponential backoff with 429/5xx responses

Security

Use HTTPS for all communications. Never transmit credentials in plain text

Need API Integration Help?

Our developers can help setup production integrations and answer technical questions

Contact API Team
```