curl -X POST "https://api.tensorone.ai/v2/ai/chat" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "role": "system", "content": "You are a helpful AI assistant." }, { "role": "user", "content": "Explain quantum computing in simple terms" } ], "model": "llama-3.1-70b", "maxTokens": 500, "temperature": 0.7 }'
Copy
{ "choices": [ { "message": { "role": "assistant", "content": "Quantum computing is like having a super-powered calculator that works in a fundamentally different way than regular computers. While classical computers use bits that are either 0 or 1, quantum computers use quantum bits (qubits) that can be both 0 and 1 simultaneously through a property called superposition.\n\nThis allows quantum computers to explore many possible solutions at once, making them potentially much faster for specific types of problems like breaking encryption, simulating molecules, or optimizing complex systems.\n\nThink of it like this: if a classical computer is like checking each door in a maze one by one, a quantum computer is like a ghost that can walk through walls and check multiple paths simultaneously." }, "finishReason": "stop" } ], "usage": { "promptTokens": 42, "completionTokens": 138, "totalTokens": 180 }}
AI Services
AI Chat Completion
Generate chat completions using various large language models
Copy
curl -X POST "https://api.tensorone.ai/v2/ai/chat" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "role": "system", "content": "You are a helpful AI assistant." }, { "role": "user", "content": "Explain quantum computing in simple terms" } ], "model": "llama-3.1-70b", "maxTokens": 500, "temperature": 0.7 }'
Copy
{ "choices": [ { "message": { "role": "assistant", "content": "Quantum computing is like having a super-powered calculator that works in a fundamentally different way than regular computers. While classical computers use bits that are either 0 or 1, quantum computers use quantum bits (qubits) that can be both 0 and 1 simultaneously through a property called superposition.\n\nThis allows quantum computers to explore many possible solutions at once, making them potentially much faster for specific types of problems like breaking encryption, simulating molecules, or optimizing complex systems.\n\nThink of it like this: if a classical computer is like checking each door in a maze one by one, a quantum computer is like a ghost that can walk through walls and check multiple paths simultaneously." }, "finishReason": "stop" } ], "usage": { "promptTokens": 42, "completionTokens": 138, "totalTokens": 180 }}
Generate intelligent responses using state-of-the-art language models including Llama, Mistral, and custom fine-tuned models available on the TensorOne platform.
curl -X POST "https://api.tensorone.ai/v2/ai/chat" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "role": "system", "content": "You are a helpful AI assistant." }, { "role": "user", "content": "Explain quantum computing in simple terms" } ], "model": "llama-3.1-70b", "maxTokens": 500, "temperature": 0.7 }'
Copy
{ "choices": [ { "message": { "role": "assistant", "content": "Quantum computing is like having a super-powered calculator that works in a fundamentally different way than regular computers. While classical computers use bits that are either 0 or 1, quantum computers use quantum bits (qubits) that can be both 0 and 1 simultaneously through a property called superposition.\n\nThis allows quantum computers to explore many possible solutions at once, making them potentially much faster for specific types of problems like breaking encryption, simulating molecules, or optimizing complex systems.\n\nThink of it like this: if a classical computer is like checking each door in a maze one by one, a quantum computer is like a ghost that can walk through walls and check multiple paths simultaneously." }, "finishReason": "stop" } ], "usage": { "promptTokens": 42, "completionTokens": 138, "totalTokens": 180 }}